-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ML-KEM private keys not compatible with draft-ietf-lamps-kyber-certificates-06 (seed as private key) #613
Comments
I'm afraid this is not a bug but a deliberate decision for encoding strictly pursuant the NIST guidance to not use seeds outside of testing. Also, as |
Reading the draft, I'm only seeing one place that specifies a short private key: the example in Appendix C.2. This was changed less than a month ago; previously the example had used the "expanded" format. Meanwhile, Section 1.2 explicitly states that the Decapsulate function is ML-KEM.Decaps() from FIPS 203. This function operates on an expanded key, not a seed. RFC 9629 lists only three KEM functions: Keygen, Encaps, and Decaps. Is there any guidance in the CMS draft, apart from the example, regarding what processing—outside the three-function KEM interface—must be done to use the decapsulation function with a short key? |
@SWilson4 the IETF LAMPS consensus is that private keys of all three of the NIST algorithms should be stored as seeds, not as expanded keys, for the private key exchange file formats (PKCS#8, PKCS#12). How the specific cryptographic module handles the private key internally is outside the scope of any standards. And yes, that means that for RFC 9629 Also, sorry, should have referenced draft-ietf-lamps-kyber-certificates-06 instead, not the CMS draft. |
OK, that makes sense, Thanks! |
Describe the bug
The private key files generated using oqsprovider do not follow the
draft-ietf-lamps-cms-kyber-07draft-ietf-lamps-kyber-certificates-06 standard. More specifically, the saved private key is not the seed used to generate it but the expanded value.To Reproduce
Steps to reproduce the behaviour:
openssl genpkey -out private-key.pem -algorithm mlkem512
Expected behavior
The file should be small, just two lines of base64 encoded data. Instead the file is over 4kiB large.
Environment (please complete the following information):
Please run the following commands to obtain the version information:
openssl version
:openssl list -providers
:The text was updated successfully, but these errors were encountered: