TLS 1.3 handshakes, byte by byte

TLS 1.3 removed a round trip and most of the configuration knobs. What is left is a handshake that fits in a single flight from each side, which is why it feels instantaneous on a good path and still feels slow on a bad one.

The client starts with a ClientHello: a random value, a key share, a list of cipher suites, and the server name in clear text. Everything after the ServerHello is encrypted, including the certificate. That change alone breaks a lot of old assumptions about what a network observer can see.

client                                          server
  |-- ClientHello (key share, SNI) ------------->|
  |<-- ServerHello (key share) ------------------|
  |<-- {EncryptedExtensions, Certificate, ...} --|
  |-- {Finished} -------------------------------->|
  |<-- {Finished} -------------------------------|
  |======== application data ====================|

Two details are worth internalizing. First, the server sends its half of the key exchange immediately, so the client can derive keys before the certificate arrives. Second, session resumption is now a PSK handshake: a returning client can send early data in the first flight, at the cost of replay risk if the application is not careful.

What still costs a round trip

TCP. A TLS 1.3 handshake over a fresh TCP connection still pays the SYN/SYN-ACK exchange first. On a 150 ms path that is 150 ms before the first TLS byte, plus another for the handshake if the client does not have a ticket. QUIC folds the transport and crypto handshakes together, which is the main reason it wins on lossy links.

Middleboxes and the SNI

Because the SNI is unencrypted, it remains the easiest thing for a middlebox to filter. Encrypted Client Hello exists to fix that, but it depends on DNS and on the server publishing the right configuration. In practice, most deployments still live or die by whether the SNI looks plausible for the address it is sent to.

The lesson I keep relearning: protocol design is only half the story. The other half is whether the traffic looks like it belongs on the network it is crossing.