Algorithms

CRC-24

Three bytes after the equals sign at the bottom of an OpenPGP armored block
IDcrc2434 / 46CRC · 24-bit
Hash / Non-cryptographic

CRC-24

Four base64 characters after the = in PGP armor.

Digest
24-bit · 3 bytes
HMAC
no key mode
Security
NOT for security: error-detection checksum only
Family
4 in CRC
4 options, 0 required

Sample

hex
b03cb7
base64
sDy3

Options

encodingstring
default hex
Output encoding: hex, base64, base64url, binary
variantstring
default openpgp
Which CRC-24: openpgp, as RFC 4880 armor writes it
roundsnumber
default 1
How many times to hash, each round hashing the previous digest
chainstring
default bytes
What each round after the first hashes: bytes of the digest, or its lowercase hex

Access

Createcreate("crc24")
CLIhashes crc24 'hello world'
Tryplayground with the sample above
Kincrc32, crc64, crc16-xmodem

Seen that short = line just above -----END PGP SIGNATURE-----? It's not part of the signature. It's a CRC-24 of the decoded bytes, in base64, there to catch a mangled copy and paste. RFC 4880 §6.1 starts it at 0xb704ce with polynomial 0x864cfb. No reflection, no final xor.

ts
create("crc24").hash("123456789").digest; // "21cf02", the standard check value
create("crc24").hash("123456789", { encoding: "base64" }).digest; // "Ic8C", as armor prints it
crc24(bytes, "openpgp"); // the byte function, same thing

Checking a block by hand? Decode the base64 body and hash those bytes, not the text. GnuPG agrees on every input the tests throw at it. RFC 9580 says new armor shouldn't write the line anymore. gpg --enarmor 2.4 still does, so you'll keep meeting it.

It guards against typos, not attackers. Anyone can fix up a CRC after editing the body. That's the signature's job.

variant has one value so far, openpgp. Same deal as CRC-64: the next CRC-24 lands as a value, not as another algorithm.