]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: caam - update IV only when crypto operation succeeds
authorHoria Geantă <horia.geanta@nxp.com>
Wed, 31 Jul 2019 13:08:04 +0000 (16:08 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 9 Aug 2019 05:11:45 +0000 (15:11 +1000)
commitf05595473df4634d9ee40ccb6a15d02289714207
tree4e10355aaadf59e04a606fd32e255cc91bd8d907
parentc86286b1048fcb5f3fc30464024e3835634bdd9b
crypto: caam - update IV only when crypto operation succeeds

skcipher encryption might fail and in some cases, like (invalid) input
length smaller then block size, updating the IV would lead to a useless
IV copy in case hardware issued an error.

Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/caamalg.c
drivers/crypto/caam/caamalg_qi.c
drivers/crypto/caam/caamalg_qi2.c