Visual RFC.
ALL RFCs / RFC 8188
Read the RFC ↗
RFC 8188 / ENCRYPTED CONTENT

Frame and validate each record

04

A record encrypts data, one delimiter and trailing zero padding, then includes a 16-octet AES-GCM authentication tag. The delimiter distinguishes an intermediate record from the final one.

RFC 8188 · § 2EXAMPLE
4 / 4
Frame and validate each recordA record encrypts data, one delimiter and trailing zero padding, then includes a 16-octet AES-GCM authentication tag. The delimiter distinguishes an intermediate record from the final one. The published final record has eight data octets followed by 02, with no extra zero padding. Its tag still takes 16 octets, so it also fills 25. A shorter final record is allowed; the 02 marker is still required.Delimiter + padding precede encryptionSuccessful tag check first8 data bytes | 02Last non-zero = 02Final record; recover 8 data bytesFinal ciphertext can be shorter than rsRFC8188 · chapter4 · state4 · published/illustrative data
04
Validate the final record

The published final record has eight data octets followed by 02, with no extra zero padding. Its tag still takes 16 octets, so it also fills 25. A shorter final record is allowed; the 02 marker is still required.

Source for this drawing: RFC 8188 · Read RFC section 2 ↗

Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background

A message needs an address.

Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.

Helpful first, if these ideas are unfamiliar

These pictures are analogies to help you learn. The linked RFC explains the actual rules.

Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

KEY POINT

At most rs−17 data octets fit: reserve one delimiter and 16 tag octets. Non-final records fill rs; the last may be smaller. A valid record needs at least 17 octets, even though rs itself must be at least 18.

  • At most rs−17 data octets fit: reserve one delimiter and 16 tag octets. Non-final records fill rs; the last may be smaller. A valid record needs at least 17 octets, even though rs itself must be at least 18.
  • Append delimiter 01 for non-final or 02 for final, then zero padding. After authenticated decryption, the delimiter is the last non-zero octet. A decrypter MUST fail for no non-zero octet or the wrong delimiter for that position.
  • Additional authenticated data means unencrypted bytes included in the tag check; this coding supplies an empty sequence. Record-aligned random access requires the right header, key and original sequence numbers; partial encrypted records cannot be decrypted.
DETAILS

Published test keys are examples, not secrets to use. This guide does not implement key management or a production cryptographic library.

Read the RFC section ↗

All chapters in RFC 8188

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗