summaryrefslogtreecommitdiffstats
path: root/providers
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2020-08-11 14:54:18 +0100
committerPauli <paul.dale@oracle.com>2020-08-29 17:40:10 +1000
commitb27b31b62846d21a915acfd45c92ba82d3cd5666 (patch)
tree5f8af27467cf8fd638646925980e5218dbf2244a /providers
parent6f0bd6ca1c675503962e4580e54ceecd078a8331 (diff)
Extend the provider MAC bridge for SIPHASH
The previous commits added support for HMAC into the provider MAC bridge. We now extend that for SIPHASH too. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/12637)
Diffstat (limited to 'providers')
-rw-r--r--providers/defltprov.c2
-rw-r--r--providers/implementations/include/prov/implementations.h1
-rw-r--r--providers/implementations/signature/mac_legacy.c4
3 files changed, 6 insertions, 1 deletions
diff --git a/providers/defltprov.c b/providers/defltprov.c
index c5b3407894..aaf1cfe6b0 100644
--- a/providers/defltprov.c
+++ b/providers/defltprov.c
@@ -365,6 +365,7 @@ static const OSSL_ALGORITHM deflt_signature[] = {
{ "ECDSA", "provider=default", ecdsa_signature_functions },
#endif
{ "HMAC", "provider=default", mac_hmac_signature_functions },
+ { "SIPHASH", "provider=default", mac_siphash_signature_functions },
{ NULL, NULL, NULL }
};
@@ -394,6 +395,7 @@ static const OSSL_ALGORITHM deflt_keymgmt[] = {
{ "HKDF", "provider=default", kdf_keymgmt_functions },
{ "SCRYPT:id-scrypt", "provider=default", kdf_keymgmt_functions },
{ "HMAC", "provider=default", mac_keymgmt_functions },
+ { "SIPHASH", "provider=default", mac_keymgmt_functions },
{ NULL, NULL, NULL }
};
diff --git a/providers/implementations/include/prov/implementations.h b/providers/implementations/include/prov/implementations.h
index d975226fb5..7c6412ceb5 100644
--- a/providers/implementations/include/prov/implementations.h
+++ b/providers/implementations/include/prov/implementations.h
@@ -296,6 +296,7 @@ extern const OSSL_DISPATCH ed25519_signature_functions[];
extern const OSSL_DISPATCH ed448_signature_functions[];
extern const OSSL_DISPATCH ecdsa_signature_functions[];
extern const OSSL_DISPATCH mac_hmac_signature_functions[];
+extern const OSSL_DISPATCH mac_siphash_signature_functions[];
/* Asym Cipher */
extern const OSSL_DISPATCH rsa_asym_cipher_functions[];
diff --git a/providers/implementations/signature/mac_legacy.c b/providers/implementations/signature/mac_legacy.c
index 67acea3288..bb3bf5b55d 100644
--- a/providers/implementations/signature/mac_legacy.c
+++ b/providers/implementations/signature/mac_legacy.c
@@ -70,6 +70,7 @@ static void *mac_newctx(void *provctx, const char *propq, const char *macname)
}
MAC_NEWCTX(hmac, "HMAC")
+MAC_NEWCTX(siphash, "SIPHASH")
static int mac_digest_sign_init(void *vpmacctx, const char *mdname, void *vkey)
{
@@ -176,4 +177,5 @@ static void *mac_dupctx(void *vpmacctx)
{ 0, NULL } \
};
-MAC_SIGNATURE_FUNCTIONS(hmac) \ No newline at end of file
+MAC_SIGNATURE_FUNCTIONS(hmac)
+MAC_SIGNATURE_FUNCTIONS(siphash)