Skip to content
ecdsa.com

ASCII armor

OpenPGP's text encoding of binary packets as base64 between lines such as -----BEGIN PGP PUBLIC KEY BLOCK----- and -----END PGP PUBLIC KEY BLOCK----- (RFC 9580 §6.2).
Also written asASCII armorarmoredBEGIN PGPcleartext signature

Block types include PGP MESSAGE, PGP PUBLIC KEY BLOCK, PGP PRIVATE KEY BLOCK, PGP SIGNATURE and the cleartext form that starts with -----BEGIN PGP SIGNED MESSAGE----- (§7). Optional armor headers follow the first line, and an optional CRC24 checksum line starts with =; RFC 9580 says new armor should not include the checksum and readers must not reject armor because of it.

It looks like PEM but is a different format: PEM labels name ASN.1 structures, armor names OpenPGP packet sequences, and tools for one will not parse the other. Cleartext-signed messages dash-escape lines starting with -, and trailing whitespace is ignored when hashing, a frequent source of confusion.

Standards and references

All terms