path: root/drivers/crypto/amcc/crypto4xx_core.h
diff options
authorChristian Lamparter <chunkeey@gmail.com>2019-04-22 13:25:59 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2019-05-03 14:03:29 +0800
commit7e92e1717e3eaf6b322c252947c696b3059f05be (patch)
treeb3cae93392b87a41f5db49d90cb63b89d12b10a3 /drivers/crypto/amcc/crypto4xx_core.h
parent25baaf8e2c93197d063b372ef7b62f2767c7ac0b (diff)
crypto: crypto4xx - fix cfb and ofb "overran dst buffer" issues
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 that gets indirectly mentioned in Encryption/Decryption of the hardware spec: the OFB and CFB modes for AES are listed there as operation modes for >>> "Block ciphers" <<<. Which kind of makes sense, but we would like them to be considered as stream ciphers just like the CTR mode. To workaround this issue and stop the hardware from causing "overran dst buffer" on crypttexts that are not a multiple of 16 (AES_BLOCK_SIZE), we force the driver to use the scatter buffers as the go-between. As a bonus this patch also kills redundant pd_uinfo->num_gd and pd_uinfo->num_sd setters since the value has already been set before. Cc: stable@vger.kernel.org Fixes: f2a13e7cba9e ("crypto: crypto4xx - enable AES RFC3686, ECB, CFB and OFB offloads") Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/amcc/crypto4xx_core.h')
0 files changed, 0 insertions, 0 deletions