aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/crypto.h
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/linux/crypto.h
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/linux/crypto.h')
-rw-r--r--include/linux/crypto.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/include/linux/crypto.h b/include/linux/crypto.h
index fa7afa9b9f4f..835dcaf3fe4e 100644
--- a/include/linux/crypto.h
+++ b/include/linux/crypto.h
@@ -561,13 +561,8 @@ static inline u32 crypto_skcipher_mask(u32 mask)
561 return mask; 561 return mask;
562} 562}
563 563
564static inline struct crypto_ablkcipher *crypto_alloc_ablkcipher( 564struct crypto_ablkcipher *crypto_alloc_ablkcipher(const char *alg_name,
565 const char *alg_name, u32 type, u32 mask) 565 u32 type, u32 mask);
566{
567 return __crypto_ablkcipher_cast(
568 crypto_alloc_base(alg_name, crypto_skcipher_type(type),
569 crypto_skcipher_mask(mask)));
570}
571 566
572static inline struct crypto_tfm *crypto_ablkcipher_tfm( 567static inline struct crypto_tfm *crypto_ablkcipher_tfm(
573 struct crypto_ablkcipher *tfm) 568 struct crypto_ablkcipher *tfm)