Depending on its design goals, a good checksum algorithm usually outputs a significantly different value, even for small changes made to the input.
For instance, a function returning the start of a string can provide a hash appropriate for some applications but will never be a suitable checksum.
Some error-correcting codes are based on special checksums which not only detect common errors but also allow the original data to be recovered in certain cases.
If the affected bits are independently chosen at random, the probability of a two-bit error being undetected is 1/n.
A variant of the previous algorithm is to add all the "words" as unsigned binary numbers, discarding any overflow bits, and append the two's complement of the total as the checksum.
If the count of a submitted fuzzy checksum exceeds a certain threshold, the database notes that this probably indicates spam.
The valid received messages (those that have the correct checksum) comprise a smaller set, with only 2m corners.
General topic Error correction Hash functions File systems Related concepts
cksum
utility)