Add OSCCA SM3 secure hash generic hash algorithm, described
in OSCCA GM/T 0004-2012 SM3.
Tianjia Zhang (4):
Add OSCCA SM3 hash algorithm
testsuite: add test for SM3 hash function
hmac: add support for SM3 hash function
nettle-benchmark: bench SM3 hashes
Makefile.in | 7
Add a testuite for SM3 hash function. Test vectors are based on:
https://datatracker.ietf.org/doc/html/draft-shen-sm3-hash-01
Signed-off-by: Tianjia Zhang
---
testsuite/.gitignore | 1 +
testsuite/Makefile.in | 2 +-
testsuite/sm3-test.c | 20
3 files changed, 22 inserti
Add OSCCA SM3 secure hash (OSCCA GM/T 0004-2012 SM3) generic
hash transformation.
Signed-off-by: Tianjia Zhang
---
Makefile.in| 3 +-
nettle-meta-hashes.c | 1 +
nettle-meta.h | 1 +
sm3-meta.c | 41 ++
sm3.c | 25
Signed-off-by: Tianjia Zhang
---
examples/nettle-benchmark.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/nettle-benchmark.c b/examples/nettle-benchmark.c
index 50a5815a..ba5dd284 100644
--- a/examples/nettle-benchmark.c
+++ b/examples/nettle-benchmark.c
@@ -909,7
Add support for calculating HMAC using SM3 hash functions.
Signed-off-by: Tianjia Zhang
---
Makefile.in | 4 +--
hmac-sm3-meta.c | 47 +++
hmac-sm3.c| 59 +++
hmac.h| 19 +