Labs / Lab 09 / Real crypto

Wire Overhead

Watch a TLS 1.3 handshake twice: today's key exchange and the hybrid one. Step through it, open any packet, and find the bytes the new algorithm adds.

Formal term: hybrid TLS 1.3 key exchange

All labs (10)

Explainer

Watch the idea first.

Why the handshake needs a second lock, what that lock costs in bytes, and when the hello stops fitting in one packet. 1 min 30 s, with captions.

Narrated with an ElevenLabs synthetic voice; animation made in code with Remotion. Educational, not for production use.
Read the transcript
  1. Every secure website visit starts with a handshake. Your browser sends a key share. The server sends one back. From those two halves, both sides build the same secret, and anyone watching the wire cannot.
  2. But someone can record that handshake today, and keep it. If a large enough quantum computer arrives, it could work out the secret later, and unlock everything in the recording.
  3. So the handshake gets a second lock. The hybrid key share pairs today's X25519 with ML-KEM-768, a post-quantum method. To read the traffic, an attacker would have to break both.
  4. That protection costs bytes. The browser's key share grows from 32 bytes to 1,216. Its whole hello grows from 179 bytes to 1,365. More than seven times bigger.
  5. Networks carry data in packets, and each packet has a size limit. The old hello fits with room to spare. The new one still fits under 1,500 bytes, but at 1,200, it spills into a second packet.
  6. Now see it for yourself. Step through both handshakes in the lab below, open the hybrid hello, and find the bytes the new algorithm adds.
Figures: the hybrid group X25519MLKEM768 puts the ML-KEM-768 part first (RFC 10024). Its client share is 1,216 bytes: an ML-KEM-768 encapsulation key (FIPS 203) plus a 32-byte X25519 key. Hello sizes (179 and 1,365 bytes) come from the same synthetic hello the lab below builds; real hellos vary by browser. TLS 1.3 handshake: RFC 8446. No date for a quantum computer able to break X25519 is implied.

Steps

The client says hello and offers a key share: its half of a secret the two sides will build together.

Stage

Classical X25519

Client
Server

Hybrid X25519MLKEM768

Client
Server
Space play · arrows step · Enter inspect · R restart · + and − speed

ClientHello, both versions on one scale

Classical 179 B
Hybrid 1,365 B
  • Headers
  • Classical key share
  • Post-quantum addition
  • Past the packet limit

FitsBoth hellos fit in one packet. Lower the limit until the hybrid one splits.

Event log
#FromMessageClassicalHybridAdded
1ClientClientHello179 B1,365 B+1,186 B

Goal

Find the field that grew.

Open the hybrid ClientHello in the inspector and select the part that the classical version does not have.

ClientHello

Educational, not for production use. One synthetic hello to example.com, built in code: real ones differ by browser and extensions. Key material shown is random filler of the right length, not real ML-KEM output. Message layout per RFC 8446 (TLS 1.3, since obsoleted by RFC 9846); key share sizes per RFC 10024 and FIPS 203, both Published. As of 1 Dec 2026.

Where this picture breaks

This is one synthetic hello. Real ones differ by browser and extensions, and the slider models one packet size, not a real network path. A key exchange alone does not prove who is on the other end: that takes signatures and certificates.

The handshake as text

  1. ClientHello (Client). The client says hello and offers a key share: its half of a secret the two sides will build together. Classical 179 B, hybrid 1,365 B.
  2. ServerHello (Server). The server answers with its own half. Both sides can now work out the same secret. Someone watching the wire cannot. Classical 127 B, hybrid 1,215 B.
  3. Encrypted server flight (Server). From here on, everything is locked with that secret. The server sends its certificate and proves who it is.
  4. Client Finished (Client). The client confirms it worked out the same secret.
  5. Application data (Client). Real data flows, protected by the secret built in steps 1 and 2.

Practise this

Five questions: put the handshake in order, predict the added bytes, spot what a recorder could open later. No timer. It never blocks your progress.

Planned