]> www.infradead.org Git - users/jedix/linux-maple.git/commit
crypto: tegra - Fix IV usage for AES ECB
authorAkhil R <akhilrajeev@nvidia.com>
Wed, 26 Mar 2025 14:51:10 +0000 (20:21 +0530)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 7 Apr 2025 05:22:25 +0000 (13:22 +0800)
commit1ddaff40c08abb926be5ba713c5efc412d0836c5
treeabf465196e8002afd4adeaed0a0c1adc08429411
parent0af2f6be1b4281385b618cb86ad946eded089ac8
crypto: tegra - Fix IV usage for AES ECB

Modifying the crypto_request turns out to be not the right way to handle
the stale value issue with the IV. Though the IV is not used for AES ECB,
it eventually get used in algorithms like LRW in the next step after
AES ECB encryption/decryption. Setting req->iv to NULL breaks the
implementation of such algorithms. Hence modify only the local reqctx
to check for IV.

Fixes: bde558220866 ("crypto: tegra - Set IV to NULL explicitly for AES ECB")
Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/tegra/tegra-se-aes.c