OSDN Git Service

crypto: stm32/cryp - fix CTR counter carry
authorNicolas Toromanoff <nicolas.toromanoff@foss.st.com>
Tue, 30 Nov 2021 07:54:55 +0000 (08:54 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 11 Dec 2021 05:48:05 +0000 (16:48 +1100)
commit41c76690b0990efacd15d35cfb4e77318cd80ebb
treed31c5e0c2292f8c92d0dfb3f5ad1f65b15f10f4f
parent029812aee3a120c9ca3cd891e5ef159ec3c6c547
crypto: stm32/cryp - fix CTR counter carry

STM32 CRYP hardware doesn't manage CTR counter bigger than max U32, as
a workaround, at each block the current IV is saved, if the saved IV
lower u32 is 0xFFFFFFFF, the full IV is manually incremented, and set
in hardware.
Fixes: bbb2832620ac ("crypto: stm32 - Fix sparse warnings")

Signed-off-by: Nicolas Toromanoff <nicolas.toromanoff@foss.st.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/stm32/stm32-cryp.c