diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-12-12 06:24:27 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2008-01-10 16:16:52 -0500 |
commit | d29ce988aeb459203c74f14747f4f77e1829ef78 (patch) | |
tree | 886ec0a429c3b1b5b79f290be6b0d8383b89c30b /include/linux/crypto.h | |
parent | 14df4d80433b8413f901e80880c39e8759b8418f (diff) |
[CRYPTO] aead: Create default givcipher instances
This patch makes crypto_alloc_aead always return algorithms that is
capable of generating their own IVs through givencrypt and givdecrypt.
All existing AEAD algorithms already do. New ones must either supply
their own or specify a generic IV generator with the geniv field.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/linux/crypto.h')
-rw-r--r-- | include/linux/crypto.h | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 639385a9672d..0aba10460201 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
@@ -723,15 +723,7 @@ static inline struct crypto_aead *__crypto_aead_cast(struct crypto_tfm *tfm) | |||
723 | return (struct crypto_aead *)tfm; | 723 | return (struct crypto_aead *)tfm; |
724 | } | 724 | } |
725 | 725 | ||
726 | static inline struct crypto_aead *crypto_alloc_aead(const char *alg_name, | 726 | struct crypto_aead *crypto_alloc_aead(const char *alg_name, u32 type, u32 mask); |
727 | u32 type, u32 mask) | ||
728 | { | ||
729 | type &= ~CRYPTO_ALG_TYPE_MASK; | ||
730 | type |= CRYPTO_ALG_TYPE_AEAD; | ||
731 | mask |= CRYPTO_ALG_TYPE_MASK; | ||
732 | |||
733 | return __crypto_aead_cast(crypto_alloc_base(alg_name, type, mask)); | ||
734 | } | ||
735 | 727 | ||
736 | static inline struct crypto_tfm *crypto_aead_tfm(struct crypto_aead *tfm) | 728 | static inline struct crypto_tfm *crypto_aead_tfm(struct crypto_aead *tfm) |
737 | { | 729 | { |