Re: [PATCH 2/4] crypto4xx: fix cfb and ofb "overran dst buffer" issues

2019-04-22 Thread Christian Lamparter
On 4/22/19, Sasha Levin wrote: > Hi, > > [This is an automated email] > > This commit has been processed because it contains a -stable tag. > The stable tag indicates that it's relevant for the following trees: all > > The bot has tested the following trees: v5.0.9, v4.19.36, v4.14.113, > v4.9.170

Re: [PATCH 1/4] crypto4xx: fix ctr-aes missing output IV

2019-04-22 Thread Christian Lamparter
On 4/22/19, Sasha Levin wrote: > Hi, > > [This is an automated email] > > This commit has been processed because it contains a -stable tag. > The stable tag indicates that it's relevant for the following trees: all > > The bot has tested the following trees: v5.0.9, v4.19.36, v4.14.113, > v4.9.170

Re: Crypto API AEAD question

2019-04-22 Thread Herbert Xu
On Mon, Apr 22, 2019 at 11:29:55AM +, Pascal Van Leeuwen wrote: > > Even so, for the in-place case, checking the AAD data would ensure the crypto > implementation didn't *accidentally* corrupt it ... Yes we probably should check it just in case some driver does something weird with it. Cheers

Crypto API AEAD question

2019-04-22 Thread Pascal Van Leeuwen
Hi, While debugging some AEAD issues with the inside-secure driver, I couldn't help but notice that the testmgr is NOT checking the AAD data section of the result. And when I added that check myself, I saw a lot of implementations failing on out-of-place vectors, with the poison data still present

[PATCH 1/4] crypto4xx: fix ctr-aes missing output IV

2019-04-22 Thread Christian Lamparter
Commit 8efd972ef96a ("crypto: testmgr - support checking skcipher output IV") caused the crypto4xx driver to produce the following error: | ctr-aes-ppc4xx encryption test failed (wrong output IV) | on test vector 0, cfg="in-place" This patch fixes this by reworking the crypto4xx_setkey_aes() func

[PATCH 4/4] crypto4xx: get rid of redundant using_sd variable

2019-04-22 Thread Christian Lamparter
using_sd is used as a stand-in for sa_command_0.bf.scatter that we need to set anyway, so we might as well just prevent double-accounting. Signed-off-by: Christian Lamparter --- drivers/crypto/amcc/crypto4xx_core.c | 6 ++ drivers/crypto/amcc/crypto4xx_core.h | 1 - 2 files changed, 2 insert

[PATCH 2/4] crypto4xx: fix cfb and ofb "overran dst buffer" issues

2019-04-22 Thread Christian Lamparter
Currently, crypto4xx CFB and OFB AES ciphers are failing testmgr's test vectors. |cfb-aes-ppc4xx encryption overran dst buffer on test vector 3, cfg="in-place" |ofb-aes-ppc4xx encryption overran dst buffer on test vector 1, cfg="in-place" This is because of a very subtile "bug" in the hardware th

[PATCH 3/4] crypto4xx: use sync skcipher for fallback

2019-04-22 Thread Christian Lamparter
This replaces struct crypto_skcipher and the extra request size with struct crypto_sync_skcipher and SYNC_SKCIPHER_REQUEST_ON_STACK(), which uses a fixed stack size. Signed-off-by: Christian Lamparter --- drivers/crypto/amcc/crypto4xx_alg.c | 12 ++-- drivers/crypto/amcc/crypto4xx_core.