Crc32

See also: Algorithm | Redundant | Data

Crc32 is an algorithm for Cyclic redundancy check (http://utopia.knoware.nl/users/eprebel/Communication/CRC/).

A 32bit value calculated from all the bit in a file or datastream. CRC’s are primarily used to detect data corruption. CRC algoritms are chosen so that when any single bit in a file changes the CRC value of the file changes.

A 32bit CRC has about 4 billion possible values. The chance of random data corruption producing a different file with the same CRC is low but in situations such as trasfers across the internet where large numbers of files are transfered a 32 bit CRC will fail to detect data corruption ocassionally.

CRC’s are not cryptographically secure. It is relativly easy to generate a file of a desired size that produces a paticular CRC value. A longer value such as an MD5 sum can be used where greater protection against data corruption and deliberate tampering is required.

The checksum used on TCP and UDP packets sent using IPv4 is an add-up-the-bytes checksum, not a CRC. It is requires less computation but is not as good at detecting corruption. Using it probably made sense in the 1970’s. IP4 includes the time-to-live value in the checksum which requires it to be recalculated at every hop, IP6 uses an end-to-end checksum.

TakeDown.NET -> “Crc32