]> git.baikalelectronics.ru Git - kernel.git/commit
[CRYPTO] api: Add async block cipher interface
authorHerbert Xu <herbert@gondor.apana.org.au>
Sat, 24 Mar 2007 03:35:34 +0000 (14:35 +1100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 2 May 2007 04:38:30 +0000 (14:38 +1000)
commit9745c01206de0158f4094701a9e771223bb44850
tree9e239c4d2f208578fd400c2abb31e8ae7788de4b
parentab7c69be75a7317d46f129236dd6545550e96336
[CRYPTO] api: Add async block cipher interface

This patch adds the frontend interface for asynchronous block ciphers.
In addition to the usual block cipher parameters, there is a callback
function pointer and a data pointer.  The callback will be invoked only
if the encrypt/decrypt handlers return -EINPROGRESS.  In other words,
if the return value of zero the completion handler (or the equivalent
code) needs to be invoked by the caller.

The request structure is allocated and freed by the caller.  Its size
is determined by calling crypto_ablkcipher_reqsize().  The helpers
ablkcipher_request_alloc/ablkcipher_request_free can be used to manage
the memory for a request.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/blkcipher.c
include/linux/crypto.h