]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: ccree - read next IV from HW
authorGilad Ben-Yossef <gilad@benyossef.com>
Thu, 18 Apr 2019 13:38:44 +0000 (16:38 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 25 Apr 2019 07:38:13 +0000 (15:38 +0800)
commit6dfa297db786c86bdb6a0291cbf460a31560b0a1
tree283517d625c83643a459773d6abb5e02db4d14b8
parent222af907e75d17b34f02ba66ec71f1a322a1a2fb
crypto: ccree - read next IV from HW

We were computing the next IV in software instead of reading it from HW
on the premise that this can be quicker due to the small size of IVs but
this proved to be much more hassle and bug ridden than expected.

Move to reading the next IV as computed by the HW.

This fixes a number of issue with next IV being wrong for OFB, CTS-CBC
and probably most of the other ciphers as well.

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