]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: rockchip - better handle cipher key
authorCorentin Labbe <clabbe@baylibre.com>
Tue, 27 Sep 2022 07:54:46 +0000 (07:54 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:30 +0000 (13:32 +0100)
commit5c05b18f49221e2445003406a4c0f235eaa87da5
tree2e123cbec334a38ec9a82ad6efd503da5eb6b43b
parent970573aa7086370260637f8992c675abc1ef3862
crypto: rockchip - better handle cipher key

[ Upstream commit cee134f3f675deb06ecbcaf995b4882a3ca2e058 ]

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: ec913a52b0b01 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/rockchip/rk3288_crypto.h
drivers/crypto/rockchip/rk3288_crypto_skcipher.c