diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/crypto/aead.h | 2 | ||||
-rw-r--r-- | include/crypto/internal/aead.h | 5 | ||||
-rw-r--r-- | include/linux/crypto.h | 6 |
3 files changed, 10 insertions, 3 deletions
diff --git a/include/crypto/aead.h b/include/crypto/aead.h index e2d2c3c62e68..aebf57dfb903 100644 --- a/include/crypto/aead.h +++ b/include/crypto/aead.h @@ -17,6 +17,8 @@ #include <linux/kernel.h> #include <linux/slab.h> +#define aead_alg old_aead_alg + /** * DOC: Authenticated Encryption With Associated Data (AEAD) Cipher API * diff --git a/include/crypto/internal/aead.h b/include/crypto/internal/aead.h index a2d104aa3430..84c17bb92b6a 100644 --- a/include/crypto/internal/aead.h +++ b/include/crypto/internal/aead.h @@ -26,6 +26,11 @@ struct crypto_aead_spawn { extern const struct crypto_type crypto_aead_type; extern const struct crypto_type crypto_nivaead_type; +static inline struct old_aead_alg *crypto_old_aead_alg(struct crypto_aead *tfm) +{ + return &crypto_aead_tfm(tfm)->__crt_alg->cra_aead; +} + static inline struct aead_alg *crypto_aead_alg(struct crypto_aead *tfm) { return &crypto_aead_tfm(tfm)->__crt_alg->cra_aead; diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 59ca4086ce6a..7d290a91c6f9 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h @@ -268,7 +268,7 @@ struct ablkcipher_alg { }; /** - * struct aead_alg - AEAD cipher definition + * struct old_aead_alg - AEAD cipher definition * @maxauthsize: Set the maximum authentication tag size supported by the * transformation. A transformation may support smaller tag sizes. * As the authentication tag is a message digest to ensure the @@ -293,7 +293,7 @@ struct ablkcipher_alg { * All fields except @givencrypt , @givdecrypt , @geniv and @ivsize are * mandatory and must be filled. */ -struct aead_alg { +struct old_aead_alg { int (*setkey)(struct crypto_aead *tfm, const u8 *key, unsigned int keylen); int (*setauthsize)(struct crypto_aead *tfm, unsigned int authsize); @@ -501,7 +501,7 @@ struct crypto_alg { union { struct ablkcipher_alg ablkcipher; - struct aead_alg aead; + struct old_aead_alg aead; struct blkcipher_alg blkcipher; struct cipher_alg cipher; struct compress_alg compress; |