crypto: sm3 - create SM3 stand-alone library
authorTianjia Zhang <tianjia.zhang@linux.alibaba.com>
Fri, 7 Jan 2022 12:06:55 +0000 (20:06 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 28 Jan 2022 05:51:10 +0000 (16:51 +1100)
commiteb90686d5d10fef9cadd9c0eb30f3fee66d2b2a5
treecde8ab5fdcd6712014a4d2e869210825bebc3b83
parent68ce6126e11364dd5b3a5c5113b4285c56d8d249
crypto: sm3 - create SM3 stand-alone library

Stand-alone implementation of the SM3 algorithm. It is designed
to have as little dependencies as possible. In other cases you
should generally use the hash APIs from include/crypto/hash.h.
Especially when hashing large amounts of data as those APIs may
be hw-accelerated. In the new SM3 stand-alone library,
sm3_transform() has also been optimized, instead of simply using
the code in sm3_generic.

Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Reviewed-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
include/crypto/sm3.h
lib/crypto/Kconfig
lib/crypto/Makefile
lib/crypto/sm3.c [new file with mode: 0644]