checkmypqc.com

Home › Fix guides › Enable post-quantum TLS (X25519MLKEM768) on Rust (rustls)

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

  1. Check the requirements: rustls 0.23.27+ with the aws-lc-rs provider (the default).
  2. Apply the configuration below.
  3. 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

This refuses every client without TLS 1.3 and X25519MLKEM768: older browsers, operating systems, libraries and devices. Check your logs before you switch.

main.rs

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])?;

Vendor documentation: https://docs.rs/rustls/latest/rustls/manual/_05_defaults/index.html · checked December 4, 2026

Findings

After any change, check the service again. A change that never reaches the server (a load balancer or CDN in front, a configuration file that is not loaded) is the most common reason a fix does not show.

Updated December 4, 2026 · Open the interactive version

Related

Check your site

Free, no account: see in seconds whether browsers get post-quantum key exchange with your website or SSH server.

Check a service

Ask your AI assistant: checkmypqc.com runs a public MCP server at https://checkmypqc.com/mcp.