From a8956e22d96f37bc15d63a53e285940138dc84ac Mon Sep 17 00:00:00 2001 From: Pauli Date: Wed, 22 Jan 2025 13:09:19 +1100 Subject: [PATCH] ml-dsa: add to FIPS provider Reviewed-by: Tim Hudson Reviewed-by: Shane Lontis Reviewed-by: Viktor Dukhovni (Merged from https://github.com/openssl/openssl/pull/26548) --- crypto/ml_dsa/build.info | 1 + providers/fips/fipsprov.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/crypto/ml_dsa/build.info b/crypto/ml_dsa/build.info index c83c20cc7f8..eb6a16dec69 100644 --- a/crypto/ml_dsa/build.info +++ b/crypto/ml_dsa/build.info @@ -6,4 +6,5 @@ $COMMON=ml_dsa_encoders.c ml_dsa_key_compress.c ml_dsa_key.c \ IF[{- !$disabled{'ml_dsa'} -}] SOURCE[../../libcrypto]=$COMMON + SOURCE[../../providers/libfips.a]=$COMMON ENDIF diff --git a/providers/fips/fipsprov.c b/providers/fips/fipsprov.c index 58a14a9102e..19771eddc28 100644 --- a/providers/fips/fipsprov.c +++ b/providers/fips/fipsprov.c @@ -542,6 +542,14 @@ static const OSSL_ALGORITHM fips_keymgmt[] = { PROV_DESCS_ED448 }, # endif #endif +#ifndef OPENSSL_NO_ML_DSA + { PROV_NAMES_ML_DSA_44, FIPS_DEFAULT_PROPERTIES, ossl_ml_dsa_44_keymgmt_functions, + PROV_DESCS_ML_DSA_44 }, + { PROV_NAMES_ML_DSA_65, FIPS_DEFAULT_PROPERTIES, ossl_ml_dsa_65_keymgmt_functions, + PROV_DESCS_ML_DSA_65 }, + { PROV_NAMES_ML_DSA_87, FIPS_DEFAULT_PROPERTIES, ossl_ml_dsa_87_keymgmt_functions, + PROV_DESCS_ML_DSA_87 }, +#endif /* OPENSSL_NO_ML_DSA */ { PROV_NAMES_TLS1_PRF, FIPS_DEFAULT_PROPERTIES, ossl_kdf_keymgmt_functions, PROV_DESCS_TLS1_PRF_SIGN }, { PROV_NAMES_HKDF, FIPS_DEFAULT_PROPERTIES, ossl_kdf_keymgmt_functions, -- 2.47.2