aboutsummaryrefslogtreecommitdiffstats
path: root/include/crypto
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-12-03 20:46:48 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2008-01-10 16:16:46 -0500
commitb9c55aa475599183d0eab6833ea23e70c52dd24b (patch)
tree74e011e9b95291f230d6e7200730e3bc3b9d7153 /include/crypto
parent806d183aa6cc565d0f6bd2fb7fc6bfb175cc4813 (diff)
[CRYPTO] skcipher: Create default givcipher instances
This patch makes crypto_alloc_ablkcipher/crypto_grab_skcipher always return algorithms that are capable of generating their own IVs through givencrypt and givdecrypt. Each algorithm may specify its default IV generator through the geniv field. For algorithms that do not set the geniv field, the blkcipher layer will pick a default. Currently it's chainiv for synchronous algorithms and eseqiv for asynchronous algorithms. Note that if these wrappers do not work on an algorithm then that algorithm must specify its own geniv or it can't be used at all. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto')
-rw-r--r--include/crypto/internal/skcipher.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/crypto/internal/skcipher.h b/include/crypto/internal/skcipher.h
index 80c5bfb14a60..2071999d4b5e 100644
--- a/include/crypto/internal/skcipher.h
+++ b/include/crypto/internal/skcipher.h
@@ -53,6 +53,8 @@ static inline struct crypto_ablkcipher *crypto_spawn_skcipher(
53 crypto_skcipher_mask(0))); 53 crypto_skcipher_mask(0)));
54} 54}
55 55
56int skcipher_null_givencrypt(struct skcipher_givcrypt_request *req);
57int skcipher_null_givdecrypt(struct skcipher_givcrypt_request *req);
56const char *crypto_default_geniv(const struct crypto_alg *alg); 58const char *crypto_default_geniv(const struct crypto_alg *alg);
57 59
58struct crypto_instance *skcipher_geniv_alloc(struct crypto_template *tmpl, 60struct crypto_instance *skcipher_geniv_alloc(struct crypto_template *tmpl,