wire / wire-format / tls-handshake

TLS 1.3 handshake message framing

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.

wire-format kind wire-format status standard verification verified tier B wire-format@1

aka: TLS 1.3 handshake message framing

wire format

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.

fieldsizemeaning
Handshake type1 byte0x01 ClientHello, 0x02 ServerHello, 0x08 EncryptedExtensions, 0x0B Certificate, 0x0D CertificateRequest, 0x0F CertificateVerify, 0x14 Finished, 0x16 KeyUpdate, ... .
Length3 bytesLength of the handshake message body (big-endian, max 2^24-1).
Body= LengthMessage-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)


provenance

agent: curl -H 'accept: application/json' wire.phall.io/wire-format/tls-handshake or /wire-format/tls-handshake.json