diff options
author | Christian Lamparter <chunkeey@gmail.com> | 2017-10-04 01:00:16 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-10-12 22:55:21 +0800 |
commit | 65ea8b678fcf385ac18864743bae66c0643e6842 (patch) | |
tree | 88a63d9df014cdc5ad5c6b3be6a5410dc0b9ba73 /drivers/crypto/amcc/crypto4xx_core.c | |
parent | a0aae821ba3d35a49d4d0143dfb0c07eee22130e (diff) | |
download | linux-65ea8b678fcf385ac18864743bae66c0643e6842.tar.bz2 |
crypto: crypto4xx - add aes-ccm support
This patch adds aes-ccm support.
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/amcc/crypto4xx_core.c')
-rw-r--r-- | drivers/crypto/amcc/crypto4xx_core.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/crypto/amcc/crypto4xx_core.c b/drivers/crypto/amcc/crypto4xx_core.c index b5108259f1a6..85c650323c97 100644 --- a/drivers/crypto/amcc/crypto4xx_core.c +++ b/drivers/crypto/amcc/crypto4xx_core.c @@ -1210,6 +1210,29 @@ static struct crypto4xx_alg_common crypto4xx_alg[] = { } } } }, + + /* AEAD */ + { .type = CRYPTO_ALG_TYPE_AEAD, .u.aead = { + .setkey = crypto4xx_setkey_aes_ccm, + .setauthsize = crypto4xx_setauthsize_aead, + .encrypt = crypto4xx_encrypt_aes_ccm, + .decrypt = crypto4xx_decrypt_aes_ccm, + .init = crypto4xx_aead_init, + .exit = crypto4xx_aead_exit, + .ivsize = AES_BLOCK_SIZE, + .maxauthsize = 16, + .base = { + .cra_name = "ccm(aes)", + .cra_driver_name = "ccm-aes-ppc4xx", + .cra_priority = CRYPTO4XX_CRYPTO_PRIORITY, + .cra_flags = CRYPTO_ALG_ASYNC | + CRYPTO_ALG_NEED_FALLBACK | + CRYPTO_ALG_KERN_DRIVER_ONLY, + .cra_blocksize = 1, + .cra_ctxsize = sizeof(struct crypto4xx_ctx), + .cra_module = THIS_MODULE, + }, + } }, }; /** |