Your app makes outgoing connections all day: to a payment API, to a mail service, to a database on another host. Each one starts with a TLS handshake, and one step of that handshake, the key exchange, decides whether a recording of the traffic could be decrypted years from now. This article shows how to read which key exchange your own runtime actually negotiated, from inside the container, in about ten minutes.
The prompt is two posts from 3 December 2026. Vercel's CTO Malte Ubl published a post on post-quantum cryptography that puts the point in one sentence: "post-quantum protection depends on both your runtime and the destination you are calling". DigitalOcean's post on the same subject, as of its 3 December update, tells readers to take inventory of the protocols and cryptographic libraries their applications depend on. Both are about each company's own platform. The instruction underneath applies to any app on any host, and it is checkable.
Read this as hygiene, not as a rule anyone has set: you find out what your app does today, for the price of a few commands.
What "harvest now, decrypt later" means for an ordinary app
DigitalOcean describes the risk this way: someone can collect encrypted traffic today and keep it until a quantum computer is able to decrypt it. That matters only for data that is still sensitive years later. A cache-busting request is not worth storing. Card data sent to a payment API, health records, or credentials sent to a database on another network may be.
The part of TLS this touches is the key exchange, the step where both sides agree on a session key. The classical choice in TLS 1.3 is usually X25519. The post-quantum choice Vercel's post names, and the one we saw negotiated, is a hybrid called X25519MLKEM768: it combines X25519 with ML-KEM-768, so the session stays protected as long as either one holds. It exists only in TLS 1.3.
Which half of the handshake is yours
A handshake is a negotiation, so there are two halves.
- Your half: the TLS library inside your runtime. Official Node.js builds carry their own copy of OpenSSL, so your Node.js version decides it. Python and PHP use the OpenSSL they were built against, so your base image decides it. Your hosting provider's edge normally plays no part in an outgoing call.
- The other half: the destination. If the API you call does not offer a post-quantum group, your runtime falls back to a classical one, and nothing in your logs says so.
You can change the first half with a version bump. You can only measure the second.
Step 1: inventory
List every host your app opens a connection to: payment, email, object storage, auth, webhooks you send, and any database that is not on the same private network. Then note which runtime makes each call. A compiled database driver can carry its own TLS library inside the package, separate from the one your runtime uses, so list drivers on their own line.
Step 2: read what was negotiated
Everything below was run on 4 December 2026. We used www.cloudflare.com as the destination because it accepted the hybrid group in every test where the client offered it. Replace it with the hosts from your inventory.
Node.js
node -e "const tls=require('tls');const h=process.argv[1];const s=tls.connect({host:h,port:443,servername:h},()=>{console.log(process.version,'OpenSSL',process.versions.openssl,s.getProtocol(),s.getEphemeralKeyInfo());s.end()})" www.cloudflare.com
What we got:
- Node.js 18.20.0 (OpenSSL 3.0.13) and 20.19.6 (OpenSSL 3.0.17):
{ type: 'ECDH', name: 'X25519', size: 253 }. Classical. The officialnode:20-alpineimage (20.20.2, OpenSSL 3.0.19) gave the same. - Node.js 22.22.0 (OpenSSL 3.5.4) and the official
node:22-alpineimage (22.23.4, OpenSSL 3.5.9): an empty object,{}.
The empty object is easy to misread. It means the key exchange was not plain ECDH; it does not name what it was. To see the name, turn on the handshake trace and look for the group the server chose:
node -e "const tls=require('tls');const h=process.argv[1];const s=tls.connect({host:h,port:443,servername:h,enableTrace:true},()=>s.end())" www.cloudflare.com 2>&1 | grep NamedGroup
On Node.js 22.22.0 the last line read NamedGroup: X25519MLKEM768 (4588). On 20.19.6 every line read ecdh_x25519 (29). We did not have Node.js 24 or later on the test machine, so we make no statement about it from measurement; Vercel's post recommends 24 or later for apps still on 20 or older.
Is it my runtime or the destination?
Offer only the hybrid group and see whether the destination accepts:
node -e "const tls=require('tls');const h=process.argv[1];const s=tls.connect({host:h,port:443,servername:h,ecdhCurve:'X25519MLKEM768'},()=>{console.log(h,'accepted X25519MLKEM768');s.end()});s.on('error',e=>console.log(h,'refused:',e.code))" www.cloudflare.com
On Node.js 22.22.0, www.cloudflare.com accepted. api.github.com refused with a handshake failure. Read with OpenSSL and with Python, both it and api.stripe.com negotiated X25519. Those are results from one machine on one day, so run the check yourself before drawing a conclusion about any provider. On Node.js 20.19.6 the same command stops before connecting with Failed to set ECDH curve: that runtime does not know the group at all.
Use this only as a test. Setting a single group in production code breaks every connection to a destination that does not support it.
Python
The ssl module in the Python 3.14.7 we tested (linked to OpenSSL 3.6.3) has no public call that returns the negotiated group, and set_ecdh_curve('X25519MLKEM768') was rejected as an unknown curve name. The group can still be read from the server's reply with the module's debug hook:
# Prints the key-exchange group the SERVER chose, read from the ServerHello itself.
# Uses ssl's private debug hook (_msg_callback): fine for a one-off check, not for production code.
import ssl, socket, sys
NAMES = {0x001d: "X25519", 0x0017: "secp256r1", 0x0018: "secp384r1",
0x11ec: "X25519MLKEM768", 0x11eb: "SecP256r1MLKEM768", 0x11ed: "SecP384r1MLKEM1024"}
host = sys.argv[1]
chosen = []
def cb(conn, direction, version, content_type, msg_type, data):
if direction == "read" and getattr(msg_type, "name", "") == "SERVER_HELLO":
p = 4 + 2 + 32 # header, legacy version, random
p += 1 + data[p] # session id
p += 2 + 1 # cipher suite, compression
end = p + 2 + int.from_bytes(data[p:p+2], "big"); p += 2
while p < end:
t = int.from_bytes(data[p:p+2], "big"); n = int.from_bytes(data[p+2:p+4], "big")
if t == 51: chosen.append(int.from_bytes(data[p+4:p+6], "big"))
p += 4 + n
ctx = ssl.create_default_context(); ctx._msg_callback = cb
with socket.create_connection((host, 443), timeout=10) as raw:
with ctx.wrap_socket(raw, server_hostname=host) as s:
g = chosen[-1] if chosen else None
print(host, s.version(), NAMES.get(g, hex(g) if g else "not seen"), "| Python", sys.version.split()[0], "|", ssl.OPENSSL_VERSION)
Run it as python3 kx_group.py www.cloudflare.com. With no extra configuration it printed X25519MLKEM768 for that host, and X25519 for the two API hosts above.
PHP and anything that uses curl
curl -sv -o /dev/null https://www.cloudflare.com 2>&1 | grep 'SSL connection'
In the official php:8.3-apache image we had (curl 8.14.1, OpenSSL 3.5.5) this printed SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384 / X25519MLKEM768 / id-ecPublicKey. The third field is the group.
The openssl command
openssl s_client -connect www.cloudflare.com:443 -servername www.cloudflare.com </dev/null 2>/dev/null | grep -E 'Negotiated TLS1.3 group|Peer Temp Key'
With OpenSSL 4.1.0 a hybrid handshake printed Negotiated TLS1.3 group: X25519MLKEM768 and a classical one printed Peer Temp Key: X25519, 253 bits. This tells you about the openssl binary, which may not be the library your app uses. Check from the runtime that makes the real calls.
Step 3: fix the half you own
In our tests the dividing line was the OpenSSL underneath: every runtime we tested on OpenSSL 3.0 negotiated X25519, and every one on 3.5 or later moved off plain X25519 when the destination offered the hybrid group. So the fix is a version change, not a configuration flag:
- Node.js: move off a release that bundles OpenSSL 3.0. Print
process.versions.opensslto see what yours carries. - Python and PHP: use a current base image. Print
ssl.OPENSSL_VERSIONin Python, orphp -r 'echo OPENSSL_VERSION_TEXT;'in PHP. - Destinations that only offer X25519: you cannot change them. Record which ones they are, and rerun the check after their next announcement.
What is not affected
Two things are worth crossing off before you spend a weekend on the wrong layer. DigitalOcean's post says symmetric encryption such as AES-256 is not what known quantum attacks break, so data you encrypt at rest that way is not the problem. Vercel's post says the same of internal JSON Web Tokens signed with a shared key: they do not need to change. The key exchange on connections that carry long-lived secrets is the layer to check first.
The short version
Your outgoing TLS is negotiated by your runtime and the destination, and neither one tells you what was agreed unless you ask. Ask once per destination. Where your side is the limit, a current runtime and a current base image fix it, and the same change brings the security patches we covered in rebuilding your container image after a Node.js security release.
Sources, read 4 December 2026: Vercel, "Vercel’s response to the NSA guidance on post-quantum cryptography" by Malte Ubl (3 December 2026), and DigitalOcean, "How DigitalOcean is Preparing for Post-Quantum Cryptography" (page labelled updated 3 December 2026). Statements attributed to them describe their own platforms and views. The commands and results are ours, from one test machine and official runtime images; this article makes no statement about any hosting platform's own TLS configuration, including ours.