-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[configtls] Hybrid key exchange automatically applies in go version >= 1.24.0 #14343
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
… tls.X25519MLKEM768 or not
…_validation_test.go to curves_nofips_test.go
| "P521": tls.CurveP521, | ||
| "X25519": tls.X25519, | ||
| "X25519MLKEM768": tls.X25519MLKEM768, | ||
| "X25519MLKEM768": X25519MLKEM768, |
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.
Why are you breaking convention?
|
|
||
| // defaultCurvePreferences defines the default order of curve preferences for FIPS builds. | ||
| // Only NIST P-curves are available in FIPS mode. | ||
| var defaultCurvePreferences = []tls.CurveID{ |
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.
that's the same set as tlsCurveTypes right above
|
There is no need to specify go versions, we only support supported Go versions, and 1.24 is the oldstable version now. I don't understand why you're making those changes as this is doable right now by way of configuration. Why should X25519MLKEM768 be offered always? Can you reduce your diff to avoid touching anything related to FIPS? |
|
Agreed.
NIST SP800-140D lists the approved kems.
Hybrid is not on the list.
THIS MESSAGE IS FOR THE USE OF THE INTENDED RECIPIENT(S) ONLY AND MAY CONTAIN INFORMATION THAT IS PRIVILEGED, PROPRIETARY, CONFIDENTIAL, AND/OR EXEMPT FROM DISCLOSURE UNDER ANY RELEVANT PRIVACY LEGISLATION. No rights to any privilege have been waived. If you are not the intended recipient, you are hereby notified that any review, re-transmission, dissemination, distribution, copying, conversion to hard copy, taking of action in reliance on or other use of this communication is strictly prohibited. If you are not the intended recipient and have received this message in error, please notify me by return e-mail and delete or destroy all copies of this message.
|
|
Agree with that. So It means that it's okay to done with avoid double checking..? It seems that I misunderstood what @Brent-Durham wants. Maybe it will be good to close this and re-open with new pr if there are remain fixing things. |
|
If X25519MLKEM768 doesn't needed to provided in default, I'll close it and finish this issue. |
|
Does it need to be provided by default? Can you make a case for it? |
Description
This PR adds automatic support for post-quantum hybrid key exchange (X25519MLKEM768) introduced in Go 1.24.0. When
curve_preferencesis not explicitly configured in TLS settings, the collector now automatically prioritizes X25519MLKEM768 for optimal security in non-FIPS builds compiled with Go 1.24+.Key changes:
[X25519MLKEM768, X25519, P256, P384, P521]curve preferences[P256, P384, P521](FIPS-compliant)0x11ECcurves_fips.go) and non-FIPS (curves_nofips.go) implementationsThis enables post-quantum security by default without requiring any configuration changes, while maintaining full backward compatibility and FIPS compliance.
Link to tracking issue
Fixes #14335
Testing
TestDefaultCurvePreferences)TestX25519MLKEM768Value) to ensure constant0x11ECmatchestls.X25519MLKEM768All tests pass for both FIPS and non-FIPS build configurations.
Documentation
README.mdto document automatic post-quantum security whencurve_preferencesis not configured