summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/omap-aes.h
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2019-11-05 15:01:05 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2019-12-11 09:36:59 +0100
commitf0956d42c14abfeda9d0be7f06999363cab3e99a (patch)
treeacd550bb2ffb114085a390f2bb0f566d6e769fab /drivers/crypto/omap-aes.h
parentcrypto: omap-aes-gcm - check length of assocdata in RFC4106 mode (diff)
downloadlinux-f0956d42c14abfeda9d0be7f06999363cab3e99a.tar.xz
linux-f0956d42c14abfeda9d0be7f06999363cab3e99a.zip
crypto: omap-aes-gcm - use the AES library to encrypt the tag
The OMAP AES-GCM implementation uses a fallback ecb(aes) skcipher to produce the keystream to encrypt the output tag. Let's use the new AES library instead - this is much simpler, and shouldn't affect performance given that it only involves a single block. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Tero Kristo <t-kristo@ti.com> Tested-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/omap-aes.h')
-rw-r--r--drivers/crypto/omap-aes.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/crypto/omap-aes.h b/drivers/crypto/omap-aes.h
index 1bcca7957e92..b89d2e673699 100644
--- a/drivers/crypto/omap-aes.h
+++ b/drivers/crypto/omap-aes.h
@@ -9,6 +9,7 @@
#ifndef __OMAP_AES_H__
#define __OMAP_AES_H__
+#include <crypto/aes.h>
#include <crypto/engine.h>
#define DST_MAXBURST 4
@@ -98,7 +99,11 @@ struct omap_aes_ctx {
u32 key[AES_KEYSIZE_256 / sizeof(u32)];
u8 nonce[4];
struct crypto_sync_skcipher *fallback;
- struct crypto_skcipher *ctr;
+};
+
+struct omap_aes_gcm_ctx {
+ struct omap_aes_ctx octx;
+ struct crypto_aes_ctx actx;
};
struct omap_aes_reqctx {