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
| Name | Bits | Purpose | Tamper-resistant? |
|---|---|---|---|
| Parity | 1 bit | Single-bit error only | No |
| Adler-32 | 32 bits | Fast zlib check, faster but weaker than CRC32 | No |
| CRC32 | 32 bits | Integrity for networks, archives, storage | No |
| MD5 | 128 bits | Non-adversarial checks, cache keys | No (collisions feasible) |
| SHA-256 | 256 bits | Integrity, certificates, signatures | Yes |
Variants and implementation details
Several CRC32 parameters vary by context, which is why two implementations can return different values for the same input:
- Generator polynomial: the most common is
0xEDB88320(the reflected form, corresponding to0x04C11DB7), known as CRC-32/ISO-HDLC and used by ZIP and PNG; CRC-32/BZIP2 uses a different set of parameters. - Initial value: commonly
0xFFFFFFFF. - Input and output reflection: whether each byte's bit order is reversed.
- Final XOR value: commonly
0xFFFFFFFF.
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.