Gorjan,
Please clarify: is NIST objecting to the seed size, considering 32 byte too short, or is NIST objecting to “official” use of seed in ML-KEM?
Given how ML-KEM key-pairs are generated, I see the change to allow (only) a seed (of, say, 40 bytes) as a really small task.
If you think otherwise – please explain what problems you find with this approach.
P.S. My previous question on this subject was ignored – please follow the process and respond.
--
V/R,
Uri
There are two ways to design a system. One is to make it so simple there are obviously no deficiencies.
The other is to make it so complex there are no obvious deficiencies.
C. A. R. Hoare
I was a shepherd to fools
Causelessly bold or afraid.
They would not abide by my rules.
Yet they escaped. For I stayed.
R. Kipling “Epitaphs of the War. Convoy Escort”
From: 'Alagic, Gorjan (Assoc)' via pqc-forum <pqc-...@list.nist.gov>
Date: Tuesday, September 17, 2024 at 20:45
To: Phillip Hallam-Baker <ph...@hallambaker.com>, Tony Arcieri <bas...@gmail.com>
Cc: pqc-forum <pqc-...@list.nist.gov>
Subject: [EXT] RE: [pqc-forum] Re: ML-KEM: usage of seed for key pair generation
Using only a 32-byte seed for ML-KEM is not allowed by FIPS 203, and we have no plans to allow it. It’s true that having such an option might be advantageous for some applications. However, we do not see this as a sufficient reason to change
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside the Laboratory.
ZjQcmQRYFpfptBannerEnd
Using only a 32-byte seed for ML-KEM is not allowed by FIPS 203, and we have no plans to allow it. It’s true that having such an option might be advantageous for some applications. However, we do not see this as a sufficient reason to change FIPS 203, either directly or indirectly. Making a change at this stage is no small task, and could have unintended consequences. – Gorjan (for NIST PQC team).
From: pqc-...@list.nist.gov <pqc-...@list.nist.gov> On Behalf Of Phillip Hallam-Baker
Sent: Friday, September 13, 2024 3:25 PM
To: Tony Arcieri <bas...@gmail.com>
Cc: pqc-forum <pqc-...@list.nist.gov>
Subject: Re: [pqc-forum] Re: ML-KEM: usage of seed for key pair generation
I think it is important to have the domain separation as specified later in the thread. The way I would do this is to bind the OID of the algorithm ID into the hash which is consistent with approach elsewhere in ML-DSA.
So:
Seed = 32 bytes
d, k = SHAKE-256 ( oid + seed, 512 bits);
I believe that as a general matter, no cryptographic operation should use the output of any RNG without pre-processing it through a digest precisely to prevent a repeat of the DUAL-ECC RNG situation.
On Fri, Sep 13, 2024 at 12:12 PM Tony Arcieri <bas...@gmail.com> wrote:
I now see this was already proposed using SHAKE-256 to perform the expansion: https://groups.google.com/a/list.nist.gov/g/pqc-forum/c/5CT4NC_6zRI/m/lpifFrpWAwAJ
On Tue, Sep 10, 2024 at 7:27 AM Tony Arcieri <bas...@gmail.com> wrote:
On Fri, Sep 6, 2024 at 2:10 PM Stephan Mueller <smue...@chronox.de> wrote:
But my concern is slightly different, considering
that FIPS 203 explicitly says the seed must come from an RBG and not from a
plain KDF which provides seed data for different ML-KEM keys.
My concern is more along the lines what FIPS 203 says: a fresh random number
is to be generated from an RBG each time a new key pair is created. However,
instead of wanting to store the key pair or the private key, storing the seed
is allowed. All I am asking is whether instead of storing 64 bytes from an
RBG, I can store 32 bytes from an RBG and expand the 32 bytes to 64 bytes
using a KDF to regenerate the one given key pair the seed applies to.
Can NIST offer any guidance here? Is there any approved construction for expanding a 32-byte "short seed" into 64-bytes? Particularly in a way where the 32-byte seed can be persisted and expanded as needed? Would this be against the usage requirements of a DRBG due to the need to persist the "short seed", and if so, what would be an approved construction to use?
--
Tony Arcieri
--
Tony Arcieri
--
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 on the web visit https://groups.google.com/a/list.nist.gov/d/msgid/pqc-forum/CAHOTMV%2B%3DPuuj%3DH4FV_Z6dSSU%2Bs6Uews7z8ZbAi1cywjEnEhhoQ%40mail.gmail.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.
To view this discussion on the web visit https://groups.google.com/a/list.nist.gov/d/msgid/pqc-forum/CAMm%2BLwgh%2Bq9%3DtvvL8h3De25D0NTA%2B2Tqcj5benLZ_B%3D5ykR%3D4Q%40mail.gmail.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.
To view this discussion on the web visit https://groups.google.com/a/list.nist.gov/d/msgid/pqc-forum/DM6PR09MB4726A89BA10428F937C4EF169A622%40DM6PR09MB4726.namprd09.prod.outlook.com.
Hi Uri,
Sorry for the delay in responding. We had some internal discussions that I wanted to finish first.
The concern is not about the specific idea of using a 32-byte seed for ML-KEM.KeyGen. It is instead a general concern about making any changes to FIPS 203 at this stage.
Can you say more about the specific use-case you are interested in?
Best,
Gorjan
Hi Uri,
Sorry for the delay in responding. We had some internal discussions that I wanted to finish first.
The concern is not about the specific idea of using a 32-byte seed for ML-KEM.KeyGen. It is instead a general concern about making any changes to FIPS 203 at this stage.
Can you say more about the specific use-case you are interested in?
To view this discussion on the web visit https://groups.google.com/a/list.nist.gov/d/msgid/pqc-forum/DM6PR09MB4726C996C60A5DC9CD9719B29A702%40DM6PR09MB4726.namprd09.prod.outlook.com.Attachments:
- smime.p7s
Hi Filippo and all,
After some internal discussion, the conclusion was:
Best,
Gorjan
To view this discussion visit https://groups.google.com/a/list.nist.gov/d/msgid/pqc-forum/b307b949-7cf5-44ad-9b96-941ca61f0d66%40app.fastmail.com.
>2.)
[Not presently allowed] Generating the 64-byte seed (d,z) from a 32-byte seed s using (e.g.) a KDF, and then storing s instead of
>the decapsulation key. As discussed in the thread linked by Orie, this is at present not allowed, but we are looking
at allowing it via a >change to SP800-133.
I would like to see 800-133 updated to allow this. Especially for the use case mentioned by Deirdre,
X25519+ML-KEM hybrids. I think having a 32 byte seed s and deriving things from that with
SHAKE256
is the correct way to implement things.
Using the same approach of generating a 32-byte
seed s and using that to generate keys for Ed25519+ML-DSA or Ed448+ML-DSA hybrids seems to make equal sense to me.
Cheers,
John
From:
'Stephan Mueller' via pqc-forum <pqc-...@list.nist.gov>
Date: Wednesday, 30 October 2024 at 18:19
To: Gorjan (Assoc) Alagic <gorjan...@nist.gov>, pqc-forum <pqc-...@list.nist.gov>
Cc: Deirdre Connolly <durumcr...@gmail.com>, Blumenthal, Uri - 0553 - MITLL <u...@ll.mit.edu>, Phillip Hallam-Baker <ph...@hallambaker.com>, Tony Arcieri <bas...@gmail.com>, Filippo Valsorda <fil...@ml.filippo.io>, xiaoy...@intel.com <xiaoy...@intel.com>
Subject: Re: [pqc-forum] Re: ML-KEM: usage of seed for key pair generation
--
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.
Hi Gorjan,
Does NIST have someone who will be attending IETF next week in Dublin? Quynh Dang often attends.
The IETF owns several private key container formats such as PKCS#12 and JWK. I suspect that how to represent ML-DSA and ML-KEM private keys (seed vs full) will be a major discussion point next week across a number of IETF working groups. If you’re looking for use-cases, I’m sure that many will come up during the IETF meetings.
Knowing that seed is not (currently) supported by FIPS is unfortunate yet useful input for these IETF discussions.
---
Mike Ounsworth
Using only a 32-byte seed for ML-KEM is not allowed by FIPS 203, and we have no plans to allow it. It’s true that having such an option might be advantageous for some applications. However, we do not see this as a sufficient reason to change FIPS 203, either directly or indirectly. Making a change at this stage is no small task, and could have unintended consequences. – Gorjan (for NIST PQC team).
Deidre, the problem is that, according to FIPS 203 (section 6):
As prescribed in Section 3.3, the interfaces specified in this section should not be made available to applications other than for testing purposes, and the random seeds (as specified in ML-KEM.KeyGen and ML-KEM.Encaps in Section 7) shall be generated by the cryptographic module.
If the random seeds have to be generated by the cryptographic module, it would appear to ban the import of them (at least by my reading of the text). However, the sentence previous to the one I quoted specifically allows the local storage of the seed within the cryptographic module (and reexpansion at decaps time).
Mike has asked NIST about transferring the seed as the private key between modules, and their immediate response was “good question – we’ll get back to you on that”.
Now, Quynh will be in Dublin, and so we could interrogate him. However, I don’t expect him to be willing to speak on behalf of NIST…
(I personally think that passing seeds as the private key is quite reasonable and I don’t see a downside – however, NIST sometimes disagrees with me…)
Ah yes. I got confused about what “this” is in Gorjan’s statement “We are considering supporting this”. Thanks for the correction.
I still don’t think that Gorjan has provided a complete answer. The same question exists for ML-DSA, and I don’t think NIST has addressed this. Specifically I don’t think he’s addressed the language in FIPS in FIPS 204 section 6:
"Other than for testing purposes, the interfaces for key generation and signature generation specified in this section should not be made available to applications, as any random values required for key generation and signature generation shall be generated by the cryptographic module.”
Which, to my reading, seems pretty clear that you can’t import an ML-DSA private key as seed from outside the crypto module (for example, via reading a p12 file provided by a user).
I think that for IETF purposes, having different private key formats for ML-DSA and ML-KEM would be … weird.
---
Mike Ounsworth
From: Bas Westerbaan <b...@cloudflare.com>
Sent: Wednesday, October 30, 2024 1:16 PM
To: Mike Ounsworth <Mike.Ou...@entrust.com>
Hi Scott,
From: 'Scott Fluhrer (sfluhrer)' via pqc-forum <pqc-...@list.nist.gov>
Sent: Wednesday, October 30, 2024 2:27 PM
To: Deirdre Connolly <durumcr...@gmail.com>; Mike Ounsworth <Mike.Ou...@entrust.com>
Cc: Alagic, Gorjan (Assoc) <gorjan...@nist.gov>; Filippo Valsorda <fil...@ml.filippo.io>; Blumenthal, Uri - 0553 - MITLL <u...@ll.mit.edu>; Phillip Hallam-Baker <ph...@hallambaker.com>; Tony Arcieri <bas...@gmail.com>; pqc-forum <pqc-...@list.nist.gov>
Subject: RE: [pqc-forum] Re: ML-KEM: usage of seed for key pair generation
Deidre, the problem is that, according to FIPS 203 (section 6):
As prescribed in Section 3.3, the interfaces specified in this section should not be made available to applications other than for testing purposes, and the random seeds (as specified in ML-KEM.KeyGen and ML-KEM.Encaps in Section 7) shall be generated by the cryptographic module.
If the random seeds have to be generated by the cryptographic module, it would appear to ban the import of them (at least by my reading of the text).
[Dang, Quynh H. (Fed)] I am not sure if the text means not allowing to pass (d, z) from one module to another. I’ll ask my team.
Regards,
Quynh.
Sent: Wednesday, October 30, 2024 2:27 PM
To: Deirdre Connolly <durumcr...@gmail.com>; Mike Ounsworth <Mike.Ou...@entrust.com>
Cc: Alagic, Gorjan (Assoc) <gorjan...@nist.gov>; Filippo Valsorda <fil...@ml.filippo.io>; Blumenthal, Uri - 0553 - MITLL <u...@ll.mit.edu>; Phillip Hallam-Baker <ph...@hallambaker.com>; Tony Arcieri <bas...@gmail.com>; pqc-forum <pqc-...@list.nist.gov>
Subject: RE: [pqc-forum] Re: ML-KEM: usage of seed for key pair generation
Deidre, the problem is that, according to FIPS 203 (section 6):
As prescribed in Section 3.3, the interfaces specified in this section should not be made available to applications other than for testing purposes, and the random seeds (as specified in ML-KEM.KeyGen and ML-KEM.Encaps in Section 7) shall be generated by the cryptographic module.
If the random seeds have to be generated by the cryptographic module, it would appear to ban the import of them (at least by my reading of the text).
[Dang, Quynh H. (Fed)] I am not sure if the text means not allowing to pass (d, z) from one module to another. I’ll ask my team.
Regards,
Quynh.
By the way, I am going to suggest at IETF LAMPS next week that given the current state of all this, we should support in PKCS#8 / PKCS#12 in the following way:
ML-*PrivateKeySeed ::= OCTET STRING (SIZE X) -- X is 32 for ML-DSA and 64 for ML-KEM
ML-*PrivateKeyFull ::= OCTET STRING
ML-*PrivateKey ::= CHOICE {
ML-*PrivateKeySeed,
[0] ML-*PrivateKeyFull }
(where ML-* means ML-DSA or ML-KEM)
IE make Seed the default private key format, and do it in such a way that if your application never expects to encounter a full key, then ML-*PrivateKey is binary identical to ML-*PrivateKeySeed. But if some crypto module only has the full seed then there at least is a standardized format for it.
I don’t love it, for the same reasons that you mention Filippo, but since FIPS 203 / 204 allow crypto modules to store expanded keys, I think we will need to support ways to export those.
---
Mike Ounsworth
From: Filippo Valsorda <fil...@ml.filippo.io>
Sent: Wednesday, October 30, 2024 2:00 PM
To: Dang, Quynh H. (Fed) <quynh...@nist.gov>; Scott Fluhrer (sfluhrer) <sflu...@cisco.com>; Deirdre Connolly <durumcr...@gmail.com>; Mike Ounsworth <Mike.Ou...@entrust.com>
Cc: Gorjan (Assoc) Alagic <gorjan...@nist.gov>; Blumenthal, Uri - 0553 - MITLL <u...@ll.mit.edu>; Phillip Hallam-Baker <ph...@hallambaker.com>; Tony Arcieri <bas...@gmail.com>; pqc-forum <pqc-...@list.nist.gov>
Subject: [EXTERNAL] Re: [pqc-forum] Re: ML-KEM: usage of seed for key pair generation
2024-10-30 19: 36 GMT+01: 00 Dang, Quynh H. (Fed) <quynh. dang@ nist. gov>: Hi Scott, From: 'Scott Fluhrer (sfluhrer)' via pqc-forum <pqc-forum@ list. nist. gov> Sent: Wednesday, October 30, 2024 2: 27 PM To: Deirdre Connolly <durumcrustulum@ gmail. com>;
By the way, I am going to suggest at IETF LAMPS next week that given the current state of all this, we should support in PKCS#8 / PKCS#12 in the following way:
ML-*PrivateKeySeed ::= OCTET STRING (SIZE X) -- X is 32 for ML-DSA and 64 for ML-KEM
ML-*PrivateKeyFull ::= OCTET STRING
ML-*PrivateKey ::= CHOICE {
ML-*PrivateKeySeed,
[0] ML-*PrivateKeyFull }
(where ML-* means ML-DSA or ML-KEM)
IE make Seed the default private key format, and do it in such a way that if your application never expects to encounter a full key, then ML-*PrivateKey is binary identical to ML-*PrivateKeySeed. But if some crypto module only has the full seed then there at least is a standardized format for it.
I don’t love it, for the same reasons that you mention Filippo, but since FIPS 203 / 204 allow crypto modules to store expanded keys, I think we will need to support ways to export those.
THALES GROUP LIMITED DISTRIBUTION to email recipients
Hi,
I’m on the committee and can help out. I know a number of the people on the P11 committee are on these threads as well. I can certainly offer my thoughts on the topic. But I can also collect/coordinate the input from the committee on this topic.
Do we want to continue that specific discussion on this thread, on a separate thread, or as a separate discussion?
--
Darren Johnson
To unsubscribe from this group and stop receiving emails from it, send an email to pqc-forum+unsubscribe@list.nist.gov.