Repository navigation
Conversation
Turn on the rustls prefer-post-quantum feature for the workspace, which moves the hybrid X25519MLKEM768 group to the front of the aws-lc-rs provider's default key exchange groups. The CLI, the runner, and the API server install that default provider, so their TLS clients now send an X25519MLKEM768 key share first and still fall back to X25519 for peers without it. As a TLS server, rustls follows the client's group order, so the API server's choice is unchanged. Cargo unifies features only across the packages in a build, and the CLI and the API reached rustls only through tokio-rustls, so a build of either alone left the feature off. Both now depend on rustls directly and install the provider from it; the API no longer needs tokio-rustls, and the CLI keeps it only for its tests.
|
| Project | Bencher |
| Branch | u/ep/prefer-post-quantum |
| Testbed | intel-v1 |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result microseconds (µs) (Result Δ%) | Upper Boundary microseconds (µs) (Limit %) |
|---|---|---|---|
| Adapter::Json | 📈 view plot 🚷 view threshold | 5.32 µs(+1.70%)Baseline: 5.23 µs | 5.52 µs (96.29%) |
| Adapter::Magic (JSON) | 📈 view plot 🚷 view threshold | 5.16 µs(+1.75%)Baseline: 5.07 µs | 5.39 µs (95.78%) |
| Adapter::Magic (Rust) | 📈 view plot 🚷 view threshold | 7.65 µs(-69.86%)Baseline: 25.37 µs | 43.94 µs (17.40%) |
| Adapter::Rust | 📈 view plot 🚷 view threshold | 4.57 µs(+1.75%)Baseline: 4.49 µs | 4.77 µs (95.76%) |
| Adapter::RustBench | 📈 view plot 🚷 view threshold | 4.54 µs(+1.37%)Baseline: 4.48 µs | 4.75 µs (95.71%) |
epompeii
marked this pull request as ready for review
December 3, 2026 23:52
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prefer the hybrid post-quantum TLS key exchange
X25519MLKEM768in every Bencher binary that opens TLS connections.The workspace sets
default-features = falseonrustls, which turns off itsprefer-post-quantumfeature. Without it, the aws-lc-rs provider orders its default key exchange groups as X25519, P-256, P-384, and then X25519MLKEM768. The CLI, the runner, and the API server install that default provider, so their TLS clients sent only an X25519 key share. A server that prefers ML-KEM got it only after a HelloRetryRequest, and any other server negotiated X25519.Change
prefer-post-quantumfor the workspacerustlsdependency. It moves X25519MLKEM768 to the front of the default groups and changes nothing else.bencher_cliandbencher_apireachedrustlsonly throughtokio-rustls. A build of either alone (services/cliincli.yml,-p bencher_cliin the CLI Dockerfile,cargo install bencher_cli,-p bencher_api) therefore left the feature off. Both now depend onrustlsdirectly and install the provider from it. The API no longer needstokio-rustls, and the CLI keeps it only for its tests.v0.6.20, and themodifieddate on all 9 changelog pages.As a TLS server, rustls picks the group by the client's order, so a self-hosted API server negotiates as before. The changelog line covers outbound requests only.
Proof
Each binary ran against OpenSSL 3.5.10
s_server -trace.bencherCLI ClientHello key sharesbencherCLI ServerHello grouprunner up)A per-package
cargo tree -e normal,features -i rustlsshowsprefer-post-quantumon forbencher_cli,bencher_api, andbencher_runner_cli, which it was not for the first 2 before.The first ClientHello grows from 252 to 1475 bytes, the same size that current browsers send. Peers without ML-KEM still negotiate X25519.
Checks
cargo fmt --check,./scripts/clippy.sh,cargo check --workspace --all-targetscargo nextest run --all-features --profile ci: 5441 passed, 12 skippedcargo deny --locked check bans licenses sourcesat 0.20.2Cargo.lockchanges only the dependency lists ofbencher_apiandbencher_cli, with no version changes