android_kernel_samsung_a7y1.../drivers/crypto
Christian Lamparter d410c65799 crypto: crypto4xx - properly set IV after de- and encrypt
[ Upstream commit fc340115ffb8235c1bbd200c28855e6373d0dd1a ]

This patch fixes cts(cbc(aes)) test when cbc-aes-ppc4xx is used.
alg: skcipher: Test 1 failed (invalid result) on encryption for cts(cbc-aes-ppc4xx)
00000000: 4b 10 75 fc 2f 14 1b 6a 27 35 37 33 d1 b7 70 05
00000010: 97
alg: skcipher: Failed to load transform for cts(cbc(aes)): -2

The CTS cipher mode expect the IV (req->iv) of skcipher_request
to contain the last ciphertext block after the {en,de}crypt
operation is complete.

Fix this issue for the AMCC Crypto4xx hardware engine.
The tcrypt test case for cts(cbc(aes)) is now correctly passed.

name         : cts(cbc(aes))
driver       : cts(cbc-aes-ppc4xx)
module       : cts
priority     : 300
refcnt       : 1
selftest     : passed
internal     : no
type         : skcipher
async        : yes
blocksize    : 16
min keysize  : 16
max keysize  : 32
ivsize       : 16
chunksize    : 16
walksize     : 16

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-06 15:49:07 +02:00
..
amcc crypto: crypto4xx - properly set IV after de- and encrypt 2020-04-06 15:49:07 +02:00
caam A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ccp A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fmp A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
marvell A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nx A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
qat A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
qce A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sunxi-ss A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ux500 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
vmx A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
atmel-aes-regs.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
atmel-aes.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
atmel-sha-regs.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
atmel-sha.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
atmel-tdes-regs.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
atmel-tdes.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bfin_crc.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bfin_crc.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
geode-aes.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
geode-aes.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hifn_795x.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
img-hash.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ixp4xx_crypto.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mv_cesa.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mv_cesa.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mxs-dcp.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
n2_asm.S A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
n2_core.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
n2_core.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
omap-aes.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
omap-des.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
omap-sham.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
padlock-aes.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
padlock-sha.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
picoxcell_crypto_regs.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
picoxcell_crypto.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
s5p-sss.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sahara.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
talitos.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
talitos.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30