Ali Raza

The lattice rumor sent me to ssl_groups

The lattice rumor sent me to ssl_groups

On Sunday night Andrew Curran posted on X that Anthropic “has made a major breakthrough in theoretical cryptanalysis.” By this morning the post had 13,830 likes and 3.9 million views. His evidence is a workshop schedule and a new website. The Lattice Frontier Workshop, an invitation-only event at MIT CSAIL on November 16 and 17, had a Day 2 noon panel called “Understanding the Anthropic results.” A commit on Sunday at 18:33 (UTC+3) renamed it to “Discussion.”

Earlier on Sunday Steve Weis shared cirg.org, the new Cryptography Incident Review Group. It has 21 members, and every academic speaker and organizer on the workshop program is on the list. Its only statement page currently reads “This statement has not been published yet.” Scott Aaronson’s Friday post is a mock phone call in which he says the labs will soon release a breakthrough “which breakthrough, however, will not lead to imminent danger for any currently deployed cryptosystems.” His update to the post complains that people read the joke as a scoop.

So far the public record is a renamed panel and a statement page with nothing on it. Curran’s reading, that Claude found something in lattice cryptanalysis, is his inference. I can’t add anything to that. What I can do is check what my own connections are actually using, since the lattice part is the bit that touches stuff I run.


Why lattices touch my servers at all

ML-KEM, the post-quantum key exchange NIST standardised, is built on a lattice problem. Over the last two years it shipped into browsers, OpenSSL 3.5, Go’s crypto/tls and OpenSSH 10. If someone found a real weakness in it, that is the code path that would get hit.

What shipped is a hybrid. The TLS group is called X25519MLKEM768, and RFC 10024 defines it. Both sides run ML-KEM-768 and classic X25519 in the same handshake, and the shared secret is the two 32-byte results concatenated. The RFC defines hybrid as security “as long as at least one of the component algorithms remains secure.”

Client sends a 1,184-byte ML-KEM key and a 32-byte X25519 share, the server answers with a 1,088-byte ciphertext and its own 32-byte share, both sides compute two 32-byte secrets and concatenate them into the TLS 1.3 key schedule Someone reading a recorded session needs both secrets. Source: RFC 10024, sections 4.1 to 4.3.

So a lattice break by itself puts a hybrid connection back to plain X25519, which is what most TLS connections used before 2024. Traffic recorded today would need that break plus a quantum computer big enough to break X25519. Vinod Vaikuntanathan, one of the workshop hosts, put the general version in his thread on Sunday: “Have Plan B and Plan C ready before Plan A breaks.” A hybrid handshake already runs two unrelated algorithms. The connections to worry about are the ones that still run only X25519.


What my connections negotiate

I asked each host for its TLS 1.3 group from my box, which runs OpenSSL 3.5.9. Its default group list offers X25519MLKEM768 first, so the answer is whatever the server prefers.

echo | openssl s_client -connect github.com:443 -servername github.com 2>/dev/null \
  | grep -E "Negotiated TLS1.3 group|Peer Temp Key"

A hybrid answer prints Negotiated TLS1.3 group: X25519MLKEM768. A classic one prints Peer Temp Key: X25519, 253 bits. Run on 2026-11-30 around 10:05 (UTC+3):

Host Group Protocol
aliirz.com (GitHub Pages) X25519MLKEM768 TLS 1.3
phntm.sh X25519MLKEM768 TLS 1.3
api.anthropic.com, api.openai.com X25519MLKEM768 TLS 1.3
huggingface.co, ollama.com X25519MLKEM768 TLS 1.3
pypi.org, files.pythonhosted.org X25519MLKEM768 TLS 1.3
github.com, api.github.com X25519 TLS 1.3
registry.npmjs.org X25519 TLS 1.2

Two of these surprised me. This blog’s static pages get a hybrid handshake, but git push over HTTPS to github.com gets plain X25519. GitHub’s SSH endpoint is a different story. It has offered sntrup761x25519-sha512 since September 2025 and its changelog put mlkem768x25519-sha256 on github.com from October 14, which is OpenSSH 10’s default. So my SSH remotes get a hybrid key exchange and my HTTPS remotes don’t. The npm registry still answered with TLS 1.2.

My box couldn’t reach port 22 on GitHub, so for SSH I’m going on GitHub’s changelog and the client defaults (ssh -G github.com | grep kexalgorithms lists mlkem768x25519-sha256 first).


Postgres 19 still says X25519:prime256v1

Most of the hybrid answers above come from CDNs and API providers that turned it on for every customer. The database connection is the one I configure myself, so I pointed the same check at a fresh PostgreSQL 19.0 cluster with ssl = on. OpenSSL has a -starttls postgres mode, which sends Postgres’s SSLRequest before the handshake:

$ psql "host=localhost port=5499 user=postgres sslmode=require" -Atc "show ssl_groups"
X25519:prime256v1

$ echo | openssl s_client -starttls postgres -connect localhost:5499 2>/dev/null \
    | grep -E "Negotiated TLS1.3 group|Peer Temp Key"
Peer Temp Key: X25519, 253 bits

That matches the docs: “The default is X25519:prime256v1.” The server is linked against OpenSSL 3.5.9 and could do the hybrid, but ssl_groups tells it not to. The setting was renamed from ssl_ecdh_curve in Postgres 18, which is also when it started taking a colon-separated list.

The fix is one line. I put the hybrid first and kept the old groups after it:

$ psql "host=localhost port=5499 user=postgres sslmode=require" \
    -c "ALTER SYSTEM SET ssl_groups = 'X25519MLKEM768:X25519:prime256v1'"
$ psql "host=localhost port=5499 user=postgres sslmode=require" -c "SELECT pg_reload_conf()"

The first time I sent both statements in one -c and got ERROR: ALTER SYSTEM cannot run inside a transaction block, so they’re separate here. A reload is enough. The log shows parameter "ssl_groups" changed to "X25519MLKEM768:X25519:prime256v1" and new connections pick it up without a restart:

$ echo | openssl s_client -starttls postgres -connect localhost:5499 2>/dev/null \
    | grep -E "Negotiated TLS1.3 group|Peer Temp Key"
Negotiated TLS1.3 group: X25519MLKEM768

pg_stat_ssl shows the protocol version and cipher but not the group, so openssl s_client is the only way I found to see it from outside.

Which clients can follow

Changing the server only helps if the clients offer the hybrid too. To find out, I set ssl_groups = 'X25519MLKEM768' with nothing else and connected with every Postgres client I had:

Client TLS library Result
psql 19.0 system OpenSSL 3.5.9 connected, TLS 1.3
psql 17 system OpenSSL 3.5.9 connected
psycopg 3.3.9 (binary wheel) bundled libpq 18.6 and OpenSSL 3.5.9 connected, TLS 1.3
asyncpg 0.32.0 Python 3.13 ssl, OpenSSL 3.5.9 connected, TLS 1.3
pgx v5.13.0 Go 1.27.3 crypto/tls connected, CurveID = X25519MLKEM768
openssl s_client -groups X25519 stand-in for an older client handshake failure, alert 40

The last row is what an app on an older OpenSSL looks like. The client gets alert 40 and the server logs could not accept SSL connection: no suitable key share. That’s why my real config keeps X25519:prime256v1 after the hybrid. Old clients fall back to what they had before, and new ones get both algorithms.

The pgx check reads the group from tls.ConnectionState inside VerifyConnection, which is handy if you want an app to log it:

cfg, _ := pgx.ParseConfig("postgres://postgres@localhost:5499/postgres?sslmode=require")
var group tls.CurveID
cfg.TLSConfig.VerifyConnection = func(cs tls.ConnectionState) error {
	group = cs.CurveID
	return nil
}
conn, err := pgx.ConnectConfig(context.Background(), cfg)
// group.String() == "X25519MLKEM768"

Go has used the hybrid by default since 1.24 when CurvePreferences is nil, so a Go service needs no change on its side.


What the hybrid costs

Most of the cost is bytes. I timed 2,000 TLS 1.3 handshakes per group in a small Go program, client and server over loopback on one 8-core Xeon VM, with the same ECDSA certificate each time.

Bar chart: with X25519 the client sends 351 bytes and receives 660; with X25519MLKEM768 it sends 1,535 and receives 1,748 The extra bytes are the ML-KEM key going out and the ciphertext coming back. Source: my loopback test on 2026-11-30, sizes checked against RFC 10024.

Group Client sends Client receives Median handshake, 3 runs
X25519 351 B 660 B 432, 421, 444 µs
X25519MLKEM768 1,535 B 1,748 B 653, 656, 703 µs

That’s 2,272 bytes more per handshake and about a quarter of a millisecond more on loopback, where both ends share the same CPU. For a Postgres app with a connection pool that handshakes a few times a minute, I can’t see that mattering. A service that opens a fresh connection per request might notice it. The OpenSSL docs also warn that the bigger ClientHello can stop fitting in a single TCP segment, and some firewalls break the handshake when that happens. Postgres traffic that crosses a middlebox should get a test before the config goes to production.

One limit to keep in mind: this only covers key exchange. The certificates are still ECDSA or RSA. That matters for someone impersonating a server live, which is a different problem from recorded traffic being read later.


What I’m changing

On the Postgres servers I run, postgresql.conf gets this line, after checking that the server is on 18 or newer and its OpenSSL is 3.5 or newer:

ssl_groups = 'X25519MLKEM768:X25519:prime256v1'

I’m leaving out the pure MLKEM768 group. If the lattice rumor turns out to be about ML-KEM, a connection that uses only ML-KEM has nothing left protecting its session key, and a hybrid one is back to X25519. I’ll read the CIRG statement when it’s actually up, and run the same s_client checks again then.

Resources

security postgres cryptography tls post-quantum go python