diff options
| author | Tianjia Zhang <tianjia.zhang@linux.alibaba.com> | 2020-06-16 17:09:28 +0800 |
|---|---|---|
| committer | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2020-06-16 21:44:37 +0300 |
| commit | ddcce166ab8bc6f51f5b509bcbea13a8746384ec (patch) | |
| tree | 31d7d8338be1c2399b4dddc78be6ef0fc90ceedc /src/cipher.h | |
| parent | 6c571bfda6409d7d668f5d44cea0c6c31e2688be (diff) | |
| download | libgcrypt-ddcce166ab8bc6f51f5b509bcbea13a8746384ec.tar.gz | |
Add SM4 symmetric cipher algorithm
* cipher/Makefile.am (EXTRA_libcipher_la_SOURCES): Add sm4.c.
* cipher/cipher.c (cipher_list, cipher_list_algo301): Add
_gcry_cipher_spec_sm4.
* cipher/mac-cmac.c (map_mac_algo_to_cipher): Add cmac SM4.
(_gcry_mac_type_spec_cmac_sm4): Add cmac SM4.
* cipher/mac-internal.h: Declare spec_cmac_sm4.
* cipher/mac.c (mac_list, mac_list_algo201): Add cmac SM4.
* cipher/sm4.c: New.
* configure.ac (available_ciphers): Add sm4.
* doc/gcrypt.texi: Add SM4 document.
* src/cipher.h: Add declarations for SM4 and cmac SM4.
* src/gcrypt.h.in (gcry_cipher_algos): Add algorithm ID for SM4.
--
Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
[jk: add missing mapping in mac-cmac.c:map_mac_algo_to_cipher]
[jk: add GCRY_MAC_CMAC_SM4 to gcrypt.texi]
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Diffstat (limited to 'src/cipher.h')
| -rw-r--r-- | src/cipher.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cipher.h b/src/cipher.h index 20ccb8c5..c49bbda5 100644 --- a/src/cipher.h +++ b/src/cipher.h @@ -302,6 +302,7 @@ extern gcry_cipher_spec_t _gcry_cipher_spec_salsa20r12; extern gcry_cipher_spec_t _gcry_cipher_spec_gost28147; extern gcry_cipher_spec_t _gcry_cipher_spec_gost28147_mesh; extern gcry_cipher_spec_t _gcry_cipher_spec_chacha20; +extern gcry_cipher_spec_t _gcry_cipher_spec_sm4; /* Declarations for the digest specifications. */ extern gcry_md_spec_t _gcry_digest_spec_crc32; |
