

This is the modular sum of the values taken by the simple checksum as each block of the data word is added to it. In our example, there are only 255 possible checksum values, so it is easy to see that even random data has about a 0.4% probability of having the same checksum as our message.įletcher addresses both of these weaknesses by computing a second value along with the simple checksum. The second weakness is that the universe of checksum values is small, being equal to the chosen modulus. If the order is changed, the checksum value will be the same and the change will not be detected. The first weakness of the simple checksum is that it is insensitive to the order of the blocks (bytes) in the data word (message). The receiver of the message can re-compute the checksum and compare it to the value received to determine whether the message has been altered by the transmission process. (In practice, the modulo operation is performed during the summation to control the size of the result.) The checksum value is transmitted with the message, increasing its length to 137 bytes, or 1096 bits. So, the simple checksum is computed by adding together all the 8-bit bytes of the message, dividing by 255 and keeping only the remainder. Similarly, a convenient modulus would be 255, although, again, others could be chosen. A convenient block size would be 8 bits, although this is not required. The data to be protected, in its entirety, is referred to as a "word", and the pieces into which it is divided are referred to as "blocks".)Īs an example, the data may be a message to be transmitted consisting of 136 characters, each stored as an 8-bit byte, making a data word of 1088 bits in total. (Note that the terminology used in this domain can be confusing. The algorithm Review of simple checksums Īs with simpler checksum algorithms, the Fletcher checksum involves dividing the binary data word to be protected from errors into short "blocks" of bits and computing the modular sum of those blocks. The objective of the Fletcher checksum was to provide error-detection properties approaching those of a cyclic redundancy check but with the lower computational effort associated with summation techniques. Fletcher (1934–2012) at Lawrence Livermore Labs in the late 1970s.

The Fletcher checksum is an algorithm for computing a position-dependent checksum devised by John G.
