Post-quantum TLS
Which key exchange each TLS connection of the server uses: by default the hybrid X25519MLKEM768 first, a classical group for a peer without it. What that protects and what stays classical, how to check the group a connection agreed, and what to do when it is classical.
By default (tls.profile = "hybrid"), every TLS connection vcon-server
makes offers one hybrid key exchange first, X25519MLKEM768, and its
listeners agree on it with a client that
lists it first. A peer without it gets a classical group. This page says
what that protects, which connections it covers, and how to check which
group a connection agreed. Release 0.4.21 names this order in the code and
logs the first connection on each group. Earlier releases already agreed on
X25519MLKEM768 with a client that lists it first.
- The hybrid group. X25519MLKEM768 runs X25519 and ML-KEM-768 in the
same handshake and derives the connection's keys from both secrets. An
attacker has to break both to learn the keys. ML-KEM-768 is the key
encapsulation that NIST standardized in FIPS 203, the middle of its three
parameter sets (ML-KEM-512, ML-KEM-768, ML-KEM-1024); RFC 10024 defines
the hybrid for TLS 1.3, with the code point 4588 (
0x11EC). - What it protects. Traffic recorded today, against decryption later with a quantum computer ("harvest now, decrypt later"). A key agreed by X25519 or another elliptic curve alone is exposed to that; to learn a key agreed by the hybrid group, an attacker also has to break ML-KEM-768. It protects the confidentiality of what the connection carries: tokens, vCons, and, when the PostgreSQL server agrees on the hybrid group, the catalog's queries.
- What stays classical. The certificates of a
hybridserver (RSA or ECDSA, as getting started makes;hybridalso takes ML-DSA certificates, andcnsa2requires ML-DSA-87) and their signatures. Certificates and signatures authenticate the handshake as it happens. Breaking the signature algorithm later does not decrypt recorded traffic: every public-key key exchange in TLS 1.3 is ephemeral, and the server resumes a session only with a new key exchange (psk_dhe_ke) (RFC 8446, sections 1.2 and 4.2.9). Breaking it would let an attacker impersonate the server in new connections. See certificates and compatible peers. TLS 1.2 has no hybrid group, so a TLS 1.2 connection uses a classical group. - The fallback. Under
hybrid, a peer without the hybrid group, such as a client built on OpenSSL before 3.5, agrees on a classical group (X25519, secp256r1 or secp384r1), and the connection goes ahead.cnsa2has no fallback. - The implementation. The ML-KEM and X25519 code is AWS-LC's, through rustls and its aws-lc-rs provider. vcon-server does not build AWS-LC in its FIPS mode, and is not a FIPS 140-3 validated module.
Why it is first now
- NIST published ML-KEM as FIPS 203 on 2024-08-13: "At present, ML-KEM is believed to be secure, even against adversaries who possess a quantum computer."
- The IETF published RFC 10024, the hybrid key agreements for TLS 1.3 that include X25519MLKEM768, as a Proposed Standard in August 2026.
- NIST published the final NIST IR 8547, "Transition to Post-Quantum Cryptography Standards", on 2026-10-27; it names the quantum-vulnerable algorithms, among them the elliptic-curve key agreement that X25519 is, and the standards that replace them.
- The Cryptography Incident Review Group's initial assessment of 2026-11-30, of newly reported quantum attacks on module-lattice problems, found that "the reported attack falls far short of compromising the current NIST standards". It recommended "continuing the transition to post-quantum cryptography" and that those adopting the standards "choose the highest security level each application can support", and encouraged "hybrids that combine schemes based on different mathematical foundations". X25519MLKEM768 is such a hybrid: it keeps the connection as strong as X25519 even if ML-KEM were weakened. It uses ML-KEM-768, the middle level, not the highest.
None of this shows that anyone can break classical TLS today. The hybrid group is about traffic recorded now and kept until a quantum computer that can break X25519 exists.
Certificates and compatible peers
The key exchange does not depend on the certificate's type: the steps below agree on X25519MLKEM768 with the ECDSA certificate of getting started.
- Let's Encrypt. Its plans of 2026-12-03 say it issues ECDSA (P-256, P-384) and RSA certificates, and recommend that ACME clients ask for P-384 when they ask for ECDSA. Those certificates work with the hybrid group (get a Let's Encrypt certificate). It does not issue ML-DSA certificates yet, and aims to make ML-DSA Merkle Tree Certificates generally available in early February 2027.
- OpenSSL. OpenSSL 3.5.0 (2025-04-08) added ML-KEM, ML-DSA and SLH-DSA. Its release notes say its default TLS groups "include and prefer hybrid PQC KEM groups" and its default key shares are X25519MLKEM768 and X25519. So a client on OpenSSL 3.5 or later with its defaults agrees on X25519MLKEM768 with the server; one on OpenSSL 3.4 or earlier agrees on X25519.
- wolfSSL. wolfSSL 5.9.4 (2026-09-25) names the TLS groups
X25519MLKEM768 (4588), SecP384r1MLKEM1024 (4589) and ML-KEM-1024 (514)
in its
wolfssl/ssl.h. Itsconfigurebuilds ML-KEM by default unless SHA-3 or SHAKE is turned off, or the build is a FIPS build below version 7. ML-KEM alone as a TLS key exchange, without the hybrid, is off by default (--enable-tls-mlkem-standalone). wolfCLU 0.2.0 (2026-05-28) makes certificates that carry a conventional and a post-quantum signature, and signs and verifies with ML-DSA. wolfSSL is licensed under GPL-3.0 (with a GPL-2.0 exception for the software its LICENSING file lists) or commercially. vcon-server does not link it, and talks to a wolfSSL peer over TLS only.
CNSA 2.0
The Commercial National Security Algorithm (CNSA) Suite 2.0 is the US Government's algorithm policy for national security systems. A profile of TLS 1.3 for it, draft-becker-cnsa2-tls-profile-06 (an Informational Internet-Draft of 2026-10-30, not an IETF standard, with one of its two authors at the NSA), requires:
- TLS 1.3 only;
- the cipher suite TLS_AES_256_GCM_SHA384 only;
- ML-KEM-1024 (code point
0x0202) alone as the key exchange, first in the client's list; a server must not accept any other group; - ML-DSA-87 certificates and signatures;
- that the connection fail when any of these cannot be met, where interoperability with peers that are not CNSA compliant is not intended. Otherwise the draft does not require it to fail, and it is not CNSA compliant.
Status today: the server's default, X25519MLKEM768 with a classical fallback, is not CNSA 2.0 compliant. It also accepts TLS 1.2, and the certificate of getting started is ECDSA.
The trade-off. CNSA 2.0's ML-KEM-1024 alone drops the X25519 half that a hybrid group keeps, so the connection rests on ML-KEM alone. The CIRG assessment of 2026-11-30 asks both for the highest security level each application can support, which ML-KEM-1024 is, and for hybrids, which X25519MLKEM768 is, at the middle level.
From 0.4.22: the opt-in profile tls.profile = "cnsa2", which holds every connection to TLS 1.3, TLS_AES_256_GCM_SHA384,
ML-KEM-1024 and ML-DSA-87 and refuses S3 and a catalog in PostgreSQL at
start; see the CNSA 2.0 TLS profile. It needs
ML-DSA-87 certificates from a private CA: OpenSSL 3.5 and later make them
(openssl req -x509 -newkey ML-DSA-87). Let's Encrypt does not issue
ML-DSA certificates yet (see
certificates and compatible peers).
Two options are recorded and not approved to build:
- A FIPS build. A separate build with aws-lc-rs's
fipsfeature, so that TLS runs in AWS-LC's FIPS module, in its approved mode. On Linux x86_64 and aarch64 that feature links the module statically, andaws-lc-fips-sys0.14.4 builds AWS-LC FIPS 4.2.0 (its README still names 3.0.x). The NIST CMVP certificate #5596, "AWS-LC 4 Cryptographic Module (static)" (FIPS 140-3, validated 2026-11-19, "When operated in approved mode"), lists ML-KEM; its Security Policy names version AWS-LC FIPS 4.0.0. Which version a FIPS build uses, and whether a certificate covers it, has to be checked first. The project's recommendation is to build it only if regulated deployments need it. It would add build tooling, build time and binary size. Today's releases are not built in FIPS mode. - SecP384r1MLKEM1024. RFC 10024 also defines this hybrid of P-384 and ML-KEM-1024. rustls 0.23.46 does not have it. When rustls has it, whether to offer it by default will be measured and decided.
What each connection uses
| Connection | Side | Built in | Key exchange |
|---|---|---|---|
The API listener (listen) and the operator listener (operator.listen) | server | crates/vcon-server/src/api.rs | tls::provider() under the default profile, through Profile::server_config of tls.profile: takes the first group in the client's list that it has, so a client that lists X25519MLKEM768 first gets it |
The PostgreSQL catalog (catalog.postgres, with TLS) | client | crates/vcon-server/src/backend/postgres/connect.rs | tls::provider(): offers X25519MLKEM768 first, with shares for it and X25519; the PostgreSQL server picks the group |
vcon-server mcp (the MCP stdio proxy) and vcon-server tui | client | crates/vcon-server/src/mcp/stdio.rs | tls::provider() under the default profile, made the process default for reqwest by tls::install_default with the client file's tls_profile: offers X25519MLKEM768 first |
vcon-scale | client | crates/vcon-scale/src/main.rs | tls::provider() under the default profile, made the process default for reqwest by tls::install_default with --tls-profile: offers X25519MLKEM768 first |
An S3 bucket (storage.s3, and export.s3 for a Parquet export) | client | crates/vcon-server/Cargo.toml | The AWS SDK's own AWS-LC client, which takes no provider of ours; its tests in src/backend/s3.rs find that it agrees on X25519MLKEM768 with a server that has it |
| AWS credentials from the default chain over HTTPS (STS, for web identity and assumed roles) | client | crates/vcon-server/Cargo.toml | aws-config's default HTTPS client, AWS-LC through rustls, which takes no provider of ours; a test in src/backend/s3.rs finds that it offers X25519MLKEM768 first. The instance metadata service and the ECS credential endpoint are plain HTTP on a link-local address by default |
Under tls.profile = "cnsa2" (the client file's tls_profile = "cnsa2",
vcon-scale --tls-profile cnsa2) the listeners and those clients take
that profile's provider instead, with ML-KEM-1024 alone, and the server
refuses to start with S3 or a catalog in PostgreSQL, so the PostgreSQL,
S3 and AWS credentials rows do not apply.
tls::provider() is in crates/vcon-server/src/tls.rs. It names the
groups in this order: X25519MLKEM768, X25519, secp256r1, secp384r1. A test
(crates/vcon-server/tests/post_quantum_docs.rs) fails when a file of the
server calls the provider and this table does not name it, or when a row
names the provider for a file that does not call it. Another, in
crates/vcon-server/src/tls/tests.rs, fails when a file under crates/
outside the tls module contains default_provider(), CryptoProvider {,
ClientConfig::builder() or ServerConfig::builder(). Both tests are
text matches: a TLS configuration built another way is not caught.
These are outside this page: vCon JOSE (RS256, ES256, RSA-OAEP), whose algorithms the vCon draft names, and the encryption at rest, which is symmetric with 256-bit keys. SECURITY.md lists each and why.
Before you start
- A running server set up as getting started
leaves it: the certificate authority's copy for clients in
/usr/local/share/vcon-server/ca.pem, and the namevcon.example.comfor the server. The log lines of check it need release 0.4.21 or later. - OpenSSL 3.5 or later on the machine you check from, for the
openssl s_clientsteps. Debian 13 and Fedora 44 have it. OpenSSL 3.0 refuses the hybrid group's name (see when a step fails). - Changes on other systems:
- A client gets the hybrid group only if its TLS library has it. sipnab
0.5.283 and later (
--vcon-forwardand its other clients of the API) offer X25519MLKEM768 first by default. Other clients need a library with ML-KEM hybrids, such as OpenSSL 3.5 or rustls with aws-lc-rs. - A reverse proxy that ends TLS in front of the server agrees its own key exchange with the client. The hybrid group protects that hop only if the proxy has it, and the hop from the proxy to the server only if the proxy offers it there.
- A PostgreSQL server picks the group of the catalog connection. It
agrees on the hybrid group only when it is PostgreSQL 18,
built with OpenSSL 3.5 or later, with
ssl_groupslisting X25519MLKEM768, for examplessl_groups = 'X25519MLKEM768:X25519:prime256v1'(ssl_groups). PostgreSQL 18's default,X25519:prime256v1, gives X25519. PostgreSQL 17 and earlier take one curve inssl_ecdh_curve, by defaultprime256v1(secp256r1), and refuse the hybrid group's name.
- A client gets the hybrid group only if its TLS library has it. sipnab
0.5.283 and later (
- One shell for the steps: later steps use the variable the first step sets.
Steps
-
Set the variable the steps use:
CA=/usr/local/share/vcon-server/ca.pem -
Connect with the hybrid group alone, checking the certificate and its name, and read the group the server agreed:
openssl s_client -connect vcon.example.com:8443 -CAfile $CA -verify_return_error -verify_hostname vcon.example.com -groups X25519MLKEM768 </dev/null 2>&1 | grep -E '^(Negotiated TLS1.3 group|Peer Temp Key|Protocol|Verify return code):'Negotiated TLS1.3 group: X25519MLKEM768 Protocol: TLSv1.3 Verify return code: 0 (ok) -
Connect as a client without the hybrid group would, with X25519 alone. The server falls back to it:
openssl s_client -connect vcon.example.com:8443 -CAfile $CA -verify_return_error -verify_hostname vcon.example.com -groups X25519 </dev/null 2>&1 | grep -E '^(Negotiated TLS1.3 group|Peer Temp Key|Protocol|Verify return code):'Peer Temp Key: X25519, 253 bits Protocol: TLSv1.3 Verify return code: 0 (ok)
Step 2 has passed only when it prints all three lines above. openssl
prints the group line even when the certificate check fails, and
Verify return code: 0 (ok) even when the handshake failed before a
certificate arrived; the pipe hides its exit status.
Check it
The server logs the first connection its listeners accept on each group since it started, once, at info: at most five lines a run. The log covers the connections its listeners accept, not the ones it makes to PostgreSQL or S3. Under systemd, the groups agreed since the last start:
timeout 30 sh -c 'until sudo journalctl _SYSTEMD_INVOCATION_ID="$(systemctl show -p InvocationID --value vcon-server)" -o cat | grep -q "group=X25519$"; do sleep 1; done'
sudo journalctl _SYSTEMD_INVOCATION_ID="$(systemctl show -p InvocationID --value vcon-server)" -o cat | grep 'agree on this key-exchange group' | grep -o 'group=[A-Za-z0-9]*' | sort
group=X25519
group=X25519MLKEM768
Without systemd, the lines are in the output of vcon-server serve, in
the terminal it runs in. Each line reads
the first TLS connection since the start to agree on this key-exchange group
and ends with the group, such as group=X25519MLKEM768.
A server that has logged only group=X25519MLKEM768 since its start has had
no classical connection to its listeners. A line with another group means
a client, or a proxy, without the hybrid group, or that ranks a classical
group first, connected. The line does not name the client; a capture of
the handshakes does.
To see the group on the wire, capture the handshakes on either side for a
minute and read the group of each ServerHello with Wireshark's tshark:
sudo tshark -i any -f 'tcp port 8443' -a duration:60 -Y 'tls.handshake.type == 2' -T fields -e ip.dst -e ipv6.dst -e tls.handshake.extensions_key_share_group
It prints the client's address and 4588 for X25519MLKEM768 or 29 for
X25519, one line for each connection captured in that time; a connection
that needed a second ClientHello (a HelloRetryRequest) prints one more
line, with no group.
The catalog's PostgreSQL connections are not in the log, and PostgreSQL's
pg_stat_ssl view has no column for the group. To see the group the
PostgreSQL server picks, connect to it the same way from the vcon-server
host. OpenSSL 3.5 offers the same first two groups as the catalog client:
openssl s_client -starttls postgres -connect db.example.com:5432 </dev/null 2>&1 | grep -E '^(Negotiated TLS1.3 group|Peer Temp Key|Protocol):'
Negotiated TLS1.3 group: X25519MLKEM768 means the catalog connection
agrees on the hybrid group. Peer Temp Key: X25519, 253 bits or
Peer Temp Key: ECDH, prime256v1, 256 bits means it agrees on a
classical group.
When a step fails
| What you see | Why | What to do |
|---|---|---|
Step 2 prints nothing; without the pipe into grep the command prints Call to SSL_CONF_cmd(-groups, X25519MLKEM768) failed | The openssl command is older than 3.5 and does not have the hybrid group | Run the step from a machine with OpenSSL 3.5 or later, or read the server's log lines instead |
Step 2 prints Negotiated TLS1.3 group: <NULL>, still followed by Verify return code: 0 (ok); without the pipe into grep it also shows alert handshake failure | The handshake failed: with only the hybrid group offered, a server without it has no group in common and ends the handshake. A proxy in front of the server, or another TLS server on that address, does not have the hybrid group | Connect to the server's own address, not the proxy's |
A step prints Verify return code with a number other than 0, such as 18 (self-signed certificate) or 62 (hostname mismatch), even with a group line above it | The certificate could not be checked, and -verify_return_error makes openssl exit with 1: the CA file is not the one that issued the server's certificate, or the name is not the certificate's | Use the ca.pem of getting started, or your own CA's file, and the name in the certificate |
The log shows group=X25519 or group=secp256r1 for a client you expected to be hybrid | The client's TLS library has no hybrid group, or lists a classical group first; or the client speaks TLS 1.2 | Update the client (sipnab 0.5.283 or later; OpenSSL 3.5 or later), or put X25519MLKEM768 first in its list of groups |
The PostgreSQL check prints Peer Temp Key: X25519 or ECDH, prime256v1 | The PostgreSQL server picks a classical group: PostgreSQL 18 with its default ssl_groups, or PostgreSQL 17 or earlier, or a build with OpenSSL before 3.5 | Nothing on the vcon-server side. On PostgreSQL 18 built with OpenSSL 3.5 or later, set ssl_groups = 'X25519MLKEM768:X25519:prime256v1' and reload PostgreSQL |
Source of this page: website/content/docs/post-quantum-tls.md