diff --git a/libcrux-ml-dsa/src/ml_dsa_44.rs b/libcrux-ml-dsa/src/ml_dsa_44.rs index 64789812..dbffc8f5 100644 --- a/libcrux-ml-dsa/src/ml_dsa_44.rs +++ b/libcrux-ml-dsa/src/ml_dsa_44.rs @@ -121,7 +121,7 @@ macro_rules! instantiate { >(&signing_key.0, message, context, randomness) } - /// Generate an ML-DSA-44 Signature (internal API) + /// Generate an ML-DSA-44 Signature (Algorithm 7 in FIPS204) /// /// The message is assumed to be domain-separated. #[cfg(feature = "acvp")] @@ -148,7 +148,7 @@ macro_rules! instantiate { >(&signing_key.0, message, randomness) } - /// Verify an ML-DSA-44 Signature (internal API) + /// Verify an ML-DSA-44 Signature (Algorithm 8 in FIPS204) /// /// The message is assumed to be domain-separated. #[cfg(feature = "acvp")] @@ -327,7 +327,7 @@ pub fn sign( >(&signing_key.0, message, context, randomness) } -/// Sign with ML-DSA 44 (internal API) +/// Sign with ML-DSA 44 (Algorithm 7 in FIPS204) /// /// Sign a `message` (assumed to be domain-separated) with the ML-DSA `signing_key`. /// @@ -356,7 +356,7 @@ pub fn sign_internal( >(&signing_key.0, message, randomness) } -/// Verify an ML-DSA-44 Signature (internal API) +/// Verify an ML-DSA-44 Signature (Algorithm 8 in FIPS204) /// /// Returns `Ok` when the `signature` is valid for the `message` (assumed to be domain-separated) and /// `verification_key`, and a [`VerificationError`] otherwise. @@ -481,8 +481,3 @@ pub fn verify_pre_hashed_shake128( MAX_ONES_IN_HINT, >(&verification_key.0, message, context, &signature.0) } - -// mod acvp { -// pub use multiplexing::sign_internal; -// pub use multiplexing::verify_internal; -// } diff --git a/libcrux-ml-dsa/src/ml_dsa_65.rs b/libcrux-ml-dsa/src/ml_dsa_65.rs index 4006dce8..a6c1da44 100644 --- a/libcrux-ml-dsa/src/ml_dsa_65.rs +++ b/libcrux-ml-dsa/src/ml_dsa_65.rs @@ -93,7 +93,7 @@ macro_rules! instantiate { verification_key: MLDSAVerificationKey(verification_key), } } - /// Generate an ML-DSA-65 Signature (internal API) + /// Generate an ML-DSA-65 Signature (Algorithm 7 in FIPS 204) /// /// The message is assumed to be domain-separated. #[cfg(feature = "acvp")] @@ -120,7 +120,7 @@ macro_rules! instantiate { >(&signing_key.0, message, randomness) } - /// Verify an ML-DSA-65 Signature (internal API) + /// Verify an ML-DSA-65 Signature (Algorithm 8 in FIPS 204) /// /// The message is assumed to be domain-separated. #[cfg(feature = "acvp")] @@ -426,7 +426,7 @@ pub fn verify_pre_hashed_shake128( MAX_ONES_IN_HINT, >(&verification_key.0, message, context, &signature.0) } -/// Sign with ML-DSA 65 (internal API) +/// Sign with ML-DSA 65 (Algorithm 7 in FIPS 204) /// /// Sign a `message` (assumed to be domain-separated) with the ML-DSA `signing_key`. /// @@ -455,7 +455,7 @@ pub fn sign_internal( >(&signing_key.0, message, randomness) } -/// Verify an ML-DSA-65 Signature (internal API) +/// Verify an ML-DSA-65 Signature (Algorithm 8 in FIPS204) /// /// Returns `Ok` when the `signature` is valid for the `message` (assumed to be domain-separated) and /// `verification_key`, and a [`VerificationError`] otherwise. diff --git a/libcrux-ml-dsa/src/ml_dsa_87.rs b/libcrux-ml-dsa/src/ml_dsa_87.rs index c820bad8..e4b3bb97 100644 --- a/libcrux-ml-dsa/src/ml_dsa_87.rs +++ b/libcrux-ml-dsa/src/ml_dsa_87.rs @@ -97,7 +97,7 @@ macro_rules! instantiate { } } - /// Generate an ML-DSA-87 Signature (internal API) + /// Generate an ML-DSA-87 Signature (Algorithm 7 in FIPS204) /// /// The message is assumed to be domain-separated. #[cfg(feature = "acvp")] @@ -124,7 +124,7 @@ macro_rules! instantiate { >(&signing_key.0, message, randomness) } - /// Verify an ML-DSA-87 Signature (internal API) + /// Verify an ML-DSA-87 Signature (Algorithm 8 in FIPS204) /// /// The message is assumed to be domain-separated. #[cfg(feature = "acvp")] @@ -431,7 +431,7 @@ pub fn verify_pre_hashed_shake128( >(&verification_key.0, message, context, &signature.0) } -/// Sign with ML-DSA 87 (internal API) +/// Sign with ML-DSA 87 (Algorithm 7 in FIPS204) /// /// Sign a `message` (assumed to be domain-separated) with the ML-DSA `signing_key`. /// @@ -460,7 +460,7 @@ pub fn sign_internal( >(&signing_key.0, message, randomness) } -/// Verify an ML-DSA-87 Signature (internal API) +/// Verify an ML-DSA-87 Signature (Algorithm 8 in FIPS204) /// /// Returns `Ok` when the `signature` is valid for the `message` (assumed to be domain-separated) and /// `verification_key`, and a [`VerificationError`] otherwise. diff --git a/libcrux-ml-dsa/src/ml_dsa_generic.rs b/libcrux-ml-dsa/src/ml_dsa_generic.rs index 68c56d26..d13930b0 100644 --- a/libcrux-ml-dsa/src/ml_dsa_generic.rs +++ b/libcrux-ml-dsa/src/ml_dsa_generic.rs @@ -420,7 +420,7 @@ pub(crate) fn sign_internal< /// This corresponds to line 6 in algorithm 7 in FIPS 204 (line 7 in algorithm /// 8, resp.). /// -/// If `domain_separatino_context` is supplied, applies domain +/// If `domain_separation_context` is supplied, applies domain /// separation and length encoding to the context string, /// before appending the message (in the regular variant) or the /// pre-hash OID as well as the pre-hashed message digest. Otherwise,