]> git.itanic.dy.fi Git - linux-stable/commit
crypto: crypto4xx - extend aead fallback checks
authorChristian Lamparter <chunkeey@gmail.com>
Thu, 19 Apr 2018 16:41:56 +0000 (18:41 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 28 Apr 2018 08:09:44 +0000 (16:09 +0800)
commit584201f1895d915c1aa523bc86afdc126e94beca
treefbe7066e9b1c0f1cb3bc9d39669c9772a9df3686
parentfc340115ffb8235c1bbd200c28855e6373d0dd1a
crypto: crypto4xx - extend aead fallback checks

1020 bytes is the limit for associated data. Any more
and it will no longer fit into hash_crypto_offset anymore.

The hardware will not process aead requests with plaintext
that have less than AES_BLOCK_SIZE bytes. When decrypting
aead requests the authsize has to be taken in account as
well, as it is part of the cryptlen. Otherwise the hardware
will think it has been misconfigured and will return:

aead return err status = 0x98

For rtc4543(gcm(aes)), the hardware has a dedicated GMAC
mode as part of the hash function set.

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