Names and Trust, chapter 26 of 36
TLS 1.3: The Handshake
Our TLS 1.3 ClientHello says TLS 1.0 in its record header and TLS 1.2 inside. Only an extension tells the truth.
Sixteen milliseconds after the click, the SYN-ACK is in and the laptop's ACK leaves. In the same instant the browser hands the kernel 1,732 bytes for port 443: one TLS record, too big for one TCP segment because one of its key shares is built to resist a quantum computer that does not exist yet. One round trip later both ends hold keys that no one else on the path can compute.
- 1,732 bytes
- our ClientHello, in two TCP segments, because its hybrid key share alone is 1,216 bytes
- 92.3 percent
- of 2017 Chrome beta handshakes to TLS 1.3-capable servers that succeeded with draft 18, against 98.3 with TLS 1.2
- 70 percent
- about that much browser traffic to Cloudflare used hybrid ML-KEM in September 2026, but only about 15 percent of origins
Two observers, one handshake
Our handshake in five steps, record by record. Step through them and switch between the endpoints and a middlebox on the path to see which fields stay readable and which secrets each observer holds.
What did TLS 1.3 throw away?
Almost everything an attack had used. RFC 9852, Section 6 lists the TLS 1.2 catalog: renegotiation and the triple handshake, Lucky Thirteen against CBC padding, BEAST, Logjam, FREAK, and SLOTH. RFC 10015, Section 1 adds that RSA key exchange has no forward secrecy by construction.
TLS 1.3 removed the mechanisms themselves (RFC 9846, Section 1.3). Without static RSA and static Diffie-Hellman, every certificate-authenticated handshake is forward secret. Everything after the ServerHello is encrypted, the certificate included. The full handshake takes one round trip where TLS 1.2 took two, because the client guesses the key exchange group and sends its share in the first message.
Why does a TLS 1.3 hello claim to be TLS 1.2?
Because servers and middleboxes broke when it told the truth. Clients answered version intolerance with fallback, and an active attacker could cause the failure on purpose. TLS 1.3 keeps legacy_version at 0x0303, and a server that sees supported_versions must not negotiate with legacy_version (RFC 9846, Section 4.3.1).
With draft 18, whose ServerHello still looked like TLS 1.3, only 92.3 percent of Chrome beta handshakes to TLS 1.3-capable servers succeeded [Rescorla2017a]. Draft 22 made TLS 1.3 look like a TLS 1.2 resumption, with an echoed session ID and a dummy ChangeCipherSpec (RFC 9846, Appendix E.4). This variant completed 98.8 percent in Chrome's second round, against 98.6 for TLS 1.2.
How do you keep an extension point from rusting shut?
You exercise it. David Benjamin's RFC 8701 reserves sixteen values of the form 0x?A?A for cipher suites, ALPN identifiers, extensions, groups, signature algorithms, and versions, for clients to send at random (RFC 8701, Section 2). A correct server ignores them. A broken one fails at once, while the bug is still rare enough to get fixed.
Our hello carries six, from an empty extension 0x5a5a at the front to a one-byte extension 0x1a1a at the end. BoringSSL avoids ending a hello over TCP on an empty extension. A comment in its code says that WebSphere Application Server 7.0 fails when the last extension has zero length [BoringSSL2026].
Where do the keys come from?
From HKDF, Hugo Krawczyk's two-step key derivation function. Extract concentrates unevenly distributed input, such as a Diffie-Hellman result, into a pseudorandom key, and Expand stretches that key into as many outputs as needed (RFC 5869, Section 1). Every traffic secret is bound to a hash of the messages exchanged so far.
Without a PSK the schedule still runs, with zeros as input. So every SHA-256 handshake without a PSK starts from the same Early Secret, 33 ad 0a 1c ..., and the first connection-specific secret is the Handshake Secret. Finished, an HMAC over the transcript, catches a man in the middle who deleted an offered group or version.
Why is one key share 1,216 bytes long?
Because of harvest-now-decrypt-later. An attacker who records today's handshakes can decrypt them once a quantum computer breaks elliptic-curve Diffie-Hellman, while authentication cannot be broken after the fact. So key exchange had to move first (RFC 9954, Section 1.2).
For X25519MLKEM768 (0x11EC) the client sends a 1,184-byte ML-KEM-768 encapsulation key plus a 32-byte X25519 share, and the server answers with 1,120 bytes. The X25519 half stays because ML-KEM, standardized as FIPS 203 in August 2024, lacks the decades of study behind elliptic curves. The name breaks the naming rule, with ML-KEM first "due to historical reasons" (RFC 10024, Section 4.1).
Who can still read the name www.example.net?
Anyone on the path, at offset 0x67 of our ClientHello. TLS 1.3 encrypts the certificate but not the name, which RFC 9849, Section 1 calls "perhaps the most sensitive information left unencrypted".
Encrypted Client Hello encrypts the real ClientHello to a key that a client-facing server publishes, usually in an HTTPS record. www.example.net publishes none, so our laptop sends a GREASE ECH extension: a random config ID, a fresh X25519 key, and 176 random bytes (RFC 9849, Section 6.2.1). It protects nothing by itself. Sent widely, it makes real ECH look ordinary, so that networks cannot single it out.
The book keeps asking
This chapter has 5,614 words and 15 questions. These 9 are answered only in the book and the audiobook.
- How did a Netscape protocol become TLS 1.3?
- What changed in RFC 9846?
- What exactly does the laptop say?
- What does the server send back?
- What does a protected record look like?
- Which signature proves the server's identity?
- How does the second visit skip the expensive part?
- Is a saved round trip worth a replay?
- What changes when TLS runs over UDP?
Open the sources
- RFC 9846 The Transport Layer Security (TLS) Protocol Version 1.3
- RFC 8446 The Transport Layer Security (TLS) Protocol Version 1.3
- RFC 5869 HMAC-based Extract-and-Expand Key Derivation Function (HKDF)
- RFC 8448 Example Handshake Traces for TLS 1.3
- RFC 9954 Hybrid Key Exchange in TLS 1.3
- RFC 10024 Post-Quantum Traditional (PQ/T) Hybrid Key Agreement Mechanisms for TLS 1.3
- RFC 9849 TLS Encrypted Client Hello
- RFC 8701 Applying Generate Random Extensions And Sustain Extensibility (GREASE) to TLS Extensibility
All 45 documents this chapter cites, each with a link to its publisher and a copy kept here.
