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.
评论 (0)
对“OpenPGP ASCII armor”有疑问、想法或发现了 bug?欢迎留言评论、为工具评分或回复他人。
暂无评论,快来分享您的反馈吧!