A TLS 1.3 Handshake, Message by Message
One recorded loopback TLS 1.3 handshake, read message by message with real primitives: the records, the hellos, the key schedule, a record opened by hand, CertificateVerify and Finished. A recording of one connection between two test programs; the secrets are test material and protect nothing. To run a fresh handshake with your own client and server in the tab, start with A TLS 1.3 Handshake You Can Step Through (/tls-13-handshake-live/); for failures, see TLS Failures You Can Trigger (/tls-failures-you-can-trigger/).
The Hellos
The records, the ClientHello with its extensions, and the ServerHello that answers it.
- The Handshake Is Thirteen Records
13 records, three outer types
- ClientHello, Fixed Fields
version, random, session id, suites, extensions
- ClientHello Extensions
type, length, data; the real version choice
- ServerHello Picks
suite, version and key share chosen by the server
The Protected Flight
Keys from the logged secrets, one record opened by hand, CertificateVerify and Finished.
- Keys From the Secret
HkdfLabel, tls13 key, tls13 iv
- A Record Opens With Its Nonce
nonce = IV xor sequence number
- CertificateVerify Signs the Transcript
the 130 bytes that the server signs
- Finished Closes the Handshake
the finished key and the 36-byte message