K103 / Encoding and decoding
CRC
CRC detects transmission or storage errors by appending a fixed-length value computed from a data block.
CRYPTOGRAPHY LAB / K103
Cryptography Lab · CRC
Run real computations and inspect intermediate states step by step.
Educational only. Never enter real passwords or secret keys. Computation stays in your browser; input and trace values are not sent to a server. Do not use this implementation in production.
CRC-32/ISO-HDLC
See the scope above for fixed examples, reduced parameters and supported variants. Standard operation names and formulas are retained.Output
Previous state
- Definition and overview
- CRC detects transmission or storage errors by appending a fixed-length value computed from a data block. Source document ↗
- Classification and reversibility
- Not confirmed in the survey
- Key or secret requirements
- Keyless checksum requiring no key or secret. Source document ↗
- Operating principle and structure
- Computes a GF(2) polynomial division remainder so message plus CRC is a multiple of the generator polynomial. Source document ↗
- Key size, block size and parameters
- CRC-32 uses 32-bit output and a generator polynomial such as 0x04c11db7. Source document ↗
- Security strength and recommendation
- Unkeyed, non-collision-resistant checksum; not recommended for security. Source document ↗
- Known attacks and vulnerabilities
- Alternative messages satisfying the checksum can be generated via probabilistic chosen-plaintext attacks. Source document ↗
- Standards and certification
- Related to ISO 3309, ITU-T V.42 and CRC-32/ISO-HDLC standards/catalogues. Source document ↗
- Typical uses
- Error detection in Ethernet, MPEG-2, Gzip, Bzip2 and PNG. Source document ↗
- Implementations, libraries and tools
- Crypto++ and other libraries implement CRC32/CRC32-C. Source document ↗
- Decryption or decoding
- Verify by recomputing and comparing, or checking a zero remainder for message plus CRC; not decryption. Source document ↗
- Advantages
- Detects more error patterns than simple checksums at low hardware cost. Source document ↗
- Limitations and cautions
- Linear and inexpensive to forge; unsuitable for preventing adversarial modifications. Source document ↗
- Distinguishing encryption, encoding and hashing
- Noncryptographic checksum for accidental changes, not encryption, cryptographic hashing or signatures. Source document ↗
Practical examples
Example
Sender computes CRC32 for a data block and appends it. Receiver recomputes using the same CRC32 model and compares.
Procedure
Treat data as a GF(2) polynomial, compute the remainder after dividing by a defined generator and append it. Verify by comparing recomputed CRC or checking the whole message-plus-CRC remainder. No key, secret or plaintext restoration is involved.
Scenario
Quickly detect accidental corruption in firmware downloads, ZIP/GZIP files or Ethernet frames. On adversarial network boundaries, use separate cryptographic authentication rather than trusting CRC for security integrity.
Pitfalls and alternatives
CRC32 is forgeable and collision-prone; use HMAC-SHA-256, AEAD or digital signatures for security integrity/authentication. Specify identical initial values, reflection, final XOR and polynomial to ensure compatibility.
References
- Cyclic redundancy check | IEEE Technology Navigator ↗
- 6.4.1. The CRC-32 Checksum (crc32) ↗
- Brief tutorial on CRC computation — The Linux Kernel documentation ↗
- Cyclic redundancy checks ↗
- CRC-32: sizes, standards and code examples | NextSSL ↗
- How to use the generated CRC code in your program. ↗
- CRC32 - Crypto++ Wiki ↗
- Checksums and hashes: CRC-32 and SHA-256 - Numerical Algorithms with lib_jsl ↗
- cyclic redundancy check (CRC) - Glossary | CSRC ↗