Loading learning content...
CRC isn't just one algorithm—it's a family of algorithms, each tailored to specific requirements. A USB flash drive uses CRC-16. An Ethernet NIC uses CRC-32. A satellite link might use CRC-32C. File archives like ZIP and PNG embed CRC-32. The Bluetooth specification mandates CRC-24.
Each standard represents careful engineering tradeoffs: polynomial selection for optimal error detection, bit ordering for hardware compatibility, initialization values for specific edge case handling. Understanding these standards is essential for implementing protocols correctly and debugging interoperability issues.
This page surveys the most important CRC standards, explaining their specifications, applications, and the engineering rationale behind their design.
By the end of this page, you will understand the major CRC standard families (CRC-8, CRC-16, CRC-32, CRC-64), know the complete specifications (polynomial, init, reflection, XOR-out) for key standards, recognize which CRC is used in common protocols, appreciate why different applications need different CRCs, and be able to select an appropriate CRC for new applications.
A complete CRC standard specifies more than just the polynomial. The full parameter set includes:
1. Width (r) The number of bits in the CRC value. Common values: 8, 16, 24, 32, 64.
2. Polynomial (Poly) The generator polynomial, usually expressed in hexadecimal. May be given with or without the leading 1 bit.
3. Initial Value (Init) The starting value of the CRC register. Often 0x0000...0 or 0xFFFF...F.
4. Input Reflection (RefIn) Whether each input byte is reflected (bit-reversed) before processing.
5. Output Reflection (RefOut) Whether the final CRC value is reflected before output.
6. Final XOR (XorOut) A value XORed with the final CRC before output. Often 0x0000...0 or 0xFFFF...F.
7. Check Value The CRC of the ASCII string "123456789" (0x31 0x32 ... 0x39). Used for implementation verification.
| Parameter | Description | Example (CRC-32) |
|---|---|---|
| Width | Number of CRC bits | 32 |
| Poly | Generator polynomial (hex) | 0x04C11DB7 |
| Init | Initial register value | 0xFFFFFFFF |
| RefIn | Reflect input bytes? | True |
| RefOut | Reflect output CRC? | True |
| XorOut | Final XOR value | 0xFFFFFFFF |
| Check | CRC of "123456789" | 0xCBF43926 |
Two implementations using the same polynomial but different Init or RefIn values will produce completely different CRCs. When implementing or debugging CRC, verify ALL parameters match the standard. The Check value provides a simple test: if your implementation produces the correct Check value, all parameters are likely correct.
CRC-8 provides 8-bit (1 byte) checksums. With only 256 possible values, CRC-8 is suitable for short messages where space is at a premium and undetected error probability of ~0.4% is acceptable.
Applications:
| Name | Poly (Hex) | Init | RefIn/Out | XorOut | Check | Applications |
|---|---|---|---|---|---|---|
| CRC-8 | 0x07 | 0x00 | No/No | 0x00 | 0xF4 | General purpose |
| CRC-8/ITU | 0x07 | 0x00 | No/No | 0x55 | 0xA1 | ATM header |
| CRC-8/MAXIM | 0x31 | 0x00 | Yes/Yes | 0x00 | 0xA1 | 1-Wire bus (Dallas) |
| CRC-8/DARC | 0x39 | 0x00 | Yes/Yes | 0x00 | 0x15 | Data Radio Channel |
| CRC-8/CDMA2000 | 0x9B | 0xFF | No/No | 0x00 | 0xDA | Mobile telephony |
| CRC-8/WCDMA | 0x9B | 0x00 | Yes/Yes | 0x00 | 0x25 | 3G mobile networks |
Polynomial Analysis:
0x07 (x⁸ + x² + x + 1): A primitive polynomial providing maximal period. Simple to implement.
0x31 (x⁸ + x⁵ + x⁴ + 1): Used by Dallas/Maxim 1-Wire. Has (x+1) factor for odd-parity detection.
0x9B (x⁸ + x⁷ + x⁴ + x³ + x + 1): Strong burst detection properties, used in cellular.
Detection Capabilities:
With 8-bit CRC:
For messages longer than a few hundred bytes, consider CRC-16 or higher.
CRC-8 is ideal for: (1) Very short messages (< 100 bytes), (2) Bandwidth-constrained channels, (3) Hardware with limited resources, (4) Applications where a 1-in-256 miss rate is acceptable. For general networking where packets can be 1500+ bytes, prefer CRC-32.
CRC-16 provides 16-bit (2 byte) checksums with ~99.998% detection rate for random errors. This balance of protection and overhead made CRC-16 the standard for serial protocols, industrial networks, and many embedded systems.
Applications:
| Name | Poly (Hex) | Init | RefIn/Out | XorOut | Check | Primary Use |
|---|---|---|---|---|---|---|
| CRC-16-IBM (ARC) | 0x8005 | 0x0000 | Yes/Yes | 0x0000 | 0xBB3D | LHA, ARC compression |
| CRC-16-CCITT | 0x1021 | 0xFFFF | No/No | 0x0000 | 0x29B1 | X.25, HDLC, Bluetooth |
| CRC-16-XMODEM | 0x1021 | 0x0000 | No/No | 0x0000 | 0x31C3 | XMODEM protocol |
| CRC-16-MODBUS | 0x8005 | 0xFFFF | Yes/Yes | 0x0000 | 0x4B37 | Modbus industrial |
| CRC-16-USB | 0x8005 | 0xFFFF | Yes/Yes | 0xFFFF | 0xB4C8 | USB data packets |
| CRC-16-DNP | 0x3D65 | 0x0000 | Yes/Yes | 0xFFFF | 0xEA82 | DNP3 (power grid) |
The Two Major Polynomials:
CRC-16-CCITT: 0x1021 = x¹⁶ + x¹² + x⁵ + 1
The CCITT (now ITU-T) polynomial has excellent mathematical properties:
CRC-16-IBM: 0x8005 = x¹⁶ + x¹⁵ + x² + 1
The IBM polynomial also excellent:
CRC-16-CCITT and CRC-16-XMODEM use the identical polynomial (0x1021) but different Init values (0xFFFF vs 0x0000). A message CRC'd with one will not verify with the other! This is a common source of interoperability bugs. Always verify the complete parameter set.
CRC-32 provides 32-bit (4 byte) checksums with approximately 1 in 4 billion undetected error probability. This level of protection is suitable for network frames up to megabytes and storage blocks up to gigabytes.
Applications:
| Name | Poly (Hex) | Init | RefIn/Out | XorOut | Check | Primary Use |
|---|---|---|---|---|---|---|
| CRC-32 (ISO 3309) | 0x04C11DB7 | 0xFFFFFFFF | Yes/Yes | 0xFFFFFFFF | 0xCBF43926 | Ethernet, ZIP, PNG |
| CRC-32C (Castagnoli) | 0x1EDC6F41 | 0xFFFFFFFF | Yes/Yes | 0xFFFFFFFF | 0xE3069283 | iSCSI, SCTP, Btrfs |
| CRC-32K (Koopman) | 0x741B8CD7 | 0xFFFFFFFF | Yes/Yes | 0xFFFFFFFF | 0x2D3CFA80 | Research optimal |
| CRC-32Q | 0x814141AB | 0x00000000 | No/No | 0x00000000 | 0x3010BF7F | AIXM aviation |
| CRC-32/POSIX | 0x04C11DB7 | 0x00000000 | No/No | 0xFFFFFFFF | 0x765E7680 | POSIX cksum |
CRC-32 (Ethernet): The Original Standard
Polynomial: 0x04C11DB7 = x³² + x²⁶ + x²³ + x²² + x¹⁶ + x¹² + x¹¹ + x¹⁰ + x⁸ + x⁷ + x⁵ + x⁴ + x² + x + 1
This polynomial was selected in the 1970s by Wesley Peterson and has remained the dominant choice. Properties:
Every Ethernet frame you've ever sent has been protected by this polynomial.
CRC-32C (Castagnoli): The Modern Improvement
Polynomial: 0x1EDC6F41 = x³² + x²⁸ + x²⁷ + x²⁶ + x²⁵ + x²³ + x²² + x²⁰ + x¹⁹ + x¹⁸ + x¹⁴ + x¹³ + x¹¹ + x¹⁰ + x⁹ + x⁸ + x⁶ + 1
Developed by Guy Castagnoli, this polynomial provides better error detection in several scenarios:
Used by iSCSI (storage over IP), SCTP (reliable transport), and modern file systems like Btrfs.
For new applications: Use CRC-32C if possible. It has superior mathematical properties AND hardware acceleration on modern Intel/AMD CPUs (CRC32 instruction is specifically for CRC-32C, NOT CRC-32 Ethernet). For compatibility with existing systems (Ethernet, ZIP), you must use CRC-32.
CRC-64 provides 64-bit (8 byte) checksums with approximately 1 in 10¹⁹ undetected error probability. This extreme reliability is required for large-scale storage systems and high-reliability applications where even CRC-32's 1-in-4-billion miss rate is insufficient.
Applications:
| Name | Poly (Hex) | Init | RefIn/Out | XorOut | Primary Use |
|---|---|---|---|---|---|
| CRC-64-ECMA | 0x42F0E1EBA9EA3693 | 0x0000...0 | No/No | 0x0000...0 | ECMA-182 tape |
| CRC-64-ISO | 0x000000000000001B | 0xFFFF...F | Yes/Yes | 0xFFFF...F | ISO 3309, HDLC |
| CRC-64-XZ | 0x42F0E1EBA9EA3693 | 0xFFFF...F | Yes/Yes | 0xFFFF...F | XZ compression |
| CRC-64-WE | 0x42F0E1EBA9EA3693 | 0xFFFF...F | No/No | 0xFFFF...F | Research |
The ECMA-182 Polynomial:
0x42F0E1EBA9EA3693 = x⁶⁴ + x⁶² + x⁵⁷ + x⁵⁵ + x⁵⁴ + x⁵³ + x⁵² + x⁴⁷ + x⁴⁶ + x⁴⁵ + x⁴⁰ + x³⁹ + x³⁸ + x³⁷ + x³⁵ + x³³ + x³² + x³¹ + x²⁹ + x²⁷ + x²⁴ + x²³ + x²² + x²¹ + x¹⁹ + x¹⁷ + x¹³ + x¹² + x¹⁰ + x⁹ + x⁷ + x⁴ + x + 1
This polynomial was carefully selected for tape storage where:
When Is CRC-64 Necessary?
CRC-64 is overkill for most applications. Consider it when:
Example Calculation:
A petabyte storage system with 4KB blocks:
With CRC-64:
For truly massive storage, CRC-64 provides meaningful improvement.
Even with 64 bits, CRC is not secure against malicious modification. An attacker can easily create different data with the same CRC. For integrity against adversaries, use cryptographic hashes (SHA-256) or message authentication codes (HMAC). CRC protects against random errors, not intentional tampering.
Beyond the main families, several specialized CRCs serve specific protocols and applications:
CRC-5 (USB Token Packets) Polynomial: 0x05, 5 bits, used in USB for short token packets (handshake, address). Minimal overhead for very small packets.
CRC-7 (SD/MMC Cards) Polynomial: 0x09, 7 bits, used in memory card command packets. Optimized for short command sequences.
CRC-10 (ATM AAL) Polynomial: 0x233, 10 bits, used in ATM Adaptation Layer for cell payloads.
CRC-12 (Telecommunications) Polynomial: 0x80F, 12 bits, used in telecommunications for 6-bit character streams.
CRC-24 (Bluetooth, OpenPGP) Polynomial: 0x864CFB, 24 bits. Strong enough for Bluetooth enhanced data rate packets and PGP encrypted messages.
| Name | Width | Poly | Primary Application |
|---|---|---|---|
| CRC-5/USB | 5 | 0x05 | USB tokens |
| CRC-7/MMC | 7 | 0x09 | SD/MMC commands |
| CRC-10/ATM | 10 | 0x233 | ATM AAL |
| CRC-11/FlexRay | 11 | 0x385 | Automotive FlexRay |
| CRC-12/CDMA2000 | 12 | 0xF13 | Mobile telephony |
| CRC-15/CAN | 15 | 0x4599 | CAN bus (automotive) |
| CRC-24/BLE | 24 | 0x864CFB | Bluetooth Low Energy |
| CRC-24/INTERLAKEN | 24 | 0x328B63 | High-speed interconnect |
Automotive CRCs:
Automotive applications have strict CRC requirements due to safety criticality:
CAN bus (CRC-15): Every CAN frame includes a 15-bit CRC to protect the identifier and data. The polynomial 0x4599 was chosen for excellent burst detection in the noisy automotive electrical environment.
FlexRay (CRC-11): Used in high-speed automotive networks for powertrain control. The polynomial provides guaranteed detection of specific error patterns matching EMI characteristics.
LIN (CRC-8): Lighter-weight protocol for subsystems uses CRC-8 to minimize overhead on slow serial links.
Protocol Stack CRCs:
A single packet may traverse multiple CRC-protected layers:
Application Data
└── CRC-32 (if file transfer with integrity check)
└── TCP Segment (TCP checksum, not CRC)
└── IP Packet (IP header checksum)
└── Ethernet Frame (CRC-32 FCS)
└── Physical Layer (possibly FEC)
Each layer provides independent error protection optimized for its scope.
With this gallery of standards, there's almost certainly a vetted CRC for your needs. Inventing a new polynomial requires extensive mathematical analysis to ensure error detection properties. Using a standard also enables hardware acceleration, library support, and debugging tools.
Given the variety of CRC standards, how do you choose the right one for a new application?
Decision Framework:
| Scenario | Recommended CRC | Rationale |
|---|---|---|
| Short packets (< 100 bytes) | CRC-8 or CRC-16 | Minimize overhead |
| Network frames (< 1500 bytes) | CRC-32 | Industry standard, hardware support |
| Storage blocks (4KB-64KB) | CRC-32 or CRC-32C | Strong protection, well-analyzed |
| Large files (MB-GB) | CRC-32C or CRC-64 | Hardware accel, massive data volume |
| Embedded/IoT sensors | CRC-8 or CRC-16 | Resource constraints |
| Automotive networks | CRC-15 (CAN) or CRC-11 (FlexRay) | Safety standards compliance |
| New high-perf application | CRC-32C | Best hardware support, excellent properties |
For most new applications without specific legacy requirements, CRC-32C (Castagnoli) is the best choice. It has: (1) Excellent mathematical properties, (2) Hardware acceleration on x86/ARM, (3) Wide library support, (4) 4-byte overhead suitable for most message sizes. It's the 'sensible default' for modern systems.
We've surveyed the landscape of CRC standards, from compact CRC-8 to robust CRC-64. Let's consolidate the key insights:
Module Complete: CRC Mastery
Over these five pages, we've journeyed from the mathematical foundations of polynomial arithmetic in GF(2), through generator polynomial theory, to practical calculation, verification, and real-world standards. You now possess:
CRC represents one of the most elegant applications of abstract algebra to practical engineering. Every network packet, every file archive, every storage block benefits from this remarkable error detection technique. You're now equipped to implement, debug, and extend CRC protection in your own systems.
Congratulations! You've mastered CRC—the gold standard for error detection in data communications. From polynomial division to generator selection, from calculation to verification, from CRC-8 to CRC-64, you now understand the complete CRC ecosystem. This knowledge will serve you in protocol implementation, system debugging, and engineering design throughout your networking career.