From bb31895d87a57e7bb1d3f0939edc53d674094ea4 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Tue, 13 Aug 2019 10:20:05 +0200 Subject: [PATCH] Rename the hash implementations KMAC{128,256} to KECCAK_KMAC{128,256} This avoids getting them confused with the MAC implementations. Reviewed-by: Matt Caswell Reviewed-by: Shane Lontis (Merged from https://github.com/openssl/openssl/pull/8877) --- providers/common/macs/kmac_prov.c | 4 ++-- providers/default/defltprov.c | 8 ++++---- providers/fips/fipsprov.c | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/providers/common/macs/kmac_prov.c b/providers/common/macs/kmac_prov.c index f841bdae69..c384cb4e7d 100644 --- a/providers/common/macs/kmac_prov.c +++ b/providers/common/macs/kmac_prov.c @@ -203,12 +203,12 @@ static void *kmac_fetch_new(void *provctx, const char *mdname) static void *kmac128_new(void *provctx) { - return kmac_fetch_new(provctx, "KMAC128"); + return kmac_fetch_new(provctx, "KECCAK_KMAC128"); } static void *kmac256_new(void *provctx) { - return kmac_fetch_new(provctx, "KMAC256"); + return kmac_fetch_new(provctx, "KECCAK_KMAC256"); } static void *kmac_dup(void *vsrc) diff --git a/providers/default/defltprov.c b/providers/default/defltprov.c index 0897557f47..535c05252a 100644 --- a/providers/default/defltprov.c +++ b/providers/default/defltprov.c @@ -66,11 +66,11 @@ static const OSSL_ALGORITHM deflt_digests[] = { { "SHA3-512", "default=yes", sha3_512_functions }, /* - * KMAC128 and KMAC256 as hashes are mostly useful for the MACs with the - * same names + * KECCAK_KMAC128 and KECCAK_KMAC256 as hashes are mostly useful for + * the KMAC128 and KMAC256. */ - { "KMAC128", "default=yes", keccak_kmac_128_functions }, - { "KMAC256", "default=yes", keccak_kmac_256_functions }, + { "KECCAK_KMAC128", "default=yes", keccak_kmac_128_functions }, + { "KECCAK_KMAC256", "default=yes", keccak_kmac_256_functions }, { "SHAKE128", "default=yes", shake_128_functions }, { "SHAKE256", "default=yes", shake_256_functions }, diff --git a/providers/fips/fipsprov.c b/providers/fips/fipsprov.c index 9eb3520a6f..d2d3e6044a 100644 --- a/providers/fips/fipsprov.c +++ b/providers/fips/fipsprov.c @@ -253,11 +253,11 @@ static const OSSL_ALGORITHM fips_digests[] = { { "SHA3-384", "fips=yes", sha3_384_functions }, { "SHA3-512", "fips=yes", sha3_512_functions }, /* - * KMAC128 and KMAC256 as hashes are mostly useful for the MACs with the - * same names + * KECCAK_KMAC128 and KECCAK_KMAC256 as hashes are mostly useful for + * the KMAC128 and KMAC256. */ - { "KMAC128", "fips=yes", keccak_kmac_128_functions }, - { "KMAC256", "fips=yes", keccak_kmac_256_functions }, + { "KECCAK_KMAC128", "fips=yes", keccak_kmac_128_functions }, + { "KECCAK_KMAC256", "fips=yes", keccak_kmac_256_functions }, { NULL, NULL, NULL } }; -- 2.25.1