OpenPGP messages and keys are often sent as ASCII armor (RFC 4880): a cleartext block with headers, Base64 body (76-character lines), and a CRC-24 checksum line starting with =.
-----BEGIN PGP MESSAGE-----
…
(Base64 body, 76-char lines)
=XXXX
-----END PGP MESSAGE-----
The Base64 alphabet matches standard RFC 4648 (+ / with = padding). The extras are framing and the CRC, not a different alphabet.
Versus MIME Base64
| MIME (RFC 2045) | OpenPGP armor | |
|---|---|---|
| Line length | ≤ 76 | ≤ 76 |
| Headers | MIME Content-Transfer-Encoding | BEGIN / END armor |
| Checksum | none | CRC-24 (=XXXX) |
Developer tips
- Never treat armored text as encryption by itself—the armor is packaging; OpenPGP encryption is separate.
- Strip headers before feeding the body to a generic decoder, or use a tool that understands armor.
- Our encoder/decoder supports the OpenPGP ASCII armor standard for body encode/decode workflows; use the detector if you are unsure which wrapping you have.
Reacties (0)
Vragen, ideeën of een bug in “OpenPGP ASCII armor”? Laat een reactie achter, beoordeel de tool of reageer op anderen.
Nog geen reacties. Deel als eerste je feedback!