linux/drivers/crypto/amcc
Christian Lamparter 0f7a813740 crypto: crypto4xx - block ciphers should only accept complete blocks
The hardware automatically zero pads incomplete block ciphers
blocks without raising any errors. This is a screw-up. This
was noticed by CONFIG_CRYPTO_MANAGER_EXTRA_TESTS tests that
sent a incomplete blocks and expect them to fail.

This fixes:
cbc-aes-ppc4xx encryption unexpectedly succeeded on test vector
"random: len=2409 klen=32"; expected_error=-22, cfg="random:
may_sleep use_digest src_divs=[96.90%@+2295, 2.34%@+4066,
0.32%@alignmask+12, 0.34%@+4087, 0.9%@alignmask+1787, 0.1%@+3767]
iv_offset=6"

ecb-aes-ppc4xx encryption unexpectedly succeeded on test vector
"random: len=1011 klen=32"; expected_error=-22, cfg="random:
may_sleep use_digest src_divs=[100.0%@alignmask+20]
dst_divs=[3.12%@+3001, 96.88%@+4070]"

Cc: Eric Biggers <ebiggers@kernel.org>
Cc: stable@vger.kernel.org [4.19, 5.0 and 5.1]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2019-05-23 14:13:09 +08:00
..
crypto4xx_alg.c crypto: crypto4xx - block ciphers should only accept complete blocks 2019-05-23 14:13:09 +08:00
crypto4xx_core.c crypto: crypto4xx - block ciphers should only accept complete blocks 2019-05-23 14:13:09 +08:00
crypto4xx_core.h crypto: crypto4xx - block ciphers should only accept complete blocks 2019-05-23 14:13:09 +08:00
crypto4xx_reg_def.h crypto: crypto4xx - add prng crypto support 2019-01-11 14:16:56 +08:00
crypto4xx_sa.h crypto: crypto4xx - prepare for AEAD support 2017-10-12 22:55:19 +08:00
crypto4xx_trng.c crypto: crypto4xx - add missing of_node_put after of_device_is_available 2019-02-28 14:37:35 +08:00
crypto4xx_trng.h crypto: crypto4xx - Fix wrong ppc4xx_trng_probe()/ppc4xx_trng_remove() arguments 2019-02-01 14:42:04 +08:00
Makefile crypto: crypto4xx - move and refactor dynamic_contents helpers 2017-09-22 17:43:18 +08:00