linux-stable/drivers/crypto
Christophe Leroy adc2e1dba9 crypto: talitos - Work around SEC6 ERRATA (AES-CTR mode data size error)
[ Upstream commit 416b846757 ]

Talitos Security Engine AESU considers any input
data size that is not a multiple of 16 bytes to be an error.
This is not a problem in general, except for Counter mode
that is a stream cipher and can have an input of any size.

Test Manager for ctr(aes) fails on 4th test vector which has
a length of 499 while all previous vectors which have a 16 bytes
multiple length succeed.

As suggested by Freescale, round up the input data length to the
nearest 16 bytes.

Fixes: 5e75ae1b3c ("crypto: talitos - add new crypto modes")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-03-04 10:26:23 +01:00
..
amcc crypto: crypto4xx - Replace bitwise OR with logical OR in crypto4xx_build_pd 2020-12-30 11:51:10 +01:00
axis crypto: artpec6 - return correct error code for failed setkey() 2020-02-14 16:34:18 -05:00
bcm crypto: bcm - Rename struct device_private to bcm_device_private 2021-03-04 10:26:21 +01:00
caam crypto: caam/qi - add fallback for XTS with more than 8B IV 2020-10-29 09:57:29 +01:00
cavium crypto: cpt - don't sleep of CRYPTO_TFM_REQ_MAY_SLEEP was not specified 2020-08-19 08:16:28 +02:00
ccp crypto: ccp - fix error handling 2020-10-29 09:58:01 +01:00
ccree crypto: ccree - fix resource leak on error path 2020-08-19 08:15:55 +02:00
chelsio cxgb4/chtls/cxgbit: Keeping the max ofld immediate data size same in cxgb4 and ulds 2021-03-04 10:26:17 +01:00
hisilicon crypto: hisilicon - don't sleep of CRYPTO_TFM_REQ_MAY_SLEEP was not specified 2020-08-19 08:16:27 +02:00
inside-secure crypto: inside-secure - Fix sizeof() mismatch 2020-12-30 11:51:03 +01:00
marvell
mediatek cypto: mediatek - fix leaks in mtk_desc_ring_alloc 2020-10-29 09:57:33 +01:00
nx
qat crypto: qat - fix status check in qat_hal_put_rel_rd_xfer() 2020-12-30 11:51:07 +01:00
qce
rockchip
stm32 crypto: stm32/crc32 - fix multi-instance 2020-06-22 09:31:07 +02:00
sunxi-ss crypto: sun4i-ss - fix kmap usage 2021-03-04 10:26:19 +01:00
ux500
virtio crypto: virtio: Fix dest length calculation in __virtio_crypto_skcipher_do_req() 2020-06-17 16:40:32 +02:00
vmx crypto: vmx - reject xts inputs that are too short 2020-02-01 09:34:52 +00:00
atmel-aes-regs.h
atmel-aes.c crypto: atmel-aes - Fix counter overflow in CTR mode 2020-02-11 04:35:31 -08:00
atmel-authenc.h crypto: atmel - Fix authenc support when it is set to m 2019-12-31 16:45:12 +01:00
atmel-ecc.c
atmel-i2c.c
atmel-i2c.h
atmel-sha-regs.h
atmel-sha.c crypto: atmel-sha - fix error handling when setting hmac key 2020-02-14 16:34:18 -05:00
atmel-sha204a.c
atmel-tdes-regs.h
atmel-tdes.c
exynos-rng.c
geode-aes.c crypto: geode-aes - convert to skcipher API and make thread-safe 2020-01-17 19:48:46 +01:00
geode-aes.h crypto: geode-aes - convert to skcipher API and make thread-safe 2020-01-17 19:48:46 +01:00
hifn_795x.c
img-hash.c
ixp4xx_crypto.c crypto: ixp4xx - Fix the size used in a 'dma_free_coherent()' call 2020-10-29 09:57:31 +01:00
Kconfig crypto: atmel-i2c - select CONFIG_BITREVERSE 2020-12-30 11:51:24 +01:00
Makefile
mxs-dcp.c crypto: mxs-dcp - fix scatterlist linearization for hash 2020-04-17 10:50:16 +02:00
n2_asm.S
n2_core.c
n2_core.h
omap-aes-gcm.c
omap-aes.c crypto: omap-aes - Fix PM disable depth imbalance in omap_aes_probe 2020-12-30 11:51:10 +01:00
omap-aes.h
omap-crypto.c
omap-crypto.h
omap-des.c
omap-sham.c crypto: omap-sham - fix digcnt register handling with export/import 2020-10-29 09:57:32 +01:00
padlock-aes.c
padlock-sha.c
picoxcell_crypto.c crypto: picoxcell - Fix potential race condition bug 2020-10-29 09:57:31 +01:00
picoxcell_crypto_regs.h
qcom-rng.c
s5p-sss.c
sahara.c
talitos.c crypto: talitos - Work around SEC6 ERRATA (AES-CTR mode data size error) 2021-03-04 10:26:23 +01:00
talitos.h crypto: talitos - Work around SEC6 ERRATA (AES-CTR mode data size error) 2021-03-04 10:26:23 +01:00