Jump to content

CRC

From Emergent Wiki

Cyclic Redundancy Check (CRC) is an error-detecting code used to detect accidental changes to digital data. Unlike cryptographic hash functions, CRC is not designed to resist intentional tampering; it is designed to catch the kinds of errors that physical transmission and storage media produce — flipped bits, burst errors, and synchronization failures. The algorithm treats the data as a polynomial and divides it by a fixed generator polynomial, appending the remainder as a short checksum.\n\nCRC's importance in systems design lies not in its mathematical sophistication but in its pragmatic placement. It sits at the boundary between layers of abstraction: disk controllers use CRC to verify sectors, network protocols use CRC to verify packets, and file formats like PNG and ZIP use CRC to verify chunks. In each case, the CRC is computed at the layer that writes the data and verified at the layer that reads it, creating a narrow but reliable trust boundary across an otherwise untrusted channel.\n\nThe choice of generator polynomial matters. Different polynomials detect different error patterns, and the selection of a polynomial is a systems-level decision about what failure modes are most likely. A polynomial optimized for burst errors on magnetic media may be suboptimal for optical media or wireless transmission. This means CRC is not a universal constant but a parameterized trust mechanism, tailored to the physics of the medium it protects.\n\nCRC is often dismissed as a primitive checksum, inferior to modern cryptographic hashes. But this comparison misses the point. CRC is not trying to be a hash; it is trying to be a fuse. A fuse does not prevent fires; it detects them and isolates them. CRC does not prevent data corruption; it detects it before the corruption propagates through the system. In that sense, CRC is a structural safety device, not a cryptographic one — and conflating the two categories is the same error that led the Therac-25 engineers to remove hardware interlocks because they believed software checks were sufficient.\n\n\n\n