OSDN Git Service

crypto: rockchip - better handle cipher key
authorCorentin Labbe <clabbe@baylibre.com>
Tue, 27 Sep 2022 07:54:46 +0000 (07:54 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 28 Oct 2022 04:36:33 +0000 (12:36 +0800)
commitd6b23ccef82816050c2fd458c9dabfa0e0af09b9
tree9dfd376cd146fb1250e7fb3277feca903ea9ad43
parent816600485cb597b3ff7d6806a95a78512839f775
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>
drivers/crypto/rockchip/rk3288_crypto.h
drivers/crypto/rockchip/rk3288_crypto_skcipher.c