]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: inside-secure - add support for arbitrary size hash/HMAC updates
authorPascal van Leeuwen <pvanleeuwen@insidesecure.com>
Tue, 2 Jul 2019 14:39:59 +0000 (16:39 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 26 Jul 2019 04:52:01 +0000 (14:52 +1000)
commit160c81cf3d730c305bb80ef581569cd1c151c248
treede3e58ae08893224f04b90b7245107d6382c1e6b
parent587f13ae0fb2adbb8e95bf1fcd2b1f3b5bd7c074
crypto: inside-secure - add support for arbitrary size hash/HMAC updates

This patch fixes an issue with hash and HMAC operations that perform
"large" intermediate updates (i.e. combined size > 2 hash blocks) by
actually making use of the hardware's hash continue capabilities.
The original implementation would cache these updates in a buffer that
was 2 hash blocks in size and fail if all update calls combined would
overflow that buffer. Which caused the cryptomgr extra tests to fail.

Signed-off-by: Pascal van Leeuwen <pvanleeuwen@verimatrix.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/inside-secure/safexcel.h
drivers/crypto/inside-secure/safexcel_hash.c