Home GnuPG

Add missing BLAKE2, SM3 and GOSTR3411_CP to MAC-HMAC interface

Description

Add missing BLAKE2, SM3 and GOSTR3411_CP to MAC-HMAC interface

* cipher/mac-hmac.c (map_mac_algo_to_md): Add GOSTR3411_CP, BLAKE2 and
SM3.
(_gcry_mac_type_spec_hmac_gost3411_cp)
(_gcry_mac_type_spec_hmac_blake2b_512)
(_gcry_mac_type_spec_hmac_blake2b_384)
(_gcry_mac_type_spec_hmac_blake2b_256)
(_gcry_mac_type_spec_hmac_blake2b_160)
(_gcry_mac_type_spec_hmac_blake2s_256)
(_gcry_mac_type_spec_hmac_blake2s_224)
(_gcry_mac_type_spec_hmac_blake2s_160)
(_gcry_mac_type_spec_hmac_blake2s_128)
(_gcry_mac_type_spec_hmac_sm3): New.
* cipher/mac-internal.h (_gcry_mac_type_spec_hmac_gost3411_cp)
(_gcry_mac_type_spec_hmac_blake2b_512)
(_gcry_mac_type_spec_hmac_blake2b_384)
(_gcry_mac_type_spec_hmac_blake2b_256)
(_gcry_mac_type_spec_hmac_blake2b_160)
(_gcry_mac_type_spec_hmac_blake2s_256)
(_gcry_mac_type_spec_hmac_blake2s_224)
(_gcry_mac_type_spec_hmac_blake2s_160)
(_gcry_mac_type_spec_hmac_blake2s_128)
(_gcry_mac_type_spec_hmac_sm3): New.
* cipher/mac.c (mac_list): Add GOSTR3411_CP, BLAKE2 and SM3.
* src/gcrypt.h.in (GCRY_MAC_HMAC_GOSTR3411_CP)
(GCRY_MAC_HMAC_BLAKE2B_512, GCRY_MAC_HMAC_BLAKE2B_384)
(GCRY_MAC_HMAC_BLAKE2B_256, GCRY_MAC_HMAC_BLAKE2B_160)
(GCRY_MAC_HMAC_BLAKE2S_256, GCRY_MAC_HMAC_BLAKE2S_224)
(GCRY_MAC_HMAC_BLAKE2S_160, GCRY_MAC_HMAC_BLAKE2S_128)
(GCRY_MAC_HMAC_SM3): New.
  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Apr 10 2018, 9:03 PM
Parents
rC0de2a22fcf66: random: Protect another use of jent_rng_collector.
Branches
Unknown
Tags
Unknown