]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: ccree - fix iv handling
authorGilad Ben-Yossef <gilad@benyossef.com>
Sun, 1 Jul 2018 07:02:36 +0000 (08:02 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sun, 8 Jul 2018 16:33:35 +0000 (00:33 +0800)
commit2b75e7048d11ed8771b8f32b08b9ee3b17040ee3
treee9db016f31f8ff59174057779d4fb88326bc771c
parent35dd8fd96bf85aa5ff80d99b17a45253d82a8b16
crypto: ccree - fix iv handling

We were copying our last cipher block into the request for use as IV for
all modes of operations. Fix this by discerning the behaviour based on
the mode of operation used: copy ciphertext for CBC, update counter for
CTR.

CC: stable@vger.kernel.org
Fixes: 23222a81400b ("crypto: ccree - add skcipher support")
Reported by: Hadar Gat <hadar.gat@arm.com>
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccree/cc_cipher.c