summaryrefslogtreecommitdiff
path: root/modules/crypto
diff options
context:
space:
mode:
authorJia Zhang <qianyue.zj@alibaba-inc.com>2017-10-07 04:31:27 -0400
committerBruno Haible <bruno@clisp.org>2017-10-28 22:09:39 +0200
commit12ad1d142313ffcdbe61e33d10b84a51395783b8 (patch)
tree99ca929027a35336be25aac4394aa8677495b35a /modules/crypto
parent038d1385d424bafab4c6e5e8305b6ed3121ef4e9 (diff)
downloadgnulib-12ad1d142313ffcdbe61e33d10b84a51395783b8.tar.gz
New module: crypto/sm3
This new module can be used to compute SM3 message digest of files or memory blocks according to the specification GM/T 004-2012 Cryptographic Hash Algorithm SM3, published by State Cryptography Administration, China. The official SM3 cryptographic hash algorithm specification is available at http://www.sca.gov.cn/sca/xwdt/2010-12/17/content_1002389.shtml * lib/sm3.h: Declare the APIs of sm3 module. * lib/sm3.c: Implement SM3 hash algorithm. * m4/sm3.m4: m4 file for sm3 module. * modules/crypto/sm3: Define sm3 module. * tests/test-sm3.c: Implement SM3 test case. * modules/crypto/sm3-tests: Define sm3 test module. * MODULES.html.sh: List sm3 module.
Diffstat (limited to 'modules/crypto')
-rw-r--r--modules/crypto/sm330
-rw-r--r--modules/crypto/sm3-tests11
2 files changed, 41 insertions, 0 deletions
diff --git a/modules/crypto/sm3 b/modules/crypto/sm3
new file mode 100644
index 0000000000..b620624441
--- /dev/null
+++ b/modules/crypto/sm3
@@ -0,0 +1,30 @@
+Description:
+Compute SM3 checksums.
+
+Files:
+lib/sm3.h
+lib/sm3.c
+m4/sm3.m4
+
+Depends-on:
+extern-inline
+stdalign
+stdint
+
+configure.ac:
+gl_SM3
+
+Makefile.am:
+lib_SOURCES += sm3.c
+
+Include:
+"sm3.h"
+
+Link:
+$(LIB_CRYPTO)
+
+License:
+LGPLv2+
+
+Maintainer:
+Jia Zhang
diff --git a/modules/crypto/sm3-tests b/modules/crypto/sm3-tests
new file mode 100644
index 0000000000..fac6ca6c21
--- /dev/null
+++ b/modules/crypto/sm3-tests
@@ -0,0 +1,11 @@
+Files:
+tests/test-sm3.c
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-sm3
+check_PROGRAMS += test-sm3
+test_sm3_LDADD = $(LDADD) @LIB_CRYPTO@