crypto: ccree - refactor AEAD IV in AAD handling
authorGilad Ben-Yossef <gilad@benyossef.com>
Sun, 8 Mar 2020 15:57:09 +0000 (17:57 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 12 Mar 2020 12:00:16 +0000 (23:00 +1100)
commit0eae14a067c5b2596c5a1049561cbc86b990c7ce
treec9b3dc666ab2d371b31830089c292d191cc5729b
parentb66c1876a756d074965d87c026ca19ff2277280f
crypto: ccree - refactor AEAD IV in AAD handling

Our handling of ciphers with IV trailing the AAD was correct
but overly complicated. Refactor to simplify and possibly
save one DMA burst.

This has the added bonus of behaving the same as the generic
rfc4543 implementation for none compliants inputs where the
IV in the iv field was not the same as the IV in the AAD.

There should be no change in behaviour with correct inputs.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccree/cc_aead.c
drivers/crypto/ccree/cc_aead.h
drivers/crypto/ccree/cc_buffer_mgr.c