TLS agrees a fresh secret with a stranger in public, proves the stranger is the named server by a signature that chains up to a root your client already trusts, and then encrypts every byte with keys derived from that secret and the whole conversation.
Your code sends POST /v1/messages with an API key and a user's words. Between your laptop and the API sit a Wi-Fi router, an internet provider, maybe a corporate proxy and several cloud hops. Any of them could read those bytes, change them, or pretend to be the API. TLS (Transport Layer Security) stops all three: it gives confidentiality, integrity and authentication. It runs on top of TCP (or inside QUIC for HTTP/3), under HTTP, and it is the "S" in HTTPS. The current version is TLS 1.3, re-published in July 2026 as RFC 9846, which replaced RFC 8446 (and TLS 1.2's RFC 5246).
One round trip buys all three properties. Fig. 1 assembles the connection from the four tools of section 1, with the sizes recorded for the running request:
The same handshake, as recorded on this machine for the running request (Python 3.13 with OpenSSL 3.5.9, 5 October 2026). Grey-yellow chips are readable by anyone on the path; the lock means encrypted:
You need: TCP, round trips and the congestion window from Networking foundations; what HTTP sends inside the pipe from HTTP. Not here: API keys and OAuth tokens inside the encrypted request (Auth), the name lookup that happens first, CAA and the HTTPS record (DNS), SSH keys, and SSH certificates against X.509 (SSH, section 4). The parent's On the wire tab times TLS 1.2 against 1.3 and a cold against a resumed connection on an emulated 50 ms path, and its Failure lab tab reproduces eight TLS failures with the exact error text of five clients; this page links them by name instead of repeating them.
The full glossary is in the Reference section at the end.
| You see | Likely cause | Go to |
|---|---|---|
certificate has expired, not yet valid | Renewal failed; the client's clock is wrong | 5, 9 |
unable to get local issuer certificate; works in the browser | Server omits the intermediate; or a private or inspecting CA missing from this client's store | 4, 9 |
hostname mismatch, not valid for | The name you dialled is not in the SANs (IP address, wildcard one level too deep) | 4 |
certificate required, 400 No required SSL certificate | mTLS server, client sent no certificate | 7 |
| gRPC fails only behind a load balancer | No ALPN h2 on that hop | 10 |
| Handshake fails only through one network, after a library upgrade | A middlebox that cannot handle a large post-quantum ClientHello | 8 |
| Duplicate generations or tool calls after enabling "TLS 1.3 early data" | 0-RTT replay | 3 |
The recorded TLS 1.3 flights of the running request (5 October 2026): readable chips grey-yellow, encrypted ones with a lock.
Three attackers sit on the path. A passive one records everything (a coffee-shop Wi-Fi, a tap at an internet exchange, or someone storing traffic to decrypt in ten years). An active one also changes bytes in flight. An impostor answers in the server's place (a poisoned DNS answer or a hostile proxy). TLS defeats all three with four tools. You never implement them, but every TLS error message is about one of them.
One secret key, shared by both ends, encrypts and decrypts. TLS uses an AEAD cipher, AES-GCM or ChaCha20-Poly1305: each encrypted record carries a 16-byte tag that only a holder of the key can compute, so changing one bit makes decryption fail. Confidentiality and integrity together.
The request grows by 17 bytes, and an observer still sees its size. Checked on the recording: the running request, as it left this machine, was 277 bytes of HTTP and became one encrypted record of 294 bytes: 277 + 1 byte of hidden content type + 16 bytes of tag = 294 (278 bytes of ciphertext, then the tag), behind a 5-byte header in clear: 299 bytes on the wire (RFC 9846 section 5.2). Each streamed token record grows the same 17 bytes. The record drawn to scale inside every other layer's wrapping is Fig. 2 of Topic: protocols, which owns that picture.
It is fast: AES-128-GCM ran at on one core of this laptop, ChaCha20-Poly1305 at (OpenSSL 3.6 speed, 16 KB blocks), so encrypting a token stream costs nothing you will notice. ChaCha20 exists for CPUs without AES instructions (older phones); servers with AES hardware prefer AES-GCM.
The shared key cannot be sent, since the passive attacker would read it. Diffie-Hellman (DH) solves this: each side keeps a random private number and sends a public value derived from it; each combines its own private number with the other's public value, and both arrive at the same secret, while someone who saw both public values cannot compute it. Predict first: if you change only the server's private number, does the client's computed secret change? Then move it:
Forward secrecy follows: the private numbers are fresh per connection and thrown away, so a server key stolen next year cannot decrypt today's recording. TLS 1.2 also allowed "RSA key transport" (the client encrypted the secret to the server's certificate key), which had no forward secrecy; TLS 1.3 removed it. A KEM (key encapsulation mechanism) does the same job in a different shape: the client sends a public key, the server encapsulates a fresh random secret to it and sends back the ciphertext, which only the client can open. ML-KEM, the post-quantum one, is a KEM; TLS 1.3's key_share carries either kind.
Illustrative: toy-sized numbers with generator g = 5. Real TLS uses X25519 (32-byte public values) or X25519MLKEM768 (section 8), where recovering a from A is infeasible.
A hash (SHA-256, SHA-384) turns any input into a fixed-size fingerprint. TLS hashes the whole conversation so far (the transcript) and feeds it, with the shared secret, into HKDF, a key-derivation function that stretches one secret into many independent keys (RFC 9846 section 7.1):
Simplified: the real schedule chains an early secret (from a PSK, section 3), a handshake secret (adds the key-exchange output) and a master secret, and each key is HKDF-Expand-Label of one of them with a label and the transcript hash at that point. An attacker who changes any handshake byte makes the two sides derive different keys, so the Finished check fails.
Key exchange alone would happily agree a key with an impostor. A signature fixes that: a private key signs, the matching public key verifies, nobody without the private key can forge one (ECDSA P-256 here: a 65-byte public key and signatures of about 70 bytes, 70 in the recording; RSA-2048; the post-quantum ML-DSA). The server signs the handshake transcript. Which public key is the real API's? A certificate answers: "the public key K belongs to the name api.anthropic.com", signed by a certificate authority (CA), whose own certificate is signed by another, up to a root that ships in your operating system or language runtime: the trust store (sections 4 to 6).
Everything below comes from one recording: the running request sent by a Python 3.13 client (OpenSSL 3.5.9) to a local TLS server, every byte that crossed the socket logged, and the client's session secrets written to a key log (the SSLKEYLOGFILE mechanism Wireshark uses) so this page could decrypt every record (src/lab/hs_record.py).
Fig. 2 lays the recording on the floor: the client on the left, the server on the right, time running towards you; each box is one handshake message, its height its size, yellow if anyone on the path can read it, blue if it is encrypted.
X25519MLKEM768 (1,216 bytes) and x25519 (32). The hybrid share is why this ClientHello is 1,529 bytes; without it OpenSSL's is about 240.TLS_AES_256_GCM_SHA384, the version, and the server's key_share for X25519MLKEM768: 1,120 bytes (the ML-KEM ciphertext of 1,088 plus a 32-byte X25519 value, the sizes in RFC 10024 section 4). Both sides can now compute the shared secret, and the server switches to handshake keys. Everything after this is encrypted, the big privacy change from TLS 1.2:http/1.1. Then the Certificate (917 bytes): the server's certificate (478 bytes) and the intermediate CA's (421 bytes). Not the root: the client already has it.On the wire an observer sees five records all labelled application_data, plus one meaningless one-byte change_cipher_spec sent only so that old middleboxes believe they are watching TLS 1.2 (RFC 9846 appendix D.4).
TLS_AES_256_GCM_SHA384, TLS_CHACHA20_POLY1305_SHA256, TLS_AES_128_GCM_SHA256); key exchange and signature are negotiated separately. This client also lists TLS 1.2 suites in case the server is old.api.llm.test, in clear, so one IP address can host many sites and pick the right certificate. alpn: http/1.1 here (a browser sends h2 too); there is no other way to reach HTTP/2 over TLS.X25519MLKEM768 (1,216 bytes, post-quantum hybrid) and x25519 (32 bytes). The hybrid share is why this ClientHello is 1,529 bytes; without it OpenSSL's is about 240 (section 8).psk_dhe_ke: "if we resume, still do a fresh key exchange" (section 3).Step through the recording record by record. Predict first: in the observer view, which record is the server's certificate, and can you tell from the outside? This card is a tool you drive (choose a recording and a view, then step or click a row); it does not play by itself.
hs_record.py recomputes the server's and the client's Finished values with HKDF and HMAC and verifies the server's CertificateVerify signature with the public key from the decrypted certificate: . src/recompute.py redoes it from raw/.src/lab/hs_record.py, src/lab/tlsparse.py.Record 5 in TLS 1.3 is 934 bytes of ciphertext; the endpoint view shows it is the certificate. In TLS 1.2 the certificate is readable on the wire; in mTLS the client's own certificate and its SPIFFE ID travel encrypted. Python 3.13.16 with OpenSSL 3.5.9 on both ends, loopback, times in milliseconds since the TCP connection opened.
The same request, server and certificate, recorded twice, once with the server limited to TLS 1.2. Each arrow is one network trip. Predict: how many round trips before the request can leave in each, and is the certificate readable?
If the server accepts none of the client's key shares, it replies with a HelloRetryRequest (a ServerHello with a fixed magic random value) naming the group it wants, and the client starts over: one extra round trip (RFC 9846 section 4.1.4). So a client that offers only a hybrid share to a server that only does classical X25519, or the reverse, pays a full round trip on every new connection. OpenSSL 3.5 and later send both shares by default for exactly this reason (OpenSSL 3.5 release notes); a hand-tuned groups list can undo it.
After TLS 1.3 the only content an observer still reads is the ClientHello, and its SNI says exactly which site you visit. Encrypted Client Hello (ECH, RFC 9849, March 2026) splits it: an outer ClientHello naming a shared front end (a CDN's public name) and an inner one, with the real SNI and ALPN, encrypted to a public key the front end publishes in its DNS HTTPS record (RFC 9848). It only hides something if many sites share the front end, so in practice it is a CDN feature; it is pointless over plaintext DNS, which leaks the name anyway (see DNS); and networks that filter by SNI lose that signal, so an ECH client behind such a filter fails in ways that look like network errors rather than policy blocks.
A full handshake costs a round trip plus asymmetric cryptography (a key exchange and a signature on the server, a verification and certificate checks on the client), and clients reconnect to the same server all the time. After the handshake the server sends a NewSessionTicket (the 249-byte message in the recording): an opaque blob, usually the session's resumption secret encrypted under a key only the server fleet knows (a session ticket key), plus a lifetime. Next time the client puts the ticket in its ClientHello as a pre-shared key (PSK); if the server can decrypt it, both sides skip the certificate and its signature.
With the psk_dhe_ke mode the resumed handshake still does a fresh key exchange, so forward secrecy holds; the alternative psk_ke skips it and loses forward secrecy for that connection (RFC 9846 section 4.2.9). The client in the recording offers only psk_dhe_ke. What it saves, measured here (300 small requests each, loopback, no network delay, so CPU and system calls only; src/lab/hs_cost.py), is step 3 of Fig. 3.
Fig. 3 puts resumption on a fleet: two front ends standing for the terminators of one service, sharing a session ticket key as in the recorded run, and a backend that counts billed generations. A ticket skips the certificate; early data skips the wait, and loses replay protection.
psk_dhe_ke).Early-Data: 1 with requests that arrived as early data, and the backend answers 425 Too Early without running anything; the replay gets the same 425.On a real network add one TCP round trip and one TLS round trip to each new connection, resumed or not. The lesson for clients: one long-lived connection pool per process. A new httpx.Client or requests.Session per call pays all of this per call.
How resumption fails silently. Behind a load balancer, each terminator that creates tickets with its own random key cannot decrypt the others' tickets; resumption then "works" only when you happen to land on the same machine, and nothing logs an error. Fleets share and rotate ticket keys (nginx ssl_session_ticket_key, files rotated by your own tooling), the setup used below. A stolen ticket key decrypts every ticket made with it, so rotate it often (daily is common) and keep it out of disks and backups.
With a ticket, the client can derive an early traffic key from the PSK alone and send application data in its very first flight: zero round trips before the request leaves. The catch, RFC 9846 section 8: early data is not protected against replay. The server has not contributed any fresh randomness yet, so an attacker who recorded the first flight can send the same bytes again and the server will decrypt the same request again. Server-side defences (single-use tickets, a cache of recent ClientHellos, freshness windows) are all partial, especially across many servers.
Recorded here (src/lab/zero_rtt.py, nginx 1.31.6 with OpenSSL 3.6.5, ssl_early_data on): two nginx instances standing for two front ends of one fleet share a ticket key; behind them a stand-in backend counts "generations" (each POST is one billed generation). An openssl s_client makes a full handshake and keeps the ticket, then resumes and sends the running request as early data through a recording proxy. The attacker then resends the recorded first flight, byte for byte, without knowing any key:
Three replays, three extra billed generations; in an agent loop each could be a repeated side-effecting tool call.
$ssl_early_data to the backend (ssl_early_data); OpenSSL's own replay protection (on by default in s_server, per its manual) depends on a server-side session cache, which a fleet of stateless-ticket terminators does not have.The standard fix is RFC 8470: the terminator marks requests that arrived as early data with Early-Data: 1; a backend that cannot tolerate replay answers 425 Too Early, and a conforming client retries after the handshake completes. Run 2 above does that: the early request and its replay both got 425 and no generation ran.
Early-Data: 1 and refuses with 425. The saving (one round trip on resumed connections) is rarely worth it for an API that then thinks for seconds; a kept-alive connection saves more.openssl s_client does not, so the run stops at 425. Browsers and HTTP libraries that implement early data retry automatically; check yours before enabling it.A certificate is an X.509 document (RFC 5280) encoded in DER (binary) and usually stored as PEM (that DER in base64 between -----BEGIN CERTIFICATE----- lines). The leaf is signed by an intermediate CA, which is signed by a root. Roots live offline in vaults and sign rarely; intermediates do the daily issuing, so a compromised intermediate can be revoked without changing every trust store on earth. The server must send its leaf and every intermediate; sending the root is useless (the client must already have it to trust it) but harmless. Fig. 4 walks the chain api.anthropic.com served on 5 October 2026.
Two clients can build two valid paths through the same chain. Path building is a search, not a list: a client starts from the leaf and looks for any issuer it can chain to a root in its store. That matters because of cross-signing, and it is the usual reason for "works in Chrome, fails in Java".
api.anthropic.com (894 bytes), the intermediate WE1 (675) and GTS Root R4 (894).ecdsa-with-SHA256) must verify with WE1's public key.ecdsa-with-SHA384) must verify with GTS Root R4's key. Every certificate above the leaf must say CA:TRUE in Basic Constraints and allow keyCertSign, and a pathlen limit, if any, must hold.unable to get local issuer certificate (missing intermediate, or root not trusted here) or self-signed certificate in certificate chain.sha256WithRSAEncryption). An older client that only knows GlobalSign follows the cross-sign one step further. Different clients can therefore build different valid paths through the same chain.certificate has expired or certificate is not yet valid (the client's clock is behind).api.anthropic.com. Extended Key Usage must include serverAuth for a server (and clientAuth for an mTLS client, section 7); this leaf has serverAuth only.Name matching in detail. The old Common Name field is ignored: Chrome dropped the fallback in Chrome 58 in 2017 (Chrome Platform Status) and RFC 9525 says CN "MUST NOT be used". A wildcard matches exactly one whole left-most label: *.example.com covers a.example.com but not a.b.example.com and not example.com. Dialling an IP address needs an IP SAN (the lab leaf has IP:127.0.0.1). Fails as hostname mismatch or ERR_TLS_CERT_ALTNAME_INVALID.
Policy extras that depend on the client: Chrome and Safari require embedded Certificate Transparency proofs (section 5); some check revocation (section 6); Python 3.13 and later apply VERIFY_X509_STRICT by default, rejecting certificates missing fields RFC 5280 requires, such as the Authority Key Identifier (Python 3.13 what's new). The parent's Failure lab case "Python 3.13 rejects a certificate that curl and Node accept" shows the same certificate passing curl and Node and failing Python.
Run those checks yourself on twelve real chains, exactly as the servers sent them (one handshake each with OpenSSL 3.6.5, no HTTP request; src/lab/public_chains.py). Predict before you move anything: api.anthropic.com with the date dragged past 20 December 2026, and a.b.api.anthropic.com as the dialled name. Then pick api.deepseek.com (a wildcard) and dial a name two labels deep, and compare a Google-issued chain (three certificates, ending in a cross-signed root) with pypi.org's (two).
The parent's Failure lab reproduces each failure with real error text: "Expired certificate", "Wrong hostname (SAN mismatch)", "Unknown CA: the issuer is not trusted here", "Missing intermediate certificate", "Clock skew: certificate not yet valid". The first command for all of them:
openssl s_client -connect api.example.com:443 -servername api.example.com -showcerts </dev/null # look at: the depth lines (how many certificates came back), "Verify return code", the issuer of depth 0 openssl x509 -in leaf.pem -noout -subject -issuer -dates -ext subjectAltName,extendedKeyUsage
Always pass -servername: without SNI, a server hosting many names may send a default certificate and you will debug the wrong one.
The checks follow RFC 5280 path validation, RFC 9525 name matching and Chrome's CT policy, simplified: signatures are not recomputed here (OpenSSL verified every chain when recorded: "Verify return code: 0"), and "trusted root" means a root in the certifi bundle used for the recording. Error strings are OpenSSL's verify messages, the ones curl and Python print.
Survey: one TLS handshake per host with OpenSSL 3.6.5 (which offers the hybrid post-quantum group first), no HTTP request, 5 October 2026 (src/lab/public_chains.py). "Validity" is notAfter minus notBefore of the leaf. "Sent" counts the certificates the server sent.
*.internal.example.com. A client calls gpu-3.us-east.internal.example.com. What happens?gpu-3.us-east is two. Fix by adding *.us-east.internal.example.com as a SAN, or naming hosts one level below the wildcard. Remember too that a public certificate's names are published in Certificate Transparency logs (section 5), so internal host names belong on a private CA.Who may issue. Any CA can sign anything; what makes a public certificate trusted is that browsers and operating systems ship that CA's root. Their root programs (Chrome, Mozilla, Apple, Microsoft) and the industry body they sit in, the CA/Browser Forum, set the rules in the Baseline Requirements (BR). Before issuing, a CA must prove the requester controls the domain: domain validation (DV). Every leaf in the survey is DV (policy OID 2.23.140.1.2.1); OV and EV add checks on the organisation that browsers no longer display, so they buy nothing technical.
ACME (RFC 8555) is the protocol Let's Encrypt created and many public CAs now offer (AWS Certificate Manager since 6 July 2026: AWS announcement, 45-day certificates). Every request is a JSON object signed with the client's account key (a JWS), carrying a single-use nonce against replay. Fig. 5 steps through a full issuance recorded against Pebble, Let's Encrypt's test CA, in Docker, with a hand-written client of about 150 lines so every message is visible (src/lab/acme_flow.py). The CA really validated: it resolved the name through its own DNS server and fetched the challenge file over HTTP.
400 badNonce and had to be retried with the fresh nonce from that response (RFC 8555 section 6.5); and a wrong challenge file gives an unauthorized error naming the expected and received content, after which that authorization is dead and you must start a new order.The three ways to prove control:
| Challenge | How the CA checks | Use when | Fails when |
|---|---|---|---|
| HTTP-01 | Fetches http://NAME/.well-known/acme-challenge/TOKEN on port 80 and compares with token + "." + account key thumbprint | A public web server already answers on port 80 | Port 80 closed, a redirect to a different host, a CDN or WAF answering instead, wildcards (not allowed) |
| DNS-01 | Looks up TXT _acme-challenge.NAME = base64url(SHA-256(key authorization)) | Wildcards; internal hosts with public DNS names; no inbound port | DNS API credentials missing; slow propagation; split-horizon DNS (see MPIC below) |
| TLS-ALPN-01 | Connects on port 443 with ALPN acme-tls/1 and expects a special self-signed certificate (RFC 8737) | Only port 443 is reachable (load balancers, proxies that own 443) | A TLS-terminating load balancer in front that does not pass it through |
ARI (ACME Renewal Information, RFC 9773, June 2025) lets the CA tell each client when to renew: Pebble suggested a window . If a CA must revoke many certificates (a mis-issuance incident), it moves the windows earlier, and clients that honour ARI renew in time instead of breaking. certbot, lego and cert-manager support it.
CA/Browser Forum ballot SC-081v3 (adopted 11 April 2025, now in BR 6.3.2 and 4.2.1) sets the maximum validity of a public TLS certificate and how long a CA may reuse a past domain validation:
200 days is already in force (since 15 March 2026): a certificate renewed by hand in March or April 2026 by someone who assumed "a year" expires in autumn 2026. The bigger change is domain-validation reuse falling to 10 days: practically every issuance must re-prove control, so your DNS provider's API or your port-80 path becomes a hard runtime dependency of certificate renewal. At 47-day lifetimes, ARI is the difference between a planned event and an outage. CAs already issue below the caps: the survey shows Google Trust Services leaves at 90 days (84 for one), Amazon at 198 days (ACM's default since 18 February 2026, AWS), and one GlobalSign leaf at 397 days, issued on 28 December 2025, before the first cap.
tlsserver) and 160-hour (shortlived, also for IP addresses, generally available 15 January 2026) profiles, and will move its default to 64 days on 10 February 2027 and 45 days on 16 February 2028 (Let's Encrypt, 2 December 2025; profiles). The Pebble run above issued a 6-day certificate with the shortlived profile. The 47-day limit is commonly explained as 31 + 15 + 1 days (a long month, half a month, a day of slack); that breakdown is not in the ballot or the BR text.Steps at 15 March 2026 (200 days), 15 March 2027 (100) and 15 March 2029 (47, with 10-day validation reuse). Dots are the surveyed leaves at their issue dates.
Every public certificate is logged in append-only public logs before browsers trust it. The CA submits a precertificate, each log returns a signed promise (an SCT, signed certificate timestamp), and the CA embeds the SCTs in the certificate. Chrome requires at least 2 SCTs from distinct log operators for certificates valid up to 180 days, 3 above (Chrome CT policy). The surveyed leaves carry exactly that: Two uses for you: monitor the logs (crt.sh, Cert Spotter) for certificates issued for your domains that you did not request; and remember that CT is public forever, so a public certificate for gpu-cluster-7.corp.example.com publishes that name. Let's Encrypt's old RFC 6962 logs shut down on 28 February 2026, replaced by "static CT API" tiled logs (Let's Encrypt).
The DNS side (the CAA and _acme-challenge TXT records DNS-01 depends on, caching that slows propagation, DNSSEC, and the HTTPS record that carries the ECH key of section 2) is taught on the DNS page.
accounturi and validationmethods (RFC 8657) pin issuance to your own ACME account and method; CAs must process them from 15 March 2027 (BR). A strong, cheap control: an attacker who briefly hijacks your web server still cannot get a certificate from your CA under a different account.A private key leaks, or a CA mis-issues. The certificate is still within its dates, so every client would keep trusting it. Revocation is how a CA says "stop", and it has never worked well, which is the deepest reason lifetimes are being cut.
Where each path stands on 5 October 2026: OCSP (the client asks the CA's responder about one certificate) is slow, fails open when the responder is down, and tells the CA which sites each user visits; Let's Encrypt removed OCSP URLs from certificates on 7 May 2025 and turned its responders off on 6 August 2025 (Let's Encrypt). CRLs (signed lists of revoked serial numbers) are back as the input to browser-side aggregation: Chrome does no online checks by default and pushes CRLSets for emergencies (Chromium); Firefox enabled CRLite by default in version 137, about 300 kB a day of updates (Mozilla Hacks, August 2025). What your code does: Python's ssl, Go's crypto/tls, curl and Node do not check revocation at all by default. For an API client that is usually acceptable because lifetimes are short; for mTLS inside your own systems (section 7) the practical revocation tool is the same: very short-lived certificates (an hour), so that removing a workload's ability to renew is the revocation.
When the CA itself fails, revocation is not enough: clients distrust. In October 2026 the private keys of eight eMudhra intermediate CAs (six of them also cross-signed by Sectigo) turned out to have been "incorrectly generated by the CA. This means that anyone can recover them from the certificates", a flaw present since the intermediates were created in April 2025 (community incident page, Mozilla bug 2083449). Nobody broke in: a key-generation bug made every certificate those intermediates had signed forgeable by anyone. Revoking the intermediates protects only clients that check revocation, so the vendors blocked them in their own trust machinery: Firefox and Chrome from 17 October, Microsoft from 20 October, Apple from 22 October; eMudhra then announced it was leaving the TLS certificate business. Clients that use neither a browser nor an OS store, the bundled stores of language runtimes and embedded devices (section 9), stayed exposed until they shipped their own block: Python and Go put out expedited releases that reject the eight keys. The lesson for your code: a pinned or bundled CA list is a security dependency that needs updates like any library.
| Mechanism | How | Problem | Status, 5 October 2026 |
|---|---|---|---|
| CRL (certificate revocation list) | The CA publishes a signed list of revoked serial numbers at the URL in the certificate's CRL Distribution Points | Lists get large; clients that fetch them on every connection are slow | Back in fashion as the input to browser-side aggregation; 11 of the 12 surveyed leaves carry a CRL URL |
| OCSP (online status protocol) | The client asks the CA's responder about one certificate | Slow, fails open, privacy leak | Let's Encrypt responders off since 6 August 2025; 5 of the 12 surveyed leaves still carry an OCSP URL (Amazon, GlobalSign, Sectigo), the Google-issued ones do not |
| OCSP stapling, Must-Staple | The server fetches its own OCSP answer and sends it in the handshake | Depends on OCSP existing | With a Let's Encrypt certificate, ssl_stapling on is now a silent no-op, and code that hard-requires a staple fails closed |
| Browser push lists: CRLSets (Chrome), CRLite (Firefox) | The browser vendor collects all CRLs and pushes a compressed set to browsers | Only browsers have them | Chrome: CRLSets for emergencies; Firefox: CRLite by default since 137 |
| Short lifetimes | The certificate simply expires soon | Requires full automation | The direction of travel: 6-day certificates exist today, 47 days is the 2029 maximum |
Inside a cluster, the vLLM server must know that the caller is the gateway and not a notebook someone left running. API keys in headers (see Auth) are bearer secrets: anyone who copies one is the gateway. Mutual TLS (mTLS) makes the caller prove possession of a private key during the handshake, so there is nothing reusable to copy from a log. It is the same handshake as section 2 with three additions, all inside the encrypted part (Fig. 6 plays the recording; "TLS 1.3 with mTLS" in the section 2 record list shows every record):
spiffe://lab.test/ns/serving/sa/gateway, with EKU clientAuth.load_cert_chain() again on its live context ( ms); connection 2 got the new certificate, while connection 1, opened before, still carried data under the old one.Authentication is not authorization. A valid certificate from your internal CA proves "this is some workload in our trust domain". Your server must still decide whether this identity may call this endpoint: match on the SPIFFE ID or SAN ("only .../sa/gateway may call /v1/messages"), never on "it was signed by our CA", or every workload in the cluster can call everything.
Workload identity. SPIFFE standardises the identity: a URI spiffe://trust-domain/path placed in an X.509 certificate called an SVID (SPIFFE ID spec). SPIRE, the reference implementation, and the service meshes issue those short-lived certificates automatically and rotate them.
Hour-long certificates mean the application must load new ones without restarting. Two measured facts about Python (src/lab/rotate.py, Python 3.13.16, OpenSSL 3.5.9):
load_cert_chain() again on the server's existing SSLContext took ms and every connection opened afterwards got the new certificate. A fresh context also works and is cleaner when several settings change at once.The second fact is the one that bites: a connection keeps the identity it was established with. Connection 1 still carried data under the old certificate after the rotation. gRPC and HTTP/2 connections can live for days, so rotation, revocation and trust-bundle changes never reach them; set a maximum connection age (gRPC's max_connection_age, an idle timeout at the proxy) shorter than your certificate lifetime.
Clock skew is fatal at short lifetimes: 5 minutes of skew is 5/60 = 8% of a one-hour SVID, and a fresh certificate arrives "not yet valid" if the receiver's clock is behind. Run time sync everywhere (on EC2, the Amazon Time Sync Service at 169.254.169.123). Trust-bundle rotation (a new CA) is the hard part: distribute the new root to every verifier first, then start issuing from it, and remove the old root only after every certificate it signed has expired. An overlap, never a cutover.
"We have mTLS" usually means the sidecars do. Each hop that terminates TLS sees plaintext and starts a new connection. An AWS Network Load Balancer in TCP mode passes TLS through untouched; an Application Load Balancer terminates it, and a backend behind it cannot see the original client certificate unless the terminator forwards it in a header (Envoy's x-forwarded-client-cert, nginx's $ssl_client_escaped_cert). If you do that, strip the header from every untrusted source, or anyone can send a forged one: an authentication bypass you built yourself.
Browsers want public CA hierarchies used only for server authentication. The Chrome Root Program policy (version 1.8, 5 February 2026, section 1.3.2) requires leaf certificates issued from 15 March 2027 to carry only serverAuth, and CAs are moving ahead of it. The survey shows the transition: 11 of 12 public leaves are serverAuth only; the twelfth (pypi.org, issued December 2025) still has both.
serverAuth only, and leaves issued from 15 March 2027 to carry only serverAuth. Let's Encrypt dropped clientAuth from its default profile on 11 February 2026 and ended its opt-in client profile on 8 July 2026 (Let's Encrypt); DigiCert stopped adding it by default on 1 October 2025 and removes it entirely on 1 March 2027 (DigiCert).A large enough quantum computer running Shor's algorithm would break the elliptic-curve and RSA mathematics behind both key exchange and signatures. Nobody has one. But the two halves of TLS are exposed differently:
An attacker can record today and decrypt later ("harvest now, decrypt later"). Anything that must stay secret for years (prompts with personal data, model weights in transit, credentials) is already at risk if recorded. The fix has to be deployed before the computer exists, and it has been.
Forging a signature only helps an attacker during a handshake, in real time. A quantum computer that arrives in 2035 cannot retroactively impersonate a server in 2026. So authentication can migrate later, and the size cost (below) makes everyone wait for a better design.
NIST published the first post-quantum standards on 13 August 2024: FIPS 203 (ML-KEM, a lattice-based key encapsulation), FIPS 204 (ML-DSA signatures) and FIPS 205 (SLH-DSA, hash-based signatures). TLS deploys ML-KEM as a hybrid: X25519 and ML-KEM-768 run side by side and both outputs feed the key schedule, so the connection is safe if either one holds (a hedge against a flaw in the new mathematics). RFC 10024 (August 2026) fixed the code points and sizes: X25519MLKEM768 (0x11EC) sends a 1,216-byte client share (ML-KEM-768's 1,184-byte encapsulation key plus 32 bytes of X25519) and a 1,120-byte server share (the 1,088-byte ciphertext plus 32).
| Group | Code point | Client share | Server share | Order inside |
|---|---|---|---|---|
| X25519MLKEM768 | 0x11EC | 1,216 B | 1,120 B | ML-KEM first, then X25519 |
| SecP256r1MLKEM768 | 0x11EB | 1,249 B | 1,153 B | ECDH first, then ML-KEM |
| SecP384r1MLKEM1024 | 0x11ED | 1,665 B | 1,665 B | ECDH first, then ML-KEM |
The reversed order of X25519MLKEM768 is deliberate and a real interoperability trap for anyone implementing it by hand. The 2024 experimental X25519Kyber768Draft00 code point is obsolete and does not interoperate.
Where deployment is. The client half of the internet already offers it, and the survey adds a measured data point for the endpoints an ML engineer calls:
Cost: bytes, not CPU. Measured on this laptop with OpenSSL 3.6 speed:
ML-KEM-768 is faster than X25519 per operation; the hybrid costs a few tens of microseconds per handshake. What it adds is about 1.2 KB in each direction: the ClientHello grew from 236 to 1,458 bytes in the HelloRetryRequest runs of section 2. That spills over one 1,500-byte packet, and TLS-inspecting firewalls and proxies must handle a ClientHello split across packets and a group they may not know (Apple's guidance to network administrators for iOS 26, Apple; not reproduced here). The symptom after upgrading a TLS library or base image: handshakes fail or hang through one particular network only. Test against your own proxies; meanwhile, configure that client's groups to X25519 only.
ML-DSA works, but it is large: an ML-DSA-44 public key is 1,312 bytes and a signature 2,420 bytes, against 65 and about 70 for ECDSA P-256 (FIPS 204 table 2). A handshake carries several signatures: the CertificateVerify, the signature on each certificate in the chain, and the CT timestamps inside the leaf. To measure instead of estimate, the lab issued the same two-certificate chain (leaf plus intermediate, as the server sends it) with four key types using OpenSSL 3.6 and recorded the server's first flight of a real handshake with each. Predict: which key types fit in TCP's initial window of 10 segments?
Fig. 7 sends each flight in stretches: the first segment, the rest of the initial window, and, when the flight does not fit, the wait for an acknowledgement and the second window.
The line that matters is the initial congestion window: a new TCP connection may send only 10 segments (about 14,600 bytes with 1,460-byte segments) before waiting one round trip for acknowledgements (RFC 6928; see Networking foundations for congestion control). The ECDSA flight is about 2.4 KB. An ML-DSA-65 two-certificate flight is 15.9 KB against 2.4 KB for ECDSA: it crosses the window on its own, before CT timestamps (in a real public certificate, two more ML-DSA-44 signatures would add about 2 × 2,420 = 4,840 bytes, computed, not measured): a whole extra round trip on every new connection. ML-DSA-44 (11,948 bytes) fits, but not with those timestamps added (11,948 + 4,840 = 16,788 bytes, computed).
The way out: Merkle Tree Certificates. Instead of signing each certificate, the CA adds certificates to a batch, builds a Merkle tree and signs only the tree's root; browsers fetch the signed roots ahead of time, so a handshake carries one signature plus a short inclusion proof, smaller even than today's classical chain. The design is an IETF draft (draft-ietf-plants-merkle-tree-certs-06, 21 September 2026).
openssl s_client -connect host:443 -groups X25519MLKEM768 -brief (OpenSSL 3.5+): the output names the negotiated group. Leave certificates alone until MTCs arrive. SSH made the same move years earlier: OpenSSH has defaulted to a hybrid post-quantum key exchange since 9.0 (2022) and to ML-KEM since 10.0; the SSH page (its section 11) covers it, including the warning OpenSSH 10.1 and later print for a key exchange that is not post-quantum.Every client has its own trust store, and they are not the same file. macOS and Windows keep one in the operating system (Keychain, the Windows certificate store); browsers use the OS store or their own (Firefox); Linux distributions ship /etc/ssl/certs; Python's requests uses the certifi package (Mozilla's list frozen when the package was built, so a distrust, section 6, reaches it only with a new release); Node ships its own copy of Mozilla's list. So "I installed our corporate root" may have fixed one client and not the others.
Measured: which variable does each client read? A local server presented a certificate from the lab's private root; each client ran with no variable, then with exactly one variable pointing at that root (src/lab/trust_matrix.py; Python 3.13, requests 2.34, httpx 0.28, certifi , Node , macOS curl 8.7.1). Predict before reading the row: does requests honour SSL_CERT_FILE?
Readings: SSL_CERT_FILE is read by OpenSSL-based tools and by Python's default context and httpx, but not by requests, which uses certifi unless REQUESTS_CA_BUNDLE or CURL_CA_BUNDLE is set. NODE_EXTRA_CA_CERTS is read only by Node, and it adds to the built-in list. truststore read none of them: it asks the operating system (Keychain on this Mac), where the lab root was not installed. And setting SSL_CERT_FILE replaces the default list rather than adding to it: The safe pattern is a bundle file containing the public roots plus yours.
Many companies route traffic through a proxy that terminates TLS, inspects it and re-encrypts it with certificates signed on the fly by a company root pushed to managed laptops' OS stores. Browsers trust it (they use the OS store); Python with certifi, Node, and anything in a Docker container do not, so pip install, huggingface_hub downloads and docker pull fail with unable to get local issuer certificate while the browser works. Look at the issuer in openssl s_client output: if it names your company or a security vendor instead of a public CA, that is the cause. A variant: a DNS filter answers some names with a block page whose certificate fails verification, so the symptom is a certificate error and the cause is DNS (the parent's Failure lab case "A TLS error caused by DNS: the name was answered by a filter").
Fixes, best first. Use the OS store from Python: pip has done so by default since version 24.2 through truststore (pip docs), and your own code can call truststore.inject_into_ssl(). Otherwise build one bundle (certifi's file plus the company root) and point SSL_CERT_FILE and REQUESTS_CA_BUNDLE at it; in containers, add the root to the image's system store (update-ca-certificates). Pin a recent certifi: an old one in a Docker image lacks newer roots and keeps distrusted ones.
verify=False, curl -k, Go's InsecureSkipVerify: true, Node's NODE_TLS_REJECT_UNAUTHORIZED=0, ssl._create_unverified_context(): each keeps encryption and drops authentication, which means encrypting to whoever answers, attacker included. Two subtler variants: ssl.CERT_NONE also turns off hostname checking, and turning off check_hostname while keeping CERT_REQUIRED accepts any valid certificate for any name, which looks secure and is not. A CI rule that greps for these strings is cheap.
# what does the server send, and does it verify against THIS store? openssl s_client -connect host:443 -servername host -showcerts -CAfile bundle.pem </dev/null # version, cipher and key-exchange group only (OpenSSL 3.5+ prints the group) openssl s_client -connect host:443 -servername host -brief </dev/null # what does curl negotiate and which issuer does it see? curl -v https://host/ -o /dev/null 2>&1 | grep -E 'SSL connection|issuer|subject|ALPN' # expiry of a local file, and of a remote host openssl x509 -in cert.pem -noout -enddate echo | openssl s_client -connect host:443 -servername host 2>/dev/null | openssl x509 -noout -enddate # decrypt your own traffic in Wireshark: Python, curl (OpenSSL builds), Firefox and Chrome honour this SSLKEYLOGFILE=/tmp/keys.log python client.py # then Wireshark: TLS, (Pre)-Master-Secret log filename
The key-log mechanism is how this page decrypted its own recordings. The file holds session secrets that decrypt the recorded traffic: treat it like a password and never enable it in production.
Monitoring. Alert on days remaining on the certificate actually served (probe it, as above), not on "the renewal job succeeded": the job can succeed while the server keeps serving the old file because nothing reloaded it. With 47-day certificates, alert when less than a third of the lifetime remains.
h2 on every TLS hop. gRPC runs on HTTP/2, and HTTP/2 over TLS is selected only by ALPN. A proxy or load balancer that terminates TLS without offering h2 breaks it: the parent's Failure lab case "ALPN mismatch: gRPC needs h2" shows the error text. On AWS that means an ALB target group with protocol version gRPC. Triton's and vLLM's gRPC endpoints are no exception.RAY_USE_TLS=1 with certificates; the default is 0 and the docs warn of a performance cost (Ray docs). vLLM's --api-key protects only the /v1, /v2, /inference and /cohere paths, other endpoints stay open, and its multi-node traffic (PyTorch distributed, KV-cache transfer) is "insecure by default" (vLLM security). NCCL traffic between GPUs has no TLS. Treat a training or serving cluster as one trust zone on an isolated network, put real authentication and TLS at its edge, and say so explicitly in the threat model.huggingface_hub, pip, docker pull) fail first behind TLS-inspecting proxies (section 9). Fix the trust store; never disable verification for "just the download", because that is exactly where a tampered model file would come in.Optional: interview rehearsal, the dated changes behind this page, and the glossary.
| Date | Change |
|---|---|
| 2026-10-17 to 22 | Browsers and operating systems distrust eight eMudhra intermediates whose private keys were recoverable from their certificates |
| 2026-09-21 | Merkle Tree Certificates draft -06 (IETF PLANTS working group) |
| 2026-08 | RFC 10024: hybrid ML-KEM groups for TLS 1.3 standardised |
| 2026-07-08 | Let's Encrypt ends its client-authentication profile |
| 2026-07-06 | AWS Certificate Manager speaks ACME (45-day certificates) |
| 2026-07 | RFC 9846 (TLS 1.3, obsoletes RFC 8446 and 5246), RFC 9851 (TLS 1.2 feature freeze), RFC 9852 (new protocols require TLS 1.3) |
| 2026-06-15 | Chrome: new subordinate CAs must be serverAuth only; MPIC needs 4 perspectives |
| 2026-03-15 | Public certificates at most 200 days, validation reuse 200 days; CAs must validate DNSSEC |
| 2026-03 | RFC 9849 (Encrypted Client Hello) and RFC 9848 |
| 2026-02-28 | Let's Encrypt's RFC 6962 CT logs shut down |
| 2026-02-18 | AWS ACM default validity 395 to 198 days |
| 2026-02-11 | Let's Encrypt default profile drops clientAuth |
| 2026-01-15 | Let's Encrypt 6-day and IP-address certificates generally available |
| 2025-10-28 | Cloudflare and Chrome Merkle Tree Certificate experiment |
| 2025-09-15 | MPIC enforced (2 remote perspectives) |
| 2025-08-06 | Let's Encrypt OCSP responders off |
| 2025-06 | RFC 9773: ACME Renewal Information |
| 2025-04-11 | CA/Browser Forum adopts SC-081v3 (the 200/100/47-day schedule) |
| 2025-04-08 | OpenSSL 3.5.0 prefers hybrid post-quantum key exchange by default |
| 2024-08-13 | FIPS 203, 204, 205 published |
Coming: Chrome leaf certificates serverAuth only (15 March 2027), 100-day maximum (15 March 2027), Let's Encrypt default 64 days (10 February 2027), public MTCs in Chrome (2027), 47-day maximum with 10-day validation reuse (15 March 2029).
The whole stack on one request. Tabs: On the wire (TLS 1.2 against 1.3 and cold against resumed on a 50 ms path), Failure lab (eight TLS failures with the exact errors of five clients), Protocol atlas. 33 min plus tabs
TCP and QUIC under TLS; congestion windows (why a big certificate chain costs a round trip). 49 min
What runs on top: HTTP/1.1, 2 (chosen by ALPN) and 3, proxies and timeouts. 45 min
Credentials inside the encrypted request; certificate-bound tokens (RFC 8705), DPoP, workload identity with OIDC. 42 min
CAA, DNS-01 validation, DNSSEC, the HTTPS record that carries the ECH key, encrypted DNS. 45 min
Remote MCP servers over Streamable HTTP, all on TLS. 37 min
The same ideas with trust-on-first-use instead of CAs; SSH certificates; post-quantum key exchange (RFC 10042). 42 min
Sibling reading times are each page's Reading tab, without its labs.
Sections 2 (overview), 4 (handshake), 7 (key schedule), 8 (0-RTT and anti-replay) are the ones to read. 4 h whole, 1 h for those sections
Every byte of one handshake annotated, with the key calculations: the textbook version of this page's decrypted-handshake stepper (section 2). 45 min
Code points, share formats, and why X25519MLKEM768 puts ML-KEM first. 30 min
With RFC 9773 (ARI). 2 h
Sections 1.2.2 (dates), 3.2.2 (validation, MPIC), 6.3.2 (lifetimes). 1 h for those
Dedicated server-authentication hierarchies, automation, root limits. 30 min
The reference book on deployment, PKI and attacks. about 12 h
The measured client against origin gap (February 2026). 20 min
Chrome's plan and why it prefers MTCs to post-quantum X.509. 15 min
Why signatures lag key exchange, in plain words. 15 min
The lifetime and authorisation-reuse schedule, with dates. 10 min
How revocation can work privately at browser scale. 20 min
Workload identity, SVIDs, trust domains, federation. 20 min
Let's Encrypt's test CA, used for this page's ACME recording; run it to test your own renewal automation. 20 min
Grade your public endpoint's TLS configuration (it sends nothing but handshakes). 10 min