mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[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>
This commit is contained in:
parent
14df4d8043
commit
d29ce988ae
3 changed files with 157 additions and 9 deletions
|
@ -723,15 +723,7 @@ static inline struct crypto_aead *__crypto_aead_cast(struct crypto_tfm *tfm)
|
|||
return (struct crypto_aead *)tfm;
|
||||
}
|
||||
|
||||
static inline struct crypto_aead *crypto_alloc_aead(const char *alg_name,
|
||||
u32 type, u32 mask)
|
||||
{
|
||||
type &= ~CRYPTO_ALG_TYPE_MASK;
|
||||
type |= CRYPTO_ALG_TYPE_AEAD;
|
||||
mask |= CRYPTO_ALG_TYPE_MASK;
|
||||
|
||||
return __crypto_aead_cast(crypto_alloc_base(alg_name, type, mask));
|
||||
}
|
||||
struct crypto_aead *crypto_alloc_aead(const char *alg_name, u32 type, u32 mask);
|
||||
|
||||
static inline struct crypto_tfm *crypto_aead_tfm(struct crypto_aead *tfm)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue