-
Notifications
You must be signed in to change notification settings - Fork 13
Update ML-KEM for compatibility with OpenSSL 3.5 implementation #153
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
base: main
Are you sure you want to change the base?
Conversation
| #define SCOSSL_ALG_NAME_X25519_MLKEM768 SCOSSL_LN_X25519_MLKEM768":X25519MLKEM768:"SCOSSL_SN_X25519_MLKEM768":"SCOSSL_OID_X25519_MLKEM768 | ||
| #define SCOSSL_ALG_NAME_SecP256r1_MLKEM768 SCOSSL_LN_P256_MLKEM768":SecP256r1MLKEM768:"SCOSSL_SN_P256_MLKEM768":"SCOSSL_OID_P256_MLKEM768 | ||
| #define SCOSSL_ALG_NAME_SecP384r1_MLKEM1024 SCOSSL_LN_P384_MLKEM1024":SecP384r1MLKEM1024:"SCOSSL_SN_P384_MLKEM1024":"SCOSSL_OID_P384_MLKEM1024 | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good to be clear wherever you're doing the hybrid code that these names and algorithms are correct only in the context of TLS key exchange.
There are different combiners for use in CMS / HPKE, known as:
"Composite-ML-KEM"
https://datatracker.ietf.org/doc/draft-ietf-lamps-pq-composite-kem/
and "Hybrid PQ/T KEM":
https://github.com/cfrg/draft-irtf-cfrg-concrete-hybrid-kems/blob/main/draft-irtf-cfrg-concrete-hybrid-kems.md#concrete-hybrid-kem-instances
Which are compatible with each other, and use the same component algorithms, but use SHA3-256 with the shared secret outputs + a label to produce a 32-byte shared secret, rather than directly outputting concatenated shared secret.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to dig deeper into how these algorithms are exposed for CMS through OpenSSL and see if there's a way to only expose these for TLS then as well.
|
FYI We recently added support for MLKEM to https://github.com/golang-fips/openssl, so you can use it to test that you will be at least compatible with the Microsoft build of Go. |
This PR updates the SymCrypt provider ML-KEM and ML-KEM hybrid to match the behavior of the OpenSSL default provider implementation, added in OpenSSL 3.5. This PR also fixes minor bugs and behavior differences found when testing the SymCrypt provider with OpenSSL 3.5's new ML-KEM tests.