]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
crypto: ccp - fix AES CFB error exposed by new test vectors
authorHook, Gary <Gary.Hook@amd.com>
Tue, 14 May 2019 21:53:23 +0000 (21:53 +0000)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 05:29:37 +0000 (00:29 -0500)
commitdd51b599d6b5dde445e29b62ed76c5e04519d5dd
treefc3a2547472289446cc0d9b258d23ee8b22b8a04
parent913f03ad2104f934aa09f151029132271ab807a0
crypto: ccp - fix AES CFB error exposed by new test vectors

BugLink: https://bugs.launchpad.net/bugs/1863019
[ Upstream commit c3b359d6567c0b8f413e924feb37cf025067d55a ]

Updated testmgr will exhibit this error message when loading the
ccp-crypto module:

alg: skcipher: cfb-aes-ccp encryption failed with err -22 on test vector 3, cfg="in-place"

Update the CCP crypto driver to correctly treat CFB as a streaming mode
cipher (instead of block mode). Update the configuration for CFB to
specify the block size as a single byte;

Fixes: 2b789435d7f3 ('crypto: ccp - CCP AES crypto API support')
Signed-off-by: Gary R Hook <gary.hook@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/crypto/ccp/ccp-crypto-aes.c