Visual RFC.
ALL RFCs / RFC 7468
Read the RFC ↗
RFC 7468 / TEXTUAL SECURITY OBJECTS

Generate predictable lines and exact boundaries

02

A generator writes a form that other tools can read reliably. Its formatting duties are stricter than every parser’s possible acceptance policy.

RFC 7468 · § 3EXAMPLE
4 / 4
Generate predictable lines and exact boundariesA defective generator has mismatching PUBLIC KEY and PRIVATE KEY labels; the chosen checker stops it, while the RFC permits parsers to disregard a closing label.Generate the strict formGenerator51 toy bytes → 68 charactersBEGIN PUBLIC KEYEND PRIVATE KEYMismatched generator labelsSTOP generator errorParser MAY ignore the closing labelExact BEGIN/END case · no legacy headers
04
Stop a mismatched generator output.

Separate defective example: BEGIN PUBLIC KEY paired with END PRIVATE KEY violates the generator MUST. The shown checker rejects it; other parsers MAY ignore the closing label. Lowercase begin/end and legacy Proc-Type headers are not the prescribed format.

Source for this drawing: RFC 7468 · Read RFC section 3 ↗

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

Generate the strict form; do not infer generator permission from tolerant readers.

  • Generators MUST wrap Base64 at exactly 64 characters per line, except the final line, which contains the remainder within 64 characters. They MUST NOT emit extraneous whitespace. New implementations SHOULD emit Figure 3’s strict format, including the final newline.
  • There is exactly one space after BEGIN or END and exactly five hyphens on each side. Verified technical erratum 4508 makes BEGIN and END themselves explicitly case-sensitive, correcting the ABNF (Augmented Backus–Naur Form grammar).
  • Unlike legacy PEM, OpenPGP armor and OpenSSH key files, this format does not permit headers alongside the encoded data. Generators SHOULD NOT emit blank space between the opening boundary and Base64.
  • A generator MUST match boundary labels. A parser MAY disregard a mismatching closing label; rejecting it is a permissible local policy, not a universal parser MUST.
DETAILS

The 51-byte fixture is only a formatting vector. Its 68 Base64 characters become a 64-character line and a four-character final line; line geometry is schematic.

Read the RFC section ↗

All chapters in RFC 7468

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 ↗