Skip to content
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

rustls 0.23.22, opt-in prefer-post-quantum feature flag #520

Merged
merged 2 commits into from
Feb 5, 2025

Conversation

cpu
Copy link
Member

@cpu cpu commented Dec 29, 2024

rustls 0.23.20 -> 0.23.22

Notably this brings in support for post-quantum-secure key exchange using X25519MLKEM768 with the aws-lc-rs crypto provider. Support is enabled by default, but at a low negotiation priority. A subsequent commit will expose the feature required to make it the most preferred KX alg.

See the upstream release notes for more information:

add prefer-post-quantum feature flag

When explicitly activated (it is not a default) this feature flag activates the matching upstream rustls/prefer-post-quantum feature flag, making the aws-lc-rs crypto provider prefer X25519MLKEM768.

Since the default provider is augmented with prefer-post-quantum the existing client.c and server.c examples require no changes to benefit from the -DPREER_POST_QUANTUM=on CMake option. CI is updated to test a preferred post-QC secure key exchange using client.c and pq.cloudflareresearch.com, checking that the output reports the correct KX on Windows/MacOS/Linux. This is done in the daily tests job since it relies on an external host.

Here's an exemplar run from a manual invocation on this branch.

Resolves #507

@cpu cpu self-assigned this Dec 29, 2024
@cpu cpu mentioned this pull request Dec 29, 2024
20 tasks
.github/workflows/test.yaml Outdated Show resolved Hide resolved
@cpu cpu force-pushed the cpu-rustls-pq branch 2 times, most recently from 094f722 to a4d06a2 Compare December 31, 2024 17:11
@cpu

This comment was marked as outdated.

Notably this brings in support for post-quantum-secure key exchange
using X25519MLKEM768 with the `aws-lc-rs` crypto provider. Support is
enabled by default, but at a low negotiation priority. A subsequent
commit will expose the feature required to make it the most preferred
KX alg.

See the upstream release notes for more information:
  https://github.com/rustls/rustls/releases/tag/v%2F0.23.22
@cpu cpu changed the title add opt-in post-quantum KX feature flag rustls 0.23.22, opt-in prefer-post-quantum feature flag Feb 5, 2025
@cpu cpu marked this pull request as ready for review February 5, 2025 16:06
@cpu cpu requested review from jsha and ctz February 5, 2025 16:06
@cpu
Copy link
Member Author

cpu commented Feb 5, 2025

cpu marked this pull request as ready for review now

This should be ready for review now. The general approach has changed a little bit from the first draft based on what landed upstream in 0.23.22. This side is simpler now, so that's nice 🌠 I've updated the PR desc accordingly.

.github/workflows/daily-tests.yml Outdated Show resolved Hide resolved
When explicitly activated (it is not a default) this feature flag
activates the matching upstream `rustls/prefer-post-quantum` feature
flag, making the `aws-lc-rs` crypto provider prefer `X25519MLKEM768`.

CI coverage for this build configuration is added to `test.yaml`, and
a new daily test targetting the cloudflare PQ demo server is added to
`daily-tests.yml`.
@cpu
Copy link
Member Author

cpu commented Feb 5, 2025

Since this ended up not requiring any code changes in librustls I'm going to merge with the one review. Thanks!

@cpu cpu merged commit 5d624f5 into rustls:main Feb 5, 2025
46 checks passed
@cpu cpu deleted the cpu-rustls-pq branch February 5, 2025 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FFI for rustls-post-quantum provider crate
2 participants