Hash Lab

Checksum

CRC-32

A 32-bit cyclic redundancy check , the classic polynomial-division-over-GF(2) family for detecting accidental data corruption. CRC-32 catches every single-bit error, every two-bit error within a span, all odd-bit-count errors, and burst errors up to 32 bits long. It is not cryptographic , an adversary can construct collisions in milliseconds.

At a glance

Output32 bits (8 hex chars)
OperationPolynomial division in GF(2)
Throughput~5-15 GiB/s with SIMD or hardware acceleration
StatusNon-cryptographic; accidental-corruption detection only

The two common variants

NamePolynomialWhere
CRC-32 (IEEE 802.3)0x04C11DB7Ethernet, ZIP, gzip, PNG, IEEE 1394
CRC-32C (Castagnoli)0x1EDC6F41iSCSI, SCTP, ext4 metadata, Btrfs, x86 CRC32 instruction

Why CRC32C is increasingly preferred

Castagnoli’s polynomial has slightly better error-detection properties for the message sizes typical in storage and network protocols, and Intel’s SSE4.2 CRC32 instruction implements it directly. Modern filesystems and protocol stacks pick CRC-32C for both reasons.

Where it shows up

Not for adversaries

Given a target CRC-32, anyone can append 4 bytes to a message to force any desired CRC. This is by design , CRC is a linear function in GF(2). Never use CRC-32 to authenticate messages; use a real MAC like HMAC instead.

References

Visualize

CRC-32 on your input

11 bytes · 0-bit digest

Hex digest

Bit grid (0 bits, teal = 1, slate = 0)

Byte pixel art (0 bytes, hue = byte value mod 360°)

Avalanche , flipping the lowest bit of the first input byte changed 0 of 0 output bits

Test Your Knowledge

Quick MCQ check on this algorithm

Start Quiz →

AI Summary

Summarize this page in your favorite LLM