CRC32 Checksum

Compute the CRC32 checksum, commonly used for data verification

—

CRC32: it catches accidental corruption, not malicious tampering

What CRC32 actually is

CRC treats the data as a binary polynomial and divides it by a fixed generator polynomial; the remainder is the checksum. CRC32 produces 32 bits, shown as 8 hexadecimal characters.

Its design goal is to detect accidental bit errors from transmission and storage at very low cost. It is guaranteed to catch every single-bit error, every burst error up to 32 bits long, and the vast majority of longer bursts. That is exactly why it shows up in Ethernet frames, ZIP and PNG files, gzip streams, and essentially every flash and disk controller: in those environments the errors are random, not crafted by an adversary.

Why it is not a security control

CRC32 is linear: CRC(a ⊕ b) = CRC(a) ⊕ CRC(b) after adjusting for length. That means an attacker can compute directly which bytes to append so the modified data keeps the identical CRC — no brute force, just a single arithmetic step.

On top of that, the output is only 32 bits, so a blind guess succeeds with probability 1 in 232. That sounds tiny, but it poses no obstacle whatsoever to an automated attack.

So: CRC32 can tell you "the downloaded file was corrupted in transit", never "the file was swapped by an attacker". For the second question you need SHA-256 or a digital signature.

CRC32 next to related ideas

NameBitsPurposeTamper-resistant?
Parity1 bitSingle-bit error onlyNo
Adler-3232 bitsFast zlib check, faster but weaker than CRC32No
CRC3232 bitsIntegrity for networks, archives, storageNo
MD5128 bitsNon-adversarial checks, cache keysNo (collisions feasible)
SHA-256256 bitsIntegrity, certificates, signaturesYes

Variants and implementation details

Several CRC32 parameters vary by context, which is why two implementations can return different values for the same input:

If the checksum you compute disagrees with a tool or a publisher, check these parameters before assuming the data is corrupt. Because the parameters are a convention rather than part of the value, two parties exchanging CRCs must agree on them separately; a parameter mismatch is the most common reason a checksum appears not to verify. This tool uses the same set as ZIP and PNG (CRC-32/ISO-HDLC) and shows both hexadecimal and decimal forms.

FAQ

Can CRC32 be used as a hash?

No. CRC32 is an error-detection code used only to catch transmission or storage errors. It is not collision-resistant and has no security properties.