summaryrefslogtreecommitdiffstats
path: root/providers
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2019-10-04 11:50:49 +0100
committerMatt Caswell <matt@openssl.org>2019-11-21 15:45:37 +0000
commitcc35c3ed8ffdc07bb53a2908b8a186fd866ac8d5 (patch)
tree812883483feb00ebe5aa217bdd4ed4a3d90c86b3 /providers
parentab5c77b4766e0992751d86560193ca42b49cf316 (diff)
Tweak some algorithm naming inconsistencies
Make some algorithms names better match our "canonical" style. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10092)
Diffstat (limited to 'providers')
-rw-r--r--providers/defltprov.c27
-rw-r--r--providers/fips/fipsprov.c10
-rw-r--r--providers/legacyprov.c4
3 files changed, 22 insertions, 19 deletions
diff --git a/providers/defltprov.c b/providers/defltprov.c
index ceb3fd0896..354c7a4a6d 100644
--- a/providers/defltprov.c
+++ b/providers/defltprov.c
@@ -73,6 +73,9 @@ static int deflt_get_params(const OSSL_PROVIDER *prov, OSSL_PARAM params[])
* We add diverse other names where applicable, such as the names that
* NIST uses, or that are used for ASN.1 OBJECT IDENTIFIERs, or names
* we have used historically.
+ *
+ * Algorithm names are case insensitive, but we use all caps in our "canonical"
+ * names for consistency.
*/
static const OSSL_ALGORITHM deflt_digests[] = {
/* Our primary name:NIST name[:our older names] */
@@ -93,11 +96,11 @@ static const OSSL_ALGORITHM deflt_digests[] = {
{ "SHA3-512", "default=yes", sha3_512_functions },
/*
- * KECCAK_KMAC128 and KECCAK_KMAC256 as hashes are mostly useful for
- * the KMAC128 and KMAC256.
+ * KECCAK-KMAC-128 and KECCAK-KMAC-256 as hashes are mostly useful for
+ * the KMAC-128 and KMAC-256.
*/
- { "KECCAK_KMAC128", "default=yes", keccak_kmac_128_functions },
- { "KECCAK_KMAC256", "default=yes", keccak_kmac_256_functions },
+ { "KECCAK-KMAC-128:KECCAK-KMAC128", "default=yes", keccak_kmac_128_functions },
+ { "KECCAK-KMAC-256:KECCAK-KMAC256", "default=yes", keccak_kmac_256_functions },
/* Our primary name:NIST name */
{ "SHAKE-128:SHAKE128", "default=yes", shake_128_functions },
@@ -111,8 +114,8 @@ static const OSSL_ALGORITHM deflt_digests[] = {
* If we assume that "2b" and "2s" are versions, that pattern
* fits with ours. We also add our historical names.
*/
- { "BLAKE2s-256:BLAKE2s256", "default=yes", blake2s256_functions },
- { "BLAKE2b-512:BLAKE2b512", "default=yes", blake2b512_functions },
+ { "BLAKE2S-256:BLAKE2s256", "default=yes", blake2s256_functions },
+ { "BLAKE2B-512:BLAKE2b512", "default=yes", blake2b512_functions },
#endif /* OPENSSL_NO_BLAKE2 */
#ifndef OPENSSL_NO_SM3
@@ -314,21 +317,21 @@ static const OSSL_ALGORITHM deflt_ciphers[] = {
static const OSSL_ALGORITHM deflt_macs[] = {
#ifndef OPENSSL_NO_BLAKE2
- { "BLAKE2bMAC", "default=yes", blake2bmac_functions },
- { "BLAKE2sMAC", "default=yes", blake2smac_functions },
+ { "BLAKE2BMAC", "default=yes", blake2bmac_functions },
+ { "BLAKE2SMAC", "default=yes", blake2smac_functions },
#endif
#ifndef OPENSSL_NO_CMAC
{ "CMAC", "default=yes", cmac_functions },
#endif
{ "GMAC", "default=yes", gmac_functions },
{ "HMAC", "default=yes", hmac_functions },
- { "KMAC128", "default=yes", kmac128_functions },
- { "KMAC256", "default=yes", kmac256_functions },
+ { "KMAC-128:KMAC128", "default=yes", kmac128_functions },
+ { "KMAC-256:KMAC256", "default=yes", kmac256_functions },
#ifndef OPENSSL_NO_SIPHASH
- { "SipHash", "default=yes", siphash_functions },
+ { "SIPHASH", "default=yes", siphash_functions },
#endif
#ifndef OPENSSL_NO_POLY1305
- { "Poly1305", "default=yes", poly1305_functions },
+ { "POLY1305", "default=yes", poly1305_functions },
#endif
{ NULL, NULL, NULL }
};
diff --git a/providers/fips/fipsprov.c b/providers/fips/fipsprov.c
index 05e5dd4a49..a12163fa97 100644
--- a/providers/fips/fipsprov.c
+++ b/providers/fips/fipsprov.c
@@ -349,11 +349,11 @@ static const OSSL_ALGORITHM fips_digests[] = {
{ "SHA3-384", "fips=yes", sha3_384_functions },
{ "SHA3-512", "fips=yes", sha3_512_functions },
/*
- * KECCAK_KMAC128 and KECCAK_KMAC256 as hashes are mostly useful for
+ * KECCAK-KMAC-128 and KECCAK-KMAC-256 as hashes are mostly useful for
* KMAC128 and KMAC256.
*/
- { "KECCAK_KMAC128", "fips=yes", keccak_kmac_128_functions },
- { "KECCAK_KMAC256", "fips=yes", keccak_kmac_256_functions },
+ { "KECCAK-KMAC-128:KECCAK-KMAC128", "fips=yes", keccak_kmac_128_functions },
+ { "KECCAK-KMAC-256:KECCAK-KMAC256", "fips=yes", keccak_kmac_256_functions },
{ NULL, NULL, NULL }
};
@@ -402,8 +402,8 @@ static const OSSL_ALGORITHM fips_macs[] = {
#endif
{ "GMAC", "fips=yes", gmac_functions },
{ "HMAC", "fips=yes", hmac_functions },
- { "KMAC128", "fips=yes", kmac128_functions },
- { "KMAC256", "fips=yes", kmac256_functions },
+ { "KMAC-128:KMAC128", "fips=yes", kmac128_functions },
+ { "KMAC-256:KMAC256", "fips=yes", kmac256_functions },
{ NULL, NULL, NULL }
};
diff --git a/providers/legacyprov.c b/providers/legacyprov.c
index 11a050e203..5937328638 100644
--- a/providers/legacyprov.c
+++ b/providers/legacyprov.c
@@ -68,11 +68,11 @@ static const OSSL_ALGORITHM legacy_digests[] = {
#endif /* OPENSSL_NO_MDC2 */
#ifndef OPENSSL_NO_WHIRLPOOL
- { "whirlpool", "legacy=yes", wp_functions },
+ { "WHIRLPOOL", "legacy=yes", wp_functions },
#endif /* OPENSSL_NO_WHIRLPOOL */
#ifndef OPENSSL_NO_RMD160
- { "RIPEMD160:RIPEMD:RMD160", "legacy=yes", ripemd160_functions },
+ { "RIPEMD-160:RIPEMD160:RIPEMD:RMD160", "legacy=yes", ripemd160_functions },
#endif /* OPENSSL_NO_RMD160 */
{ NULL, NULL, NULL }