summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/rockchip/rk3288_crypto.h
diff options
context:
space:
mode:
authorCorentin Labbe <clabbe@baylibre.com>2022-09-27 07:54:46 +0000
committerHerbert Xu <herbert@gondor.apana.org.au>2022-10-28 12:36:33 +0800
commitd6b23ccef82816050c2fd458c9dabfa0e0af09b9 (patch)
tree9dfd376cd146fb1250e7fb3277feca903ea9ad43 /drivers/crypto/rockchip/rk3288_crypto.h
parent816600485cb597b3ff7d6806a95a78512839f775 (diff)
downloadlinux-d6b23ccef82816050c2fd458c9dabfa0e0af09b9.tar.bz2
crypto: rockchip - better handle cipher key
The key should not be set in hardware too much in advance, this will fail it 2 TFM with different keys generate alternative requests. The key should be stored and used just before doing cipher operations. Fixes: ce0183cb6464b ("crypto: rockchip - switch to skcipher API") Reviewed-by: John Keeping <john@metanate.com> Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/rockchip/rk3288_crypto.h')
-rw-r--r--drivers/crypto/rockchip/rk3288_crypto.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/crypto/rockchip/rk3288_crypto.h b/drivers/crypto/rockchip/rk3288_crypto.h
index 8b1e15d8ddc6..540b81a14b9b 100644
--- a/drivers/crypto/rockchip/rk3288_crypto.h
+++ b/drivers/crypto/rockchip/rk3288_crypto.h
@@ -245,6 +245,7 @@ struct rk_ahash_rctx {
struct rk_cipher_ctx {
struct rk_crypto_info *dev;
unsigned int keylen;
+ u8 key[AES_MAX_KEY_SIZE];
u8 iv[AES_BLOCK_SIZE];
struct crypto_skcipher *fallback_tfm;
};