diff options
author | Jia Zhang <qianyue.zj@alibaba-inc.com> | 2017-10-07 04:31:27 -0400 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2017-10-28 22:09:39 +0200 |
commit | 12ad1d142313ffcdbe61e33d10b84a51395783b8 (patch) | |
tree | 99ca929027a35336be25aac4394aa8677495b35a /m4 | |
parent | 038d1385d424bafab4c6e5e8305b6ed3121ef4e9 (diff) | |
download | gnulib-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 'm4')
-rw-r--r-- | m4/sm3.m4 | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/m4/sm3.m4 b/m4/sm3.m4 new file mode 100644 index 0000000000..fdce45c220 --- /dev/null +++ b/m4/sm3.m4 @@ -0,0 +1,15 @@ +# sm3.m4 serial 1 +dnl Copyright (C) 2017 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_SM3], +[ + dnl Prerequisites of lib/sm3.c. + AC_REQUIRE([gl_BIGENDIAN]) + + dnl Currently openssl still doesn't support sm3. + m4_divert_once([DEFAULTS], [LIB_CRYPTO=]) + AC_SUBST([LIB_CRYPTO]) +]) |