]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: talitos - fix skcipher failure due to wrong output IV
authorChristophe Leroy <christophe.leroy@c-s.fr>
Wed, 15 May 2019 12:29:03 +0000 (12:29 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 23 May 2019 06:13:06 +0000 (14:13 +0800)
commit66ee05eeadb3a44ec7bf7e62ae359c6e13b6b064
tree57869612e2610bfdaa53d9a824575a8ab74cae7a
parent7527e7eb36dad5f77a576f383009550e117708d7
crypto: talitos - fix skcipher failure due to wrong output IV

Selftests report the following:

[    2.984845] alg: skcipher: cbc-aes-talitos encryption test failed (wrong output IV) on test vector 0, cfg="in-place"
[    2.995377] 00000000: 3d af ba 42 9d 9e b4 30 b4 22 da 80 2c 9f ac 41
[    3.032673] alg: skcipher: cbc-des-talitos encryption test failed (wrong output IV) on test vector 0, cfg="in-place"
[    3.043185] 00000000: fe dc ba 98 76 54 32 10
[    3.063238] alg: skcipher: cbc-3des-talitos encryption test failed (wrong output IV) on test vector 0, cfg="in-place"
[    3.073818] 00000000: 7d 33 88 93 0f 93 b2 42

This above dumps show that the actual output IV is indeed the input IV.
This is due to the IV not being copied back into the request.

This patch fixes that.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/talitos.c