Enable post-quantum TLS (X25519MLKEM768) on Rust (rustls)
How to offer the hybrid post-quantum key exchange X25519MLKEM768 on Rust (rustls), from the vendor's documentation, checked on December 4, 2026.
Steps
- Check the requirements: rustls 0.23.27+ with the aws-lc-rs provider (the default).
- Apply the configuration below.
- Reload the service and check it again on checkmypqc.com.
Recommended now: post-quantum first, classical kept
X25519MLKEM768 is on and preferred by default with the aws-lc-rs provider. The ring provider does not offer it.
Later: require post-quantum
use rustls::crypto::aws_lc_rs::{default_provider, kx_group};
let provider = rustls::crypto::CryptoProvider {
kx_groups: vec![kx_group::X25519MLKEM768],
..default_provider()
};
let config = rustls::ServerConfig::builder_with_provider(provider.into())
.with_protocol_versions(&[&rustls::version::TLS13])?;
Findings
- HighNo post-quantum key exchange
CMP-TLS-KX-CLASSICAL - HighTLS 1.3 is not enabled
CMP-TLS-NO-TLS13 - HighOnly a pre-standard post-quantum group
CMP-TLS-KX-DRAFT-ONLY - HighBrowsers get classical key exchange
CMP-TLS-KX-NOT-PREFERRED - MediumCurrent browsers are refused
CMP-TLS-KX-BROWSER-REFUSED - LowA draft group is still accepted
CMP-TLS-KX-DRAFT-ENABLED - LowTLS 1.2 is still accepted
CMP-TLS-TLS12-ACCEPTED