Base64Hub

ASCII Armor Parser: RFC 4880 OpenPGP Workbench

Decode and generate IETF RFC 4880 OpenPGP ASCII Armor blocks, validate 24-bit CRC24 checksums (0x1864CFB polynomial), and inspect Radix-64 packet framing client-side.

CRC24 0x1864CFB VERIFIED
64 Cols
Hello, OpenPGP ASCII Armor!
CRC24: =aW+b (VALID MATCH)
Decoded Bytes27 Octets
Computed CRC24=aW+b (0x696F9B)
Armor Header TypePGP MESSAGE
Line Wrap Policy64 Chars (RFC 4880)
RFC 4880 §6.1 CRC24 Shift Register & Hex Octet Dump 24-Bit LFSR State
CRC24 Init: 0xB704CE | Poly: 0x1864CFB | Computed: 0x696F9B (=aW+b)
Hex Stream: 48 65 6C 6C 6F 2C 20 4F 70 65 6E 50 47 50 20 41
IETF RFC 4880 OpenPGP ASCII Armor Radix-64 framing engine and 24-bit CRC24 LFSR polynomial bus
IETF RFC 4880 §6.2 OpenPGP Radix-64 framing architecture and 24-bit CRC24 (0x1864CFB) shift register verification.
IETF RFC 4880 Section 6.1 & 6.2 Normative Summary

ASCII Armor (specified in IETF RFC 4880 Section 6) encapsulates binary OpenPGP public keys, encrypted messages, and detached cryptographic signatures inside 7-bit printable Radix-64 text blocks safe for SMTP email and terminal copy-paste. Every armored block appends a 24-bit cyclic redundancy check (CRC24) initialized to 0xB704CE and reduced modulo 0x1864CFB, serialized as a 4-character Radix-64 footer prefixed with =.

RFC 4880 ASCII Armor Framing vs. Raw Binary OpenPGP Packet Size

4/3 Radix-64 expansion plus 64-column line wraps, Armor Headers, and 5-byte =CRC24 footer

Armored OpenPGP Block (1.36x + Frame) Raw Binary OpenPGP Packet (1.00x)
56 B 28 B 0 B 0.25x Raw 14 B Payload (20 B B64) 2.0x Scale
RFC 4648 Information Density Ratio (Raw / Base64 Wire Size) 75.0% Payload Efficiency (+33.3% Overhead)
IETF RFC 4880 Section 6.1 CRC24 Generator Polynomial (0x1864CFB)
G(x) = x24 + x23 + x18 + x17 + x14 + x11 + x10 + x7 + x6 + ⋯ + x + 1

How Does OpenPGP ASCII Armor Frame Binary Packets and Compute the CRC24 Checksum?

ASCII Armor converts raw 8-bit OpenPGP packet streams into 64-column Radix-64 text blocks bounded by five-hyphen header and tail lines plus a 24-bit CRC24 checksum. Unarmoring 27 payload octets inside our workbench verifies the 3-byte remainder (=aW+b) against generator polynomial 0x1864CFB in real time.

When transmitting GnuPG public keys, Linux repository signing keys (.asc), or encrypted security advisories across 7-bit email gateways, raw binary packets (0x80–0xFF) risk silent stripping or CRLF line-ending mutation. While the core 3-to-4 byte mapping shares the 64-character alphabet analyzed in our RFC 4648 Base64 & Data URI Framing Workbench, OpenPGP adds stateful framing rules and a dedicated 24-bit cyclic redundancy check.

To inspect the unarmored binary packet tags (such as Tag 6 Public-Key Packet or Tag 18 Symmetrically Encrypted Integrity Protected Data Packet) at the nibble level, pass the unarmored hex dump directly into our Hexadecimal & Binary Packet Inspector Hub, or verify the key fingerprint digest inside our NIST FIPS 180-4 SHA256 Digest & Register Calculator.


Formal Mathematical Proof & Byte Boundary Audit

Mathematical Specifications, Native MathML Models & Verification Vectors

Formal IETF RFC 4648, IEEE Radix-16, ITU-R M.1677-1, and NIST FIPS 180-4 equations governing the client-side engine.

RFC 4648 §4 Base64 24-Bit Quantum Expansion

Verified Standard
LB64=4×⌈n3⌉andPpad=(3−(nmod3))mod3

Every 3-octet (24-bit) input group subdivides into four 6-bit indices (0..63). Remainder octets require 1 or 2 padding (0x3D) characters to align the 4-character quantum.

n (Input UTF-8 Bytes)
14

Byte length emitted by UTF-8 TextEncoder.encode(str)

L_B64 (Encoded Wire Size)
20

4-byte aligned ASCII output length (+33.33% ceiling)

RFC 4648 §8 Base16 Hexadecimal Positional Radix

Verified Standard
V10=∑i=0k−1di⋅16iwhereLHex=2n

Splits each 8-bit octet into high (b >> 4) and low (b & 0x0F) 4-bit nibbles mapped onto 0–9 and A–F, doubling character length (+100%).

L_Hex (Hex Nibble Length)
28

Two hexadecimal nibbles per raw input byte

0xFF (Max Octet Value)
255 Dec

Binary 11111111 full 8-bit unsigned integer ceiling

ITU-R M.1677-1 International Morse Signal Timing

Verified Standard
Tdah=3⋅Tdit,Tchar=3⋅Tdit,Tword=7⋅Tdit

Standardizes telegraph pulse durations relative to the fundamental dot quantum T_dit (1200 / WPM milliseconds under PARIS 50-unit calibration).

T_dit (Dot Unit)
1 Unit

Base pulse duration and intra-character element gap

T_word (Word Delimiter)
7 Units

Represented by "/" between space-delimited character codes

NIST FIPS 180-4 SHA-256 Compression Functions

Verified Standard
Ch(e,f,g)=(e∧f)⊕(¬e∧g),Maj(a,b,c)=(a∧b)⊕(a∧c)⊕(b∧c)

Processes 512-bit padded blocks across 64 Merkle-Damgård rounds over eight 32-bit state registers (H0..H7) to emit a 256-bit (64-hex-char) digest.

H_0..H_7 (Digest State)
256 Bits

Fractional square roots of the first 8 primes (2..19)

K_0..K_63 (Round Constants)
64 Words

Fractional cube roots of the first 64 primes (2..311)

Empirical Specification Verification Matrix

Vector Profile Input Stream Deterministic Output Byte Boundary Implication
UTF-8 Greeting Vector Plaintext: "Hello, Base64!" (14 B) SGVsbG8sIEJhc2U2NCE (1-pad, 20 B) 5-quantum ceiling with single 0x3D padding character (n mod 3 is 2).
High-Bit Octet Sequence Bytes: [251, 255, 191] (0xFBFFBF) Std: +/+/ | URL: -_-_ RFC 4648 §5 replaces "+" and "/" to prevent URL query corruption.
Hexadecimal Byte Stream Hex: "48 65 78" & "0xFF" ASCII: "Hex" | Dec: 255 (11111111) Case-insensitive radix-16 nibble parsing without NaN truncation.
ITU-R Distress Signal Plaintext: "SOS" (3 Chars) ... --- ... (27 Timing Units) 3 dits + 3-unit gap + 3 dahs + 3-unit gap + 3 dits.
NIST FIPS 180-4 Vector Input: "abc" (24 Bits) ba7816bf8f01cfea...f20015ad (64 Hex) Single 512-bit block compression yielding deterministic 256-bit digest.

1. Non-Zero Shift Register Initialization (0xB704CE)

Unlike standard CRC algorithms initialized to 0x000000 or 0xFFFFFF, Philip Zimmermann and IETF RFC 4880 Section 6.1 specified the non-zero constant 0xB704CE so that leading zero bytes (0x00) at the start of an OpenPGP packet immediately alter the shift register state.

2. Why CRC24 Is Computed on Raw Octets (Not Base64 Text)

A frequent implementation bug occurs when developers feed the ASCII Base64 characters into the CRC24 loop. RFC 4880 mandates that CRC24 be computed strictly over the decoded raw binary octets prior to Radix-64 encoding, making the checksum invariant to CRLF vs. LF line-ending conversions.

3. RFC 9580 (OpenPGP v6) Deprecation of Mandatory CRC24

In the 2024 IETF RFC 9580 OpenPGP Crypto Refresh (v6 keys and SEIPDv2 AEAD packets), generators may omit the trailing =XXXX CRC24 line because modern AEAD authenticated encryption already detects bit corruption, while legacy RFC 4880 parsers still validate it when present.

4. Cleartext Signature Framework & Dash-Escaping (Section 7)

In -----BEGIN PGP SIGNED MESSAGE----- blocks, any plaintext line starting with a hyphen (-) is prepended with "- " (dash-space) so mail parsers never confuse body text with the -----BEGIN PGP SIGNATURE----- boundary.

How Do OpenPGP ASCII Armor Headers, PEM (RFC 7468), and S/MIME Encapsulations Compare?

Use the reference matrix below to distinguish IETF RFC 4880 OpenPGP armor headers from X.509 PEM certificates (IETF RFC 7468) and OpenSSH public key formats.

Encapsulation Header Governing Standard Line Length Header Key-Values CRC24 (=XXXX) Footer Binary Payload Format
BEGIN PGP MESSAGEIETF RFC 4880 §6.264 chars (max 76)Allowed + Blank LineMandatory (RFC 4880)OpenPGP Encrypted / Signed Packets
BEGIN PGP PUBLIC KEY BLOCKIETF RFC 4880 / 958064 chars (max 76)Allowed + Blank LineRFC 4880 Yes / 9580 OptTag 6 Public-Key + User ID + Subkeys
BEGIN PGP SIGNATUREIETF RFC 4880 §6.264 charsHash: SHA256 / SHA512Mandatory (RFC 4880)Tag 2 Detached Signature Packet
BEGIN CERTIFICATE (PEM)IETF RFC 746864 chars strictForbiddenForbiddenASN.1 DER X.509 Structure
BEGIN OPENSSH PRIVATE KEYOpenSSH PROTOCOL.key70 charsForbiddenForbiddenAUTH_MAGICv1 Binary Key Structure
RFC 4648 Multi-Radix Protocol Inspector

Filename & URI Safe Base64URL Alphabet (Indices 62 & 63)

Replaces standard Base64 index 62 (+) with hyphen-minus (-, 0x2D) and index 63 (/) with underscore (_, 0x5F) while omitting trailing = (0x3D) padding characters for OAuth 2.0 PKCE and JWT headers.

Quantum Block
24-Bit (3 Octets -> 4 Sextets)
Index 62 / 63
- (0x2D) / _ (0x5F)
Canonical Vector
[251,255,191] -> -_-_

Binary-to-Text Framing & Checksum Specification Matrix

Compare OpenPGP Radix-64 against PEM, MIME Base64, and Ascii85 framing.

Encoding SchemeNormative RFCInput -> Output QuantumWire ExpansionPadding & URL Safety
Base64 Standard IETF RFC 4648 §4 3 Bytes (24b) -> 4 Sextets +33.33% (4/3n) Mandatory = (0x3D); unsafe + and / in URIs
Base64URL (Filename Safe) IETF RFC 4648 §5 3 Bytes (24b) -> 4 Sextets +33.33% (4/3n) Optional = omitted; uses - (0x2D) and _ (0x5F)
Base32 Uppercase IETF RFC 4648 §6 5 Bytes (40b) -> 8 Quintets +60.00% (8/5n) Uses A–Z and 2–7; case-insensitive DNS/TOTP safe
Base16 Hexadecimal IETF RFC 4648 §8 1 Byte (8b) -> 2 Nibbles +100.00% (2n) Zero padding; deterministic 0x00–0xFF nibble pairs
Percent-Encoding IETF RFC 3986 §2.1 1 Reserved Byte -> %XX Variable (1x–3x) Escapes reserved URI delimiters via % hex triplets
Interactive Specification & Edge-Case Decision Matrix

Interactive Encoding & Cryptographic Architecture Decision Tree

Select your engineering transport constraint to isolate the compliant IETF/NIST specification and load its verification vector directly into the workbench.

Scenario 01 | 4 × ⌈n / 3⌉ Bytes
Inline Data URIs, MIME Attachments & TLS PEM
Scenario 02 | Zero %2B / %2F Escaping
OAuth 2.0 PKCE Verifiers, JWT Tokens & URL Params
Scenario 03 | 2n ASCII Nibbles
Memory Dumps, Network Packet Inspection & Byte Debugging
Scenario 04 | 64-Char Fixed Hex
Immutable Checksums, Git Commits & Distributed IDs
Recommended Standard

IETF RFC 4648 §4 Standard Base64 (6-Bit Sextet + 0x3D Padding)

1.333x Expansion (+33.3%)

Use Standard Base64 when embedding small raster icons (under 4 KB) in CSS/HTML Data URIs or encoding X.509 certificates where strict 4-character quantum padding (0x3D) is required by MIME parsers.

Normative Specifications
RFC 4648 §4 Base64RFC 2397 Data URIRFC 7468 PEM Armor
Wire Size Rule
4 × ⌈n / 3⌉ Bytes

Frequently Asked Questions About OpenPGP ASCII Armor & CRC24 Verification

How does IETF RFC 4880 OpenPGP ASCII Armor differ from standard RFC 4648 Base64 encoding? +

While both schemes encode 24-bit binary quanta into four 6-bit Radix-64 characters (+33.33% expansion), IETF RFC 4880 Section 6.2 wraps the Radix-64 body inside five structural layers: a five-hyphen header line (-----BEGIN PGP MESSAGE-----), optional key-value Armor Headers, a mandatory blank separator line, 64-character line-wrapped Radix-64 chunks, an '='-prefixed 24-bit CRC24 checksum (=XXXX), and a five-hyphen tail line.

How is the 24-bit OpenPGP CRC24 checksum (=XXXX) calculated under the RFC 4880 specification? +

RFC 4880 Section 6.1 initializes a 24-bit shift register to 0xB704CE and processes every raw unencoded binary octet (before Radix-64 conversion) using generator polynomial x^24 + x^23 + x^18 + x^17 + x^14 + x^11 + x^10 + x^7 + x^6 + x^5 + x^4 + x^3 + x + 1 (hexadecimal 0x1864CFB). The resulting 3-byte big-endian remainder is Radix-64 encoded into four characters prefixed with an equals sign (=XXXX).

Why does OpenPGP ASCII Armor mandate a blank line between the Armor Headers and the Radix-64 body? +

According to IETF RFC 4880 Section 6.2, optional metadata headers (such as 'Version:', 'Comment:', or 'Hash:') immediately follow the BEGIN header line. A single empty line (CRLF or LF containing zero whitespace characters) serves as the deterministic parser delimiter separating human-readable header key-value pairs from the binary Radix-64 payload.

Does the 24-bit CRC24 checksum in ASCII Armor provide cryptographic integrity against malicious tampering? +

No. CRC24 is a linear cyclic redundancy check designed strictly to detect accidental SMTP mail-gateway truncation, bit flips, or line-wrapping corruption during transit. Cryptographic authenticity and tamper resistance in OpenPGP require verifying the embedded Modification Detection Code (MDC, Tag 19 SHA-1) or AEAD authentication tag.

How do PEM (RFC 7468) X.509 certificates and OpenPGP (RFC 4880) ASCII Armor blocks differ structurally? +

While both formats use five-hyphen '-----BEGIN ...-----' and '-----END ...-----' encapsulation boundaries around 64-character Base64 lines, IETF RFC 7468 PEM files forbid Armor Header key-value lines and omit the trailing '=XXXX' CRC24 checksum line that OpenPGP parsers expect.