]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: crypto4xx - perform aead icv check in the driver
authorChristian Lamparter <chunkeey@gmail.com>
Sat, 23 Dec 2017 18:45:46 +0000 (19:45 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 5 Jan 2018 07:43:05 +0000 (18:43 +1100)
commit6e26c0173e65a91bd857cd09858046e22b67c7c8
treee88daaaf068485ef8dea37c5e3040eb4a6b593f5
parentec984883e177f3a3ddc59d5eb0ba40b0bfba7a81
crypto: crypto4xx - perform aead icv check in the driver

The ccm-aes-ppc4xx now fails one of testmgr's expected
failure test cases as such:

|decryption failed on test 10 for ccm-aes-ppc4xx:
|ret was 0, |expected -EBADMSG

It doesn't look like the hardware sets the authentication failure
flag. The original vendor source from which this was ported does
not have any special code or notes about why this would happen or
if there are any WAs.

Hence, this patch converts the aead_done callback handler to
perform the icv check in the driver. And this fixes the false
negative and the ccm-aes-ppc4xx passes the selftests once again.

|name         : ccm(aes)
|driver       : ccm-aes-ppc4xx
|module       : crypto4xx
|priority     : 300
|refcnt       : 1
|selftest     : passed
|internal     : no
|type         : aead
|async        : yes
|blocksize    : 1
|ivsize       : 16
|maxauthsize  : 16
|geniv        : <none>

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/amcc/crypto4xx_alg.c
drivers/crypto/amcc/crypto4xx_core.c