TLS and certificates: the handshake, PKI, mTLS and post-quantum

How TLS 1.3 turns an untrusted network into a private, authenticated pipe; what a certificate proves and how a client checks it; issuance, revocation and rotation; mutual TLS; what post-quantum cryptography changes. Every handshake on the page was recorded and decrypted on 5 October 2026. A child of Topic: protocols. Data as of October 2026. Reading: 45 min, plus 21 in closed details.

The idea in one screen

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:

  1. Anyone on the path. Every hop between your code and the API (the Wi-Fi, the provider, a proxy) can read the bytes, change them, or answer in the server's place. Without TLS, nothing stops any of the three.
  2. Key shares cross in the clear (the client's hybrid share is 1,216 bytes, the server's 1,120); each side combines its own private value with the other's public one and both get the same secret. Fresh per connection, so a key stolen later unlocks nothing recorded today (forward secrecy). Confidentiality.
  3. The server sends its certificate chain (leaf 478 bytes, intermediate 421) and signs the transcript with the certificate's private key (a 70-byte signature). The client checks the chain up to a root in its own trust store, the dates and the name. Authentication.
  4. Finished: each side sends a MAC over every handshake byte (52 bytes each way). A changed byte means different keys and a failed check. Integrity.
  5. Everything after travels in AEAD records keyed from the secret: the 277-byte request leaves as one 294-byte record, one round trip after TCP's, and the answer streams back one record per token.

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.

New terms on this page (open when one is unfamiliar)
AEAD
Authenticated encryption with associated data: a cipher that encrypts and adds a tag detecting any change (AES-GCM, ChaCha20-Poly1305).
Key share, KEM
A public value for key exchange; a key encapsulation mechanism sends a secret wrapped to the other side's public key (ML-KEM).
SNI, ALPN
Server Name Indication: the host name in the ClientHello, in clear unless ECH is used. Application-Layer Protocol Negotiation: the ClientHello extension that picks http/1.1, h2 or h3 inside the handshake.
CA, root, intermediate
Certificate authority; a root is a self-signed CA certificate in a trust store; an intermediate is a CA certificate signed by a root that issues leaves.
Trust store
The set of root certificates a client trusts; differs per OS, browser and runtime.
SAN
Subject Alternative Name: the names (DNS, IP, URI) a certificate is valid for; the only place hostnames are checked.
PSK, session ticket
Pre-shared key from an earlier session, carried in an opaque ticket, used for resumption.
0-RTT, early data
Application data sent in the first flight of a resumed connection; replayable.
mTLS
Mutual TLS: the client also presents a certificate and signs the transcript.
Hybrid key exchange
A classical and a post-quantum exchange run together, both mixed into the secret (X25519MLKEM768).

The full glossary is in the Reference section at the end.

What to remember

  1. Two handshakes before the first byte. A new HTTPS connection costs TCP's round trip plus one for TLS 1.3 (two for TLS 1.2). Reuse connections: on this machine a request on a kept-alive connection took 0.05 ms against 1.4 ms with a fresh handshake, even with no network delay at all (section 3).
  2. A certificate binds a name to a public key, signed by a certificate authority (CA) your trust store already trusts. Most TLS outages are certificate operations: expiry, a missing intermediate, a trust store that lacks a root, a wrong clock. Public certificates now last at most 200 days, falling to 47 by March 2029, so renewal must be automatic (ACME, section 5).
  3. 0-RTT early data can be replayed. Recorded here: one captured request replayed to nginx produced three more billed generations (section 3). Never accept a generation or a tool call as early data.
  4. Post-quantum key exchange is already on: 10 of the 12 public endpoints probed here (Anthropic, OpenAI, Google, Hugging Face and others) negotiated the hybrid X25519MLKEM768. Post-quantum certificates are years away because their signatures are large (section 8).
  5. Never "fix" a certificate error by disabling verification. Serve the full chain, or add the right CA to the right trust store; which variable each client reads is measured in section 9.
Symptom to section: an error message, its likely cause, where to read
You seeLikely causeGo to
certificate has expired, not yet validRenewal failed; the client's clock is wrong5, 9
unable to get local issuer certificate; works in the browserServer omits the intermediate; or a private or inspecting CA missing from this client's store4, 9
hostname mismatch, not valid forThe name you dialled is not in the SANs (IP address, wildcard one level too deep)4
certificate required, 400 No required SSL certificatemTLS server, client sent no certificate7
gRPC fails only behind a load balancerNo ALPN h2 on that hop10
Handshake fails only through one network, after a library upgradeA middlebox that cannot handle a large post-quantum ClientHello8
Duplicate generations or tool calls after enabling "TLS 1.3 early data"0-RTT replay3

The recorded TLS 1.3 flights of the running request (5 October 2026): readable chips grey-yellow, encrypted ones with a lock.

1. The four building blocks

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.

Tool 1: symmetric authenticated encryption (AEAD)

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.

Tool 2: key exchange (two strangers agree on that key in public)

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.

Tool 3: hashes and key derivation

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):

Every key depends on every handshake byte

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.

Tool 4: signatures and certificates (who is on the other end)

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).

The whole handshake in one sentence
Agree a fresh secret in public (tool 2), prove who you are by signing the transcript with the key a CA vouched for (tool 4), confirm the transcript matches on both sides (tool 3), then encrypt everything with keys derived from that secret (tool 1).
Predict, then reveal: what does the passive attacker still learn?
Encryption hides content, not shape. Still visible in the recording: the server name and wanted protocol in the ClientHello (unless Encrypted Client Hello is used, section 2), both IP addresses, every record's size and timing. For the streamed answer that means one record per token, 139 to 143 bytes, about 50 ms apart; the parent page's security section shows how researchers reconstructed 29% of AI-assistant answers from such token lengths (Weiss et al., 2024).

2. The TLS 1.3 handshake, message by message

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.

  1. Flight 1, client: ClientHello (1,529 bytes, readable by anyone). The client cannot wait to learn what the server supports, so it guesses and sends everything needed to finish in one round trip: the server name (SNI) and wanted protocol (ALPN) in clear, the cipher suites, and key shares for its best guesses, 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.
  2. Flight 2, server: ServerHello (1,210 bytes, readable): the chosen suite 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:
  3. EncryptedExtensions (21 bytes inside a 38-byte record): the chosen ALPN, 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.
  4. CertificateVerify (78 bytes): an ECDSA P-256 signature (70 bytes) over the transcript hash, proving the server holds the certificate's private key (RFC 9846 section 4.4.3). Then Finished (52 bytes): an HMAC over the transcript under a key derived from the handshake secret.
  5. Flight 3, client: Finished, then the request in the same burst. The client verifies the chain and the signature, checks the server's Finished, sends its own Finished (69-byte record) and, without waiting, the request (294-byte record): one round trip after TCP's.
  6. Ticket and answer. The server then sends a NewSessionTicket (249 bytes) for later resumption, and the answer streams in records of 396, then 139 to 143 bytes per token.

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).

Every ClientHello field, and why it is there
  • random (32 bytes) and cipher_suites: in TLS 1.3 a suite names only the AEAD and the hash (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.
  • server_name (SNI): 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.
  • supported_versions: TLS 1.3, TLS 1.2. The legacy version field still says 1.2, a fossil kept because middleboxes broke on new values.
  • key_share: public values for its best guesses, 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).
  • signature_algorithms it can verify (this OpenSSL lists ML-DSA first, then ECDSA, Ed25519, RSA-PSS) and psk_key_exchange_modes psk_dhe_ke: "if we resume, still do a fresh key exchange" (section 3).

Every record, decrypted

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.

Checked on this page, not just asserted
From the key log and the decrypted bytes, 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/.
How the page decrypts the records
The key log gives CLIENT_HANDSHAKE_TRAFFIC_SECRET, SERVER_HANDSHAKE_TRAFFIC_SECRET and the two application traffic secrets. For each, key = HKDF-Expand-Label(secret, "key", "", 32) and iv = HKDF-Expand-Label(secret, "iv", "", 12) (RFC 9846 section 7.3); record n of a direction uses nonce = iv XOR n, and the 5-byte record header is the associated data; every TLS 1.3 record is decrypted with AES-256-GCM. The inner plaintext ends with the real content type and optional zero padding (none was used here). The TLS 1.2 recording is shown as observed only: decrypting it needs the TLS 1.2 PRF, which this page does not implement, and nothing hidden in it is not also shown by the TLS 1.3 recordings. Scripts: 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.

Before and after: what a passive observer sees, TLS 1.2 against TLS 1.3

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?

    What else TLS 1.3 removed, and what RFC 9846 changed
    From RFC 9846 section 1.2 and the original RFC 8446 list: static RSA and static DH key exchange (no forward secrecy), custom DH groups, compression (the CRIME attack), renegotiation (replaced by KeyUpdate and post-handshake authentication), CBC-mode and RC4 ciphers, SHA-1 and MD5 signatures. RFC 9846 itself changed less: it makes updating keys before the key-usage limits a MUST (section 5.5), limits how often KeyUpdate may be sent, forbids reusing a key share across connections and adds a generic_error alert. Two companions published the same month: RFC 9851 freezes TLS 1.2 (security fixes only; "PQC for TLS 1.2 will not be specified at any time") and RFC 9852 says new protocols must require TLS 1.3.

    When the guess is wrong: HelloRetryRequest

    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.

    Measured: five key-share combinations on a 50 ms round trip
    OpenSSL 3.6 on both ends through a proxy adding 25 ms each way:

    Encrypted Client Hello: hiding the last plaintext

    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.

    Predict, then reveal: a corporate firewall blocks a site by SNI. Over TLS 1.3 without ECH, can it still see the server's certificate?
    No. In TLS 1.3 the Certificate message is encrypted (record 5 in the recording is 934 bytes of ciphertext). In TLS 1.2 it was readable, which is why older filters inspected certificates. A TLS 1.3 filter can only see SNI, ALPN and the IP address, unless it breaks TLS by acting as a proxy with its own CA (section 9).

    3. Resumption and 0-RTT: cheaper reconnects, and a replay trap

    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.

    1. A full handshake leaves a ticket. The first connection lands on front end A and runs the whole handshake of section 2, certificate and signature included; then A sends the NewSessionTicket (249 bytes in the recording).
    2. The next connection skips the certificate. It lands on front end B, which shares A's ticket key: the ticket rides in the ClientHello as the PSK, B decrypts it, and neither side sends or checks a certificate. The key exchange is still fresh (psk_dhe_ke).
    3. What it saves. Medians over 300 small requests each: 1.445 ms for a new connection with a full handshake (p90 1.817), 0.967 ms resumed (p90 1.331), 0.051 ms on one kept-alive connection (p90 0.085); all 300 resumptions were accepted. Resumption saves the asymmetric cryptography; only reuse saves the handshake.
    4. Without a shared key. If each front end makes tickets with its own key, B cannot read A's ticket and runs the full handshake again, with no error anywhere (below).

    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.

    0-RTT early data: the request before the handshake finishes

    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:

    The two recorded runs, line by line (client output and what the backend counted)

    Three replays, three extra billed generations; in an agent loop each could be a repeated side-effecting tool call.

    What nginx and OpenSSL say about it
    nginx's documentation warns about exactly this and suggests forwarding $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.

    Rule
    Never accept non-idempotent requests as 0-RTT: no generations, no tool calls, no payments, no writes. If early data is on at your edge (some CDNs offer it as a toggle), make sure the origin sees 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.
    Predict, then reveal: does QUIC (HTTP/3) avoid the replay problem?
    No. QUIC uses the TLS 1.3 handshake (RFC 9001) and has the same 0-RTT with the same replay property; HTTP/3 clients must follow the same rules. The parent page's On the wire tab recorded an HTTP/3 0-RTT attempt.
    Predict, then reveal: in run 2 the client got "Early data was accepted" but also 425. What should a correct client do?
    Resend the request after the handshake has completed (RFC 8470 section 5.2). 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.

    4. Certificates: what is inside, and how a client checks a chain

    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".

    What the client checks, in order

    1. The chain as sent. The server sent three certificates, leaf first: api.anthropic.com (894 bytes), the intermediate WE1 (675) and GTS Root R4 (894).
    2. Signatures up the chain, starting at the bottom: the leaf's signature (ecdsa-with-SHA256) must verify with WE1's public key.
    3. Then each CA above it. WE1's signature (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.
    4. Path A: a root in the trust store. A client that already trusts GTS Root R4 stops there. If no root is found the check fails as unable to get local issuer certificate (missing intermediate, or root not trusted here) or self-signed certificate in certificate chain.
    5. Path B: the cross-sign. The third certificate, "GTS Root R4", is itself signed by "GlobalSign Root CA" (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.
    6. Dates: now is between notBefore and notAfter for every certificate (this leaf: 2026-09-21 to 2026-12-20, 90 days). Fails as certificate has expired or certificate is not yet valid (the client's clock is behind).
    7. Name and purpose. The host you dialled must match a subject alternative name (SAN); here the only SAN is 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.

    Chain as sent (leaf first)
    Fields of the selected certificate
    Validate it like a client

      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.

      Every field of the api.anthropic.com leaf, and what each is for
      The twelve surveyed chains in one table (issuer, key, validity, key exchange)

      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.

      Predict, then reveal: a service has a valid certificate for *.internal.example.com. A client calls gpu-3.us-east.internal.example.com. What happens?
      Hostname mismatch: the wildcard covers one label, and 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.

      5. Getting certificates: CAs, ACME, and the 47-day schedule

      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.

      Fig. 5 · every ACME message of a recorded issuance

      ACME: issuance as an API

      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.

        Two failures in the recording that bite real clients (badNonce, a dead authorization)
        Two things in the recording bite real clients: Pebble rejects 5% of nonces on purpose, and one request came back 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:

        ChallengeHow the CA checksUse whenFails when
        HTTP-01Fetches http://NAME/.well-known/acme-challenge/TOKEN on port 80 and compares with token + "." + account key thumbprintA public web server already answers on port 80Port 80 closed, a redirect to a different host, a CDN or WAF answering instead, wildcards (not allowed)
        DNS-01Looks up TXT _acme-challenge.NAME = base64url(SHA-256(key authorization))Wildcards; internal hosts with public DNS names; no inbound portDNS API credentials missing; slow propagation; split-horizon DNS (see MPIC below)
        TLS-ALPN-01Connects 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.

        Lifetimes are collapsing on a fixed schedule

        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.

        Let's Encrypt's profiles and dates; where "47 days" comes from
        Let's Encrypt issues 90 days by default, offers 45-day (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.
        Validity steps down to 47 days; validation reuse falls further, to 10

        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.

        Certificate Transparency: every public certificate is published

        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).

        Guard rails around issuance: CAA, MPIC, DNSSEC

        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.

        • CAA (RFC 8659): a DNS record listing which CAs may issue for your domain; CAs must check it. Looked up over DNS-over-HTTPS on 5 October 2026: The parameters 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.
        • MPIC (multi-perspective issuance corroboration, ballot SC-067): the CA repeats domain validation and the CAA lookup from several network vantage points and they must agree. Enforced since 15 September 2025 with 2 remote perspectives, 3 from 15 March 2026, 4 from 15 June 2026 and 5 from 15 December 2026 (BR 3.2.2.9). It defeats local BGP or DNS hijacks; it also means split-horizon or geo-steered DNS that answers differently by region can now fail issuance.
        • DNSSEC: since 15 March 2026 the BR require CAs to validate DNSSEC on the lookups for domain validation and CAA. A broken DNSSEC signature on your zone now blocks renewal.
        Predict, then reveal: renewal suddenly fails for a domain whose DNS is served by two providers that answer slightly differently by region. Nothing changed on your side. Why now?
        MPIC: since September 2025 the CA checks validation and CAA from several regions, and the number of required perspectives rose through 2026 (3 in March, 4 in June). If one region's answer lacks the TXT record or shows a different CAA set, the quorum fails. Make both providers serve identical records, or validate with HTTP-01.

        6. Revocation: un-trusting a certificate before it expires

        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.

        Only browsers check revocation; everyone else relies on expiry

        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.

        The five mechanisms side by side, with the survey's counts
        MechanismHowProblemStatus, 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 PointsLists get large; clients that fetch them on every connection are slowBack 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 certificateSlow, fails open, privacy leakLet'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-StapleThe server fetches its own OCSP answer and sends it in the handshakeDepends on OCSP existingWith 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 browsersOnly browsers have themChrome: CRLSets for emergencies; Firefox: CRLite by default since 137
        Short lifetimesThe certificate simply expires soonRequires full automationThe direction of travel: 6-day certificates exist today, 47 days is the 2029 maximum

        7. Mutual TLS and workload identity

        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):

        1. The server asks. It adds a CertificateRequest ( bytes) to its flight, listing the signature algorithms (and optionally the CAs) it accepts.
        2. The client answers with its own Certificate ( bytes): here a one-day certificate whose only identity is the URI SAN spiffe://lab.test/ns/serving/sa/gateway, with EKU clientAuth.
        3. The client sends a CertificateVerify signing the transcript with its private key, then Finished. The server verifies the chain against its own trust bundle (here the lab's private root), then the signature.
        4. Both ends proven, at a small price. The client's certificate travels encrypted in TLS 1.3 (it was plaintext in TLS 1.2), so an observer cannot learn which workload is calling. Total cost in the recording: the client's flight grew from 1,913 to bytes over the whole connection, one extra signature on the client and one extra verification on the server.
        5. Where the client's certificate comes from. In a mesh nobody copies certificates by hand: an agent on each node attests the workload and hands it a short-lived certificate (an SVID, below), renewed before it expires (one hour by default in SPIRE, SPIRE server docs).
        6. Rotation, measured. The server called 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.

        SPIRE, Istio, Linkerd and AWS IAM Roles Anywhere: lifetimes and rotation
        SPIRE: an agent on each node attests the workload (which Kubernetes service account, which container image) and hands it short-lived SVIDs over a local Unix socket; by default an X.509 SVID lives 1 hour and a JWT SVID 5 minutes (SPIRE server docs). Istio issues each workload a 24-hour certificate and rotates it at half-life (pilot-agent reference); in ambient mode a per-node proxy, ztunnel, does mTLS for the pods instead of a sidecar in each (Istio ambient). Linkerd turns mTLS on by default for all TCP between meshed pods, with 24-hour proxy certificates; its trust anchor and issuer default to one year and must be rotated by you (Linkerd). Outside Kubernetes, AWS IAM Roles Anywhere exchanges a certificate from your private CA for temporary AWS credentials lasting 15 minutes to 12 hours (AWS docs).

        Rotation: the real cost of mTLS

        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):

        The recorded rotation run, step by step (fingerprints)
        Correction to the old page
        The old page said Python "needs a whole new SSLContext because you cannot mutate one in place". Measured: calling 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.

        Where TLS actually terminates

        "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.

        Every hop that terminates TLS sees plaintext

        Public certificates for client authentication are ending

        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.

        What to do
        If any service-to-service mTLS uses publicly trusted certificates on the client side, move it to a private CA (AWS Private CA, SPIRE, Vault, cert-manager with a private issuer) before your CA stops issuing them. This answers the date question the Auth page left open: the old pages' "February 2027" and "March 2027" were each half right (Sectigo's date could not be confirmed here; Chrome's leaf deadline is 15 March 2027).
        The dates per CA and per Chrome policy step
        Chrome requires subordinate CAs disclosed from 15 June 2026 to assert 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).
        Predict, then reveal: after rotating a service's mTLS certificate, its dashboards show some callers still presenting the old certificate two days later, though every pod restarted. Where are they coming from?
        Long-lived connections that were established before the rotation, typically through a proxy or a client-side connection pool that did not restart (an L4 load balancer keeps the TCP connection; HTTP/2 multiplexes on it for days). They will keep the old identity until they close. Set a maximum connection age on the server and on the proxies.

        8. Post-quantum TLS: key exchange is done, signatures are not

        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:

        Key exchange: urgent

        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.

        Signatures: not urgent yet

        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.

        Key exchange: hybrid ML-KEM, on by default

        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).

        All three hybrid groups, and the ordering trap
        GroupCode pointClient shareServer shareOrder inside
        X25519MLKEM7680x11EC1,216 B1,120 BML-KEM first, then X25519
        SecP256r1MLKEM7680x11EB1,249 B1,153 BECDH first, then ML-KEM
        SecP384r1MLKEM10240x11ED1,665 B1,665 BECDH 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:

        Defaults by library and platform; Cloudflare's client against origin gap
        OpenSSL 3.5.0 (8 April 2025) prefers the hybrid and sends X25519MLKEM768 and X25519 shares by default (release notes); Go 1.24 enables it by default (Go 1.24 notes); Apple's iOS 26 and macOS 26 advertise it on all TLS 1.3 connections (Apple). Cloudflare saw post-quantum key agreement on over 60% of client requests in February 2026, while only about 10% of origin servers supported it (Cloudflare, 27 February 2026).

        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-KEM-768 runs faster than X25519 (operations per second, one core)
        Fig. 7 · the server's first flight against TCP's initial window

        Signatures: why post-quantum certificates are not here yet

        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).

          MTC rollout plans and the migration deadlines
          Cloudflare and Chrome began an MTC experiment on 28 October 2025 (Cloudflare); Chrome plans to bootstrap public MTCs in the first quarter of 2027 and a quantum-resistant root store accepting only MTCs in the third quarter of 2027, with no immediate plan to admit post-quantum X.509 certificates (Google Security Blog, 27 February 2026). Let's Encrypt plans MTC staging in late 2026 and production in 2027 (Let's Encrypt, 3 June 2026).

          Deadlines. Google set 2029 for its own migration (Google, 25 March 2026). The NSA's CNSA 2.0 asks US national-security systems to support and prefer post-quantum algorithms in web browsers, servers and cloud services now and to use them exclusively by 2033, with all systems quantum-resistant by 2035 (the NSA's PDF could not be fetched for this page; dates as widely reported, not re-checked). NIST also chose HQC on 11 March 2025 as a backup KEM built on different mathematics, with a final standard expected in 2027 (NIST).
          What to do now
          Make sure your own servers and internal hops negotiate X25519MLKEM768: upgrading to OpenSSL 3.5 or later, Go 1.24 or later, or a current managed load balancer is usually all it takes. Check with 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.
          Predict, then reveal: two of the twelve surveyed endpoints negotiated plain X25519. Is traffic to them at risk today?
          Its confidentiality is at risk later: anyone recording it now could decrypt it once a large quantum computer exists. Authentication is not at risk today. The client offered the hybrid; the servers (or their load balancers) did not support it, so the fix is on their side.

          9. Trust stores, TLS inspection and the classic failures

          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.

          TLS-inspecting proxies

          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.

          The proxy's root is in the OS store, so only clients that read the OS store trust it

          Turning verification off is never the fix

          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.

          Debugging toolkit: the six commands, and decrypting your own traffic
          # 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.

          10. TLS where an ML engineer meets it

          • Handshakes, not bytes, are the cost. Bulk encryption runs at gigabytes per second per core (section 1); one ECDSA P-256 signature, the server's main handshake cost, at about per second per core. A client that builds a new HTTP client per inference call pays a handshake per call; with an LLM API across a continent that is two extra round trips (100 to 200 ms at 50 to 100 ms each) before the request leaves. One pooled client per process.
          • Long streams are what TLS 1.3 was built for. A multi-hour SSE stream or bidirectional gRPC stream stays within the AEAD's safe usage limits through KeyUpdate: either side ratchets its sending key forward, with no new handshake and no pause. RFC 9846 made updating before the limits a MUST and capped how often KeyUpdate may be sent (section 5.5); libraries do it for you.
          • gRPC needs ALPN 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.
          • Know which hops are encrypted: draw the section 7 figure for your own path, including model server to other GPUs, in your threat model.
          • Cluster frameworks are plaintext by default. Ray's internal gRPC channels have TLS only if you set 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.
          • Private CAs for internal names. Internal services, notebooks and clusters should get certificates from a private CA (cert-manager with a private issuer, SPIRE, a cloud private CA), never from a public CA: public certificates publish every host name in CT logs (section 5) and can no longer carry clientAuth for mTLS (section 7).
          • Downloads and supply chain. Model and package downloads (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.

          Reference

          Optional: interview rehearsal, the dated changes behind this page, and the glossary.

          Interview questions, with model answers (seven)
          Walk me through what happens in a TLS 1.3 handshake.
          ClientHello with versions, cipher suites, SNI, ALPN, supported groups and key shares for its guesses. ServerHello picks a suite and returns its key share; both sides now derive handshake keys via HKDF from the (EC)DHE secret and the transcript. The server sends, encrypted: EncryptedExtensions (ALPN), Certificate, CertificateVerify (signature over the transcript with the certificate's key) and Finished (HMAC over the transcript). The client verifies chain, name, dates and signature, checks Finished, sends its Finished and can send application data immediately: one round trip. Afterwards the server may send session tickets. Mention HelloRetryRequest if the guess was wrong, and that everything after ServerHello is encrypted, unlike 1.2.
          What is forward secrecy and how does TLS 1.3 guarantee it?
          Compromise of long-term keys does not expose past sessions. TLS 1.3 removed static RSA and static DH key exchange, so every full handshake uses ephemeral (EC)DHE or a hybrid KEM whose private values are discarded; the certificate key only signs. Resumption keeps it with psk_dhe_ke. Caveat: a stolen session-ticket key exposes the resumption secrets of tickets it encrypted, so rotate ticket keys.
          Why is 0-RTT dangerous, and when would you enable it?
          Early data is encrypted under a key derived only from the resumption PSK, with no fresh server input, so a recorded first flight can be replayed and the server decrypts and processes it again (measured on this page: three replays, three extra billed generations). Enable it only for idempotent, safe requests (static GETs), and make origins see Early-Data: 1 and answer 425 for anything else (RFC 8470).
          A service works in the browser but Python raises "unable to get local issuer certificate". Diagnose.
          Run openssl s_client -showcerts and count certificates and check the depth-0 issuer. Only the leaf sent: the server is missing its intermediate; browsers fill the gap from cache or the AIA URL, Python does not; fix the server to send the full chain. Issuer is a corporate or vendor CA: TLS inspection; give Python the OS store (truststore) or a bundle with that root. Issuer is your private CA: the client's trust store lacks it; set the right variable for that client (requests reads REQUESTS_CA_BUNDLE, not SSL_CERT_FILE). Never verify=False.
          How would you implement mTLS between 200 microservices?
          A private CA and automated short-lived identities: SPIFFE IDs issued by SPIRE or a mesh (Istio, Linkerd), certificates of hours, rotated at half-life without restarts; authorization policies on the SPIFFE ID, not on "signed by our CA"; a maximum connection age so rotation and revocation reach long-lived connections; time sync everywhere; trust-bundle rotation as an overlap. Decide where TLS terminates at load balancers and never trust a forwarded client-certificate header from untrusted sources.
          Why is post-quantum key exchange deployed but post-quantum certificates are not?
          Harvest-now-decrypt-later makes key exchange urgent; signature forgery only matters in real time, after a quantum computer exists. And ML-KEM adds about 1.2 KB per direction, while ML-DSA chains add many kilobytes: measured here, an ML-DSA-65 two-certificate flight is 15.9 KB against 2.4 KB for ECDSA, past TCP's initial window, costing a round trip. The plan is Merkle Tree Certificates, which carry one signature plus an inclusion proof.
          Certificate lifetimes are going to 47 days. What changes for an engineering team?
          Manual renewal stops being possible; every certificate needs ACME (or a cloud-managed one), monitoring of the served certificate's remaining days, ARI support so the CA can move renewal windows, and reload without restart. Domain validation reuse of 10 days makes DNS or HTTP validation a runtime dependency. Inventory every place a certificate is pinned or copied (devices, partner allowlists, Java keystores).
          What changed recently (2024-08 to 2026-10), and what is coming
          DateChange
          2026-10-17 to 22Browsers and operating systems distrust eight eMudhra intermediates whose private keys were recoverable from their certificates
          2026-09-21Merkle Tree Certificates draft -06 (IETF PLANTS working group)
          2026-08RFC 10024: hybrid ML-KEM groups for TLS 1.3 standardised
          2026-07-08Let's Encrypt ends its client-authentication profile
          2026-07-06AWS Certificate Manager speaks ACME (45-day certificates)
          2026-07RFC 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-15Chrome: new subordinate CAs must be serverAuth only; MPIC needs 4 perspectives
          2026-03-15Public certificates at most 200 days, validation reuse 200 days; CAs must validate DNSSEC
          2026-03RFC 9849 (Encrypted Client Hello) and RFC 9848
          2026-02-28Let's Encrypt's RFC 6962 CT logs shut down
          2026-02-18AWS ACM default validity 395 to 198 days
          2026-02-11Let's Encrypt default profile drops clientAuth
          2026-01-15Let's Encrypt 6-day and IP-address certificates generally available
          2025-10-28Cloudflare and Chrome Merkle Tree Certificate experiment
          2025-09-15MPIC enforced (2 remote perspectives)
          2025-08-06Let's Encrypt OCSP responders off
          2025-06RFC 9773: ACME Renewal Information
          2025-04-11CA/Browser Forum adopts SC-081v3 (the 200/100/47-day schedule)
          2025-04-08OpenSSL 3.5.0 prefers hybrid post-quantum key exchange by default
          2024-08-13FIPS 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).

          Glossary
          AEAD
          Authenticated encryption with associated data: a cipher that encrypts and adds a tag detecting any change (AES-GCM, ChaCha20-Poly1305).
          ALPN
          Application-Layer Protocol Negotiation: the ClientHello extension that picks http/1.1, h2 or h3 inside the handshake.
          ACME
          Automatic Certificate Management Environment (RFC 8555): the API for getting certificates; ARI (RFC 9773) adds suggested renewal windows.
          CA, root, intermediate
          Certificate authority; a root is a self-signed CA certificate in a trust store; an intermediate is a CA certificate signed by a root that issues leaves.
          CAA
          DNS record naming which CAs may issue for a domain (RFC 8659).
          Certificate Transparency, SCT
          Public append-only logs of every public certificate; an SCT is a log's signed promise, embedded in the certificate.
          CertificateVerify, Finished
          The signature over the handshake transcript with the certificate's key; the HMAC over the transcript proving both sides saw the same handshake.
          Cross-signing
          One CA certificate signed by another CA as well, so older clients can still build a path to a root they know.
          DV, OV, EV
          Domain, organisation and extended validation levels of a certificate; only domain control matters technically.
          ECH
          Encrypted Client Hello (RFC 9849): encrypts the real SNI and ALPN under a key published in DNS.
          EKU
          Extended Key Usage: what a certificate may be used for (serverAuth, clientAuth).
          Forward secrecy
          Past sessions stay secret even if long-term keys leak later; from ephemeral key exchange.
          HelloRetryRequest
          The server's request for a new ClientHello with a key share for another group; costs a round trip.
          HKDF
          HMAC-based key derivation function: turns the shared secret and the transcript hash into all TLS keys.
          Hybrid key exchange
          A classical and a post-quantum exchange run together, both mixed into the secret (X25519MLKEM768).
          KEM, ML-KEM
          Key encapsulation mechanism; ML-KEM (FIPS 203) is the lattice-based post-quantum one.
          KeyUpdate
          TLS 1.3 message that moves a direction to a new key without a new handshake.
          ML-DSA, SLH-DSA
          Post-quantum signature standards (FIPS 204, FIPS 205).
          MPIC
          Multi-perspective issuance corroboration: CAs validate from several network locations.
          MTC
          Merkle Tree Certificates: batches signed once, handshakes carry an inclusion proof; the planned path to post-quantum authentication.
          mTLS
          Mutual TLS: the client also presents a certificate and signs the transcript.
          OCSP, CRL, stapling
          Online status query; published revocation list; server-attached OCSP answer.
          PSK, session ticket
          Pre-shared key from an earlier session, carried in an opaque ticket, used for resumption.
          SAN
          Subject Alternative Name: the names (DNS, IP, URI) a certificate is valid for; the only place hostnames are checked.
          SNI
          Server Name Indication: the host name in the ClientHello, in clear unless ECH is used.
          SPIFFE, SVID, SPIRE
          Workload identity standard (a URI), the certificate carrying it, and the reference issuer.
          Trust store
          The set of root certificates a client trusts; differs per OS, browser and runtime.
          0-RTT, early data
          Application data sent in the first flight of a resumed connection; replayable.