Add crypto pubkey SM2

Tianjia Zhang tianjia.zhang at
Fri Dec 20 08:17:53 CET 2019

This new module implement the SM2 public key algorithm. It was
published by State Encryption Management Bureau, China.
List of specifications for SM2 elliptic curve public key cryptography:
GM/T 0003.1-2012
GM/T 0003.2-2012
GM/T 0003.3-2012
GM/T 0003.4-2012
GM/T 0003.5-2012
cipher/ (EXTRA_libcipher_la_SOURCES): Add sm2.c.
cipher/ecc-curves.c (domain_parms): Add sm2p256v1 for SM2.
cipher/pubkey.c [USE_SM2] (pubkey_list): Add _gcry_pubkey_spec_sm2.
cipher/sm2.c: New. (available_pubkey_ciphers): Add sm2.
src/cipher.h: Add declarations for SM2.
src/fips.c (algos): Add GCRY_PK_SM2.
src/ (gcry_pk_algos): Add algorithm ID for SM2.
tests/basic.c (check_pubkey): Add test cases for SM2.
tests/curves.c (N_CURVES): Update N_CURVES for SM2.
Signed-off-by: Tianjia Zhang tianjia.zhang at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Gcrypt-devel mailing list