diff options
author | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2023-01-04 12:44:06 +0200 |
---|---|---|
committer | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2023-01-04 12:52:09 +0200 |
commit | d1ccc409d4c655f695c7dc042a629a8898bd14eb (patch) | |
tree | e7573e07e6c2712875e48f2c1aca6aa7f652d6bc /doc | |
parent | f2153d797f43a5fc8b80c2d908bf7dd6ad1fcc2a (diff) | |
download | libgcrypt-d1ccc409d4c655f695c7dc042a629a8898bd14eb.tar.gz |
Add GMAC-SM4 and Poly1305-SM4
* cipher/cipher.c (cipher_list_algo301): Remove comma at the end
of last entry.
* cipher/mac-gmac.c (map_mac_algo_to_cipher): Add SM4.
(_gcry_mac_type_spec_gmac_sm4): New.
* cipher/max-internal.h (_gcry_mac_type_spec_gmac_sm4)
(_gcry_mac_type_spec_poly1305mac_sm4): New.
* cipher/mac-poly1305.c (poly1305mac_open): Add SM4.
(_gcry_mac_type_spec_poly1305mac_sm4): New.
* cipher/mac.c (mac_list, mac_list_algo401, mac_list_algo501): Add
GMAC-SM4 and Poly1304-SM4.
(mac_list_algo101): Remove comma at the end of last entry.
* cipher/md.c (digest_list_algo301): Remove comma at the end of
last entry.
* doc/gcrypt.texi: Add GCRY_MAC_GMAC_SM4 and GCRY_MAC_POLY1305_SM4.
* src/gcrypt.h.in (GCRY_MAC_GMAC_SM4, GCRY_MAC_POLY1305_SM4): New.
* tests/bench-slope.c (bench_mac_init): Setup IV for
GCRY_MAC_POLY1305_SM4.
* tests/benchmark.c (mac_bench): Likewise.
--
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/gcrypt.texi | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/gcrypt.texi b/doc/gcrypt.texi index 74615757..db4ad1e6 100644 --- a/doc/gcrypt.texi +++ b/doc/gcrypt.texi @@ -4261,6 +4261,10 @@ block cipher algorithm. This is GMAC message authentication algorithm based on the SEED block cipher algorithm. +@item GCRY_MAC_GMAC_SM4 +This is GMAC message authentication algorithm based on the SM4 +block cipher algorithm. + @item GCRY_MAC_POLY1305 This is plain Poly1305 message authentication algorithm, used with one-time key. @@ -4285,6 +4289,10 @@ key and one-time nonce. This is Poly1305-SEED message authentication algorithm, used with key and one-time nonce. +@item GCRY_MAC_POLY1305_SM4 +This is Poly1305-SM4 message authentication algorithm, used with +key and one-time nonce. + @item GCRY_MAC_GOST28147_IMIT This is MAC construction defined in GOST 28147-89 (see RFC 5830 Section 8). |