wire / wire-format / tls-record

TLS 1.3 record layer

A TLS record consists of a 5-byte header (content type 1 byte, legacy version 2 bytes, length 2 bytes) followed by the (possibly encrypted) fragment. In TLS 1.3 the real content type moves into the encrypted payload (inner content type).

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

aka: TLS 1.3 record layer

wire format

spec: RFC 8446

A TLS record consists of a 5-byte header (content type 1 byte, legacy version 2 bytes, length 2 bytes) followed by the (possibly encrypted) fragment. In TLS 1.3 the real content type moves into the encrypted payload (inner content type).

fieldsizemeaning
Content Type1 byteOuter type: 0x17 application data (all TLS 1.3 records), or 0x14 change cipher spec, 0x15 alert, 0x16 handshake for legacy.
Legacy Version2 bytes0x0303 (TLS 1.2) for compatibility; ignored in TLS 1.3.
Length2 bytesFragment length in octets (max 2^14 + 256).

example:

17 03 03 00 05 48 65 6c 6c 6f

Application data record, TLS 1.2 legacy version, 5-byte fragment 'Hello'


provenance

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