THALES GROUP LIMITED DISTRIBUTION to email recipients
Hi
Can NIST CTG clarify the scope of the following statement in Algorithm 7, ML-DSA.Sign_internal (step 6) from FIPS 204 please?
“message representation that may optionally be computed in a different cryptographic module.”
There are some IETF discussion where companies have read the presence of this statement in Algorithm 7 as saying that the ‘mu’ (i.e. (H(BytesToBits(𝑡𝑟)||𝑀′ , 64))) can in its entirety be calculated outside the boundary of a valid ML-DSA implementation. This matters to all implementations but in particular to FIPS 140-3 validated modules where it impacts what interfaces a module may be permitted (or expected) to support.
If mu is permitted to be calculated outside the boundary of an implementation, this would seem to be flawed in that it leaves no option for the ML_DSA implementation to check the content of M’. i.e. has the OID been included, is CTS<255, is the hash length sensible for the listed OID etc.
Our own interpretation is that the statement in Algorithm 7 ONLY relates to M’ calculated in Algorithm 4, ML-DSA.Sign_external (step 6) and consumed by Algorithm 7 on step 6. The standard clarifies in section 5.4.1: “𝑀′ may be constructed outside of the cryptographic module that performs ML-DSA.Verify_internal. However, in the case of HashML-DSA , the hash or XOF of the content must be computed within a FIPS 140-validated cryptographic module, which may be a different cryptographic module than the one that performs ML-DSA.Verify_internal.”.
The same question also applies to Algorithm 8, ML-DSA.Verify_internal and the same statement against step 7 for calculation of mu.
Clarification by the standards authors for both the sign and verify cases would be much appreciated to understand if we need to support interfaces to import M’ exclusively or also mu.
Kind Regards,
Graham.
--
You received this message because you are subscribed to the Google Groups "pqc-forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pqc-forum+...@list.nist.gov.
To view this discussion visit https://groups.google.com/a/list.nist.gov/d/msgid/pqc-forum/PR0P264MB4057EA576559008E1DC2B83399592%40PR0P264MB4057.FRAP264.PROD.OUTLOOK.COM.
THALES GROUP LIMITED DISTRIBUTION to email recipients
That was a question about CAVP Ben answered. Ben isn’t part of the NIST CTG group responsible for the standards. I think it’s still a legitimate question on what the FIPS 204 authors intended that I’ve not seen authoritively answered.
The main goal behind external hashing is to allow hashing at source. That is achieved based on the allowance against M’.
THALES GROUP LIMITED DISTRIBUTION to email recipients
Ref: Eratta, Dustin said in an earlier post that NIST don’t intend to update FIPS 204 for 5 years. Instead, they’ve posted a spreadsheet alongside it that contains clarifications and correction.
https://csrc.nist.gov/files/pubs/fips/204/final/docs/fips-204-potential-updates.xlsx
Since the spreadsheet states as one of it’s roles that is contains: “Potential corrections attempt to remove ambiguity and improve interpretation of the document.” That would seem the place to formally record the answer to this question once sorted out. Sorry for any confusion!
Hi.
I’m not sure if this is off-topic for this thread, but I want to point out that computing mu requires knowledge of the public key hash tr.
ML-DSA.Sign_internal(sk, M’, rnd) pulls tr out of sk, no problem. But if you are doing the mu pre-hash on the client side as a performance optimization, then where it is getting tr from? Either the client / driver needs to make a network call to the HSM to fetch tr (which completely negates the performance gain of local hashing), or you need a different interface that passes in tr along with the message to be hashed (the security implications of this sentence probably make David Cooper uncomfortable since now it’s possible to mismatch pk and sk). I think we should be encouraging implementers to think of this as “a step that uses the public key to compute mu” and “a step that uses the secret key to sign, starting from mu”.
It's unfortunate that this is all buried in an in-line comment on line 6 of algorithm 7, because this is actually fairly tricky and the ExternalMu “mode” deserves to be written out as a full standalone algorithm with its own implementation and security considerations. We are attempting to do so in the IETF LAMPS ML-DSA specification [2]
[1]: https://mailarchive.ietf.org/arch/msg/spasm/LjmIsUE3tgTiV2Z1Us_CgQfFvLw/
[2]: editor’s copy on github since this is not officially posted yet: https://lamps-wg.github.io/dilithium-certificates/draft-ietf-lamps-dilithium-certificates.html#name-pre-hashed-mode-externalmu-
---
Mike Ounsworth
From: 'David A. Cooper' via pqc-forum <pqc-...@list.nist.gov>
Sent: Tuesday, November 19, 2024 2:53 PM
To: pqc-forum <pqc-...@list.nist.gov>
Subject: [EXTERNAL] Re: [pqc-forum] External calculation of M' vs mu in FIPS 204.
We agree with Ben Livelsberger's assessment in https: //urldefense. com/v3/__https: //groups. google. com/a/list. nist. gov/g/pqc-forum/c/HXhRTjshe5E/m/mkkFd7zcAwAJ__;!!FJ-Y8qCqXTj2!e4N3kGnxZWWITWCJu1CYCnmy8BHUSLCmm6OqqK4DZQLuzRSQEVXV4aOoQyQMNn0uSD29FpFX2pMT_GbD6CwQANQIPOY5$.
We agree with Ben Livelsberger's assessment in
A cryptographic module that implements ML-DSA signing and/or
verification may take mu as input rather than M or M'. A cryptographic
module may be designed to accept either M' or mu as input, but does not
need to support both. (A cryptographic module may alternatively be
designed to accept M as input, but ideally would be able to accept M' as
input for testing purposes.)
As mu is computed as SHAKE256(....), this computation needs to be
performed within a validated cryptographic module that has a validated
implementation of SHAKE256. However, it is not the responsibility of the
module that implements ML-DSA to ensure that the external computation
was performed in an approved manner.
While there is nothing in FIPS 204 that would prevent mu from being
provided by an application, this is something that we would discourage.
Similar to the discussion about pre-hashing in
it would be preferable for the application to use a cryptographic
library that accepts the message as input. The cryptographic library
would then be responsible for constructing M' and then calling the
appropriate cryptographic modules to compute mu and then the signature.
This seems to be what the designers of the PKCS #11 interface have in
mind
(https://urldefense.com/v3/__https://mailarchive.ietf.org/arch/msg/spasm/tNt8T_2JzKLaYEm14sjAzfJgF8s/__;!!FJ-Y8qCqXTj2!e4N3kGnxZWWITWCJu1CYCnmy8BHUSLCmm6OqqK4DZQLuzRSQEVXV4aOoQyQMNn0uSD29FpFX2pMT_GbD6CwQALnfD9ZD$,
https://urldefense.com/v3/__https://mailarchive.ietf.org/arch/msg/spasm/35aGThc78ekJ-RUn_UFBjEBllW8/__;!!FJ-Y8qCqXTj2!e4N3kGnxZWWITWCJu1CYCnmy8BHUSLCmm6OqqK4DZQLuzRSQEVXV4aOoQyQMNn0uSD29FpFX2pMT_GbD6CwQAIS8-eNN$,
https://urldefense.com/v3/__https://mailarchive.ietf.org/arch/msg/spasm/7VbkjoMyjzjULvkv4MfV-n2ruTE/__;!!FJ-Y8qCqXTj2!e4N3kGnxZWWITWCJu1CYCnmy8BHUSLCmm6OqqK4DZQLuzRSQEVXV4aOoQyQMNn0uSD29FpFX2pMT_GbD6CwQAAgEwvMR$).
>>> https://urldefense.com/v3/__https://groups.google.com/a/list.nist.gov/d/msgid/pqc-forum/PR0P264MB4057EA576559008E1DC2B83399592*40PR0P264MB4057.FRAP264.PROD.OUTLOOK.COM__;JQ!!FJ-Y8qCqXTj2!e4N3kGnxZWWITWCJu1CYCnmy8BHUSLCmm6OqqK4DZQLuzRSQEVXV4aOoQyQMNn0uSD29FpFX2pMT_GbD6CwQAJQsGUWJ$
>>> <https://urldefense.com/v3/__https://groups.google.com/a/list.nist.gov/d/msgid/pqc-forum/PR0P264MB4057EA576559008E1DC2B83399592*40PR0P264MB4057.FRAP264.PROD.OUTLOOK.COM?utm_medium=email&utm_source=footer__;JQ!!FJ-Y8qCqXTj2!e4N3kGnxZWWITWCJu1CYCnmy8BHUSLCmm6OqqK4DZQLuzRSQEVXV4aOoQyQMNn0uSD29FpFX2pMT_GbD6CwQALtdBpeU$>
>>> .
>>>
>>
>> --
>> Sophie Schmieg | Information Security Engineer | ISE Crypto |
>> ssch...@google.com
>>
>
--
You received this message because you are subscribed to the Google Groups "pqc-forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pqc-forum+...@list.nist.gov.
THALES GROUP LIMITED DISTRIBUTION to email recipients
Thank you David (and Mike for the follow-on) – could the main points of this response be added to the FIPS 204 errata please? i.e,
Hi Anthony, Samuel,
I am extremely interested in this thread, but I am not sure exactly what point is being made. Is there currently a problem with the external mu suggestion (and banning of HashML-DSA) that is currently contained in draft-ietf-lamps-dilithium-certificates? I do not believe that it says anything that would preclude streaming APIs.
---
Mike Ounsworth
From: 'Samuel Lee' via pqc-forum <pqc-...@list.nist.gov>
Sent: Tuesday, March 25, 2025 2:00 PM
To: pqc-forum <pqc-...@list.nist.gov>
Cc: Antony Vennard <ant...@vennard.ch>; Moody, Dustin (Fed) <dustin...@nist.gov>; pqc-forum <pqc-...@list.nist.gov>; COSTA Graham <graham...@thalesgroup.com>; Mike Ounsworth <Mike.Ou...@entrust.com>; Cooper, David (Fed) <david....@nist.gov>;
Samuel Lee (ENS/Crypto) <Samue...@microsoft.com>; Sophie Schmieg <ssch...@google.com>
Subject: Re: [EXTERNAL] Re: [pqc-forum] External calculation of M' vs mu in FIPS 204.
Just to cross-post back here, I still think there is a bit of a gap in NIST position here, which I expanded on in a LAMPS thread: https: //mailarchive. ietf. org/arch/msg/spasm/4tj1trnasxKXTAfS8Bs2YflFvhc/ In my opinion, it is inconsistent to both
To view this discussion visit https://groups.google.com/a/list.nist.gov/d/msgid/pqc-forum/04dfd901-0794-437f-9e0c-4b0a5e9e13den%40list.nist.gov.
Hi Mike, all,
I have seen multiple claims that there is no difference in security for ExternalMu, so I’d like to share the property below in case not everyone is aware.
For an ExternalMu-MLDSA.Verify interface, it is trivial to find two (in fact many) public keys pk and pk* such that ExternalMu-MLDSA.Verify(pk, mu) as well as ExternalMu-MLDSA.Verify(pk*, mu) pass.
This can be done by flipping the least significant bits of coefficients in t1 leading to many different pk* for a given pk.
Due to the rounding (Decompose) in UseHint, it is quite likely that the bit flips in t1 do not affect the value of w_1’ and therefore that verification passes (if it does for pk).
This does not happen for MLDSA.Verify or HashMLDSA.Verify because bit flips in t1 affect mu, and therefore ~c.
The introduction of ExternalMu at the very least raises the question what happens to the security properties (in particular non-resignability) if the creation of mu and the verification cannot be guaranteed to use the same public key.
I believe that raising this question is valid and should be encouraged.
And I do not think we have a complete answer (at least not to my knowledge), so claiming no difference in security at all seems premature.
Kind regards,
Joost (on personal behalf)
From: 'Mike Ounsworth' via pqc-forum <pqc-...@list.nist.gov>
Sent: Tuesday, March 25, 2025 10:09 PM
To: Samuel Lee <samue...@microsoft.com>; pqc-forum <pqc-...@list.nist.gov>
Cc: Antony Vennard <ant...@vennard.ch>; Moody, Dustin (Fed) <dustin...@nist.gov>; COSTA Graham <graham...@thalesgroup.com>; Cooper, David (Fed) <david....@nist.gov>; Sophie Schmieg <ssch...@google.com>
Subject: [EXT] RE: [EXTERNAL] Re: [pqc-forum] External calculation of M' vs mu in FIPS 204.
Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button |