Home GnuPG

Add crypto hash SM3.

Description

Add crypto hash SM3.

* configure.ac (available_digests): Add sm3.
* src/cipher.h: Add declarations for SM3.
* cipher/Makefile.am (EXTRA_libcipher_la_SOURCES): Add sm3.c.
* cipher/md.c [USE_SM3] (digest_list): Add _gcry_digest_spec_sm3.
* cipher/pubkey-util.c (hashnames): Add "sm3".
* cipher/sm3.c: New.
* tests/basic.c (check_digests): Add test vectors for SM3.
* tests/hashtest-256g.in (algos): Add SM3.
* tests/hashtest.c (testvectors): Add for SM3.
  • GnuPG-bug-id: T3454
  • Signed-off-by: Jia Zhang <qianyue.zj@alibaba-inc.com>

Details

Provenance
jiazhangAuthored on Oct 24 2017, 8:55 AM
gniibeCommitted on Oct 24 2017, 9:18 AM
Parents
rC5b31e22d9fc5: Add new constant GCRY_MD_SM3 for crypto hash SM3.
Branches
Unknown
Tags
Unknown
Tasks
T3454: Hash SM3 support