wire / wire-format / tls-handshake
TLS 1.3 handshake messages are framed within TLS records (content type 0x16). Each handshake message: 1-byte message type (ClientHello 0x01, ServerHello 0x02, EncryptedExtensions 0x08, Certificate 0x0B, CertificateVerify 0x0F, Finished 0x14, ...), 3-byte length (big-endian), then the message body. Multiple handshake messages can share a record.
aka: TLS 1.3 handshake message framing
spec: RFC 8446
TLS 1.3 handshake messages are framed within TLS records (content type 0x16). Each handshake message: 1-byte message type (ClientHello 0x01, ServerHello 0x02, EncryptedExtensions 0x08, Certificate 0x0B, CertificateVerify 0x0F, Finished 0x14, ...), 3-byte length (big-endian), then the message body. Multiple handshake messages can share a record.
| field | size | meaning |
|---|---|---|
| Handshake type | 1 byte | 0x01 ClientHello, 0x02 ServerHello, 0x08 EncryptedExtensions, 0x0B Certificate, 0x0D CertificateRequest, 0x0F CertificateVerify, 0x14 Finished, 0x16 KeyUpdate, ... . |
| Length | 3 bytes | Length of the handshake message body (big-endian, max 2^24-1). |
| Body | = Length | Message-specific content (ClientHello: version, random, session id, cipher suites, extensions, ...). |
example:
16 03 03 00 05 01 00 00 01 00
TLS record (handshake, TLS 1.2 legacy version, 5 bytes) wrapping a ClientHello (type 1, length 1, body empty-ish)
agent: curl -H 'accept: application/json' wire.phall.io/wire-format/tls-handshake
or /wire-format/tls-handshake.json