ASCII Armor Encoder Decoder
// ASCII Armor - PGP/GPG message format with headers and checksums
Standard Format
Compatible with PGP and GPG tools for encrypted messages and keys.
CRC24 Integrity
Built-in CRC24 checksum ensures data integrity during transfer.
Clear Markers
BEGIN/END markers clearly identify content type and boundaries.
>> technical info
How ASCII Armor Works:
ASCII Armor wraps Base64-encoded data with PGP headers and a CRC24 checksum. It allows binary cryptographic data to be safely transmitted through text-only channels like email.
Structure:
-----BEGIN PGP MESSAGE----- [Base64 data] =[CRC24] -----END PGP MESSAGE-----
Why Use ASCII Armor:
- >PGP/GPG encryption
- >Digital signatures
- >Key distribution
- >Email encryption
- >Secure messaging
>> frequently asked questions
What is ASCII Armor?
ASCII Armor is a format used by PGP and GPG to encode binary cryptographic data (keys, signatures, encrypted messages) in a text format that can be safely transmitted through email and other text-only channels.
Why is it called 'armor'?
The term 'armor' refers to protecting binary data by encasing it in a text format that won't be corrupted by email systems or text editors. It 'armors' the data against corruption.
What are the different block types?
Common types include: MESSAGE (encrypted messages), PUBLIC KEY BLOCK (public keys), PRIVATE KEY BLOCK (private keys), SIGNATURE (digital signatures), and SIGNED MESSAGE (clearsigned text).
What is the CRC24 checksum for?
The CRC24 checksum (the line starting with =) helps detect if the message was corrupted during transmission. It's a 24-bit cyclic redundancy check of the decoded data.
Other Languages
References
How we make sure
We check this tool with the automated test suites linked below. Example checks are shown in their original language.
- Verification method
- Read generated Armor with OpenPGP, compare the UTF-8 payload bytes, and check the CRC-24 vector for 123456789.
- Comparison reference
- OpenPGP.js unarmor output and the known CRC-24 value 0x21CF02.
- Verification scope
- These samples and boundaries do not prove correctness for every input.
Test source and cases (select a file to read it)
-
text-reliability.test.js
- ASCII Armor: OpenPGP independently reads UTF-8 payloads and the CRC-24 check vector matches
These checks cover the listed examples and boundaries, not every possible input. Round trips and checks using the same library are not independent verification.