]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: inside-secure - improve the counter computation
authorAntoine Tenart <antoine.tenart@bootlin.com>
Tue, 29 May 2018 12:13:44 +0000 (14:13 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 22 Jun 2018 15:03:00 +0000 (23:03 +0800)
commit964fe8a3e60b8ae700e631d90172fb389b4a7cde
tree119f0892148c65375d207fbda5463be037a84270
parent3b2ff91462967041115b7136a984cf5dc3f5cb40
crypto: inside-secure - improve the counter computation

A counter is given to the engine when finishing hash computation. It
currently uses the blocksize while it counts the number of 64 bytes
blocks given to the engine. This works well for all algorithms so far,
as SHA1, SHA224 and SHA256 all have a blocksize of 64 bytes, but others
algorithms such as SHA512 wouldn't work.

Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/inside-secure/safexcel.h
drivers/crypto/inside-secure/safexcel_hash.c