Hash Lab

Checksum

Fletcher’s checksum

Proposed by John G. Fletcher (Lawrence Livermore, 1982). Two running sums (one of the data, one of the first sum’s history) combined into a single output. Catches all single-bit, all double-bit, and all burst errors of short length , while running far faster than CRC. Widely deployed in network protocols where speed matters.

The three sizes

VariantOutputModulus
Fletcher-1616 bits255
Fletcher-3232 bits65535
Fletcher-6464 bits4294967295

How it works

Maintain two accumulators a, b initialized to 0 (or to a non-zero starting state per the variant). For each input word w: a = (a + w) mod M; b = (b + a) mod M. Output (b << bits) | a where bits is half the output width. Compared with Adler-32, the modulus is the Mersenne-like 2k−1 rather than a prime , making the modular reduction cheaper at the cost of slightly weaker distribution.

Where it shows up

Limitations

Like every checksum on this list, Fletcher is non-cryptographic. Adversaries can construct collisions trivially. It also has a well-known limitation: a block of all-zero bytes followed by a single non-zero byte at the right position can mask error patterns.

References

Quick quiz

Test yourself on fletcher

10 multiple-choice questions. Pick an answer for each, then submit to see explanations.

  1. Q1.Who designed Fletcher's checksum?

  2. Q2.Which is NOT a Fletcher variant?

  3. Q3.Fletcher's modulus for the 32-bit variant:

  4. Q4.Which routing protocol uses Fletcher-16?

  5. Q5.Is Fletcher cryptographic?

  6. Q6.Fletcher vs CRC main trade-off:

  7. Q7.Which filesystem has used Fletcher checksums?

  8. Q8.Was SCTP's first-edition checksum Fletcher-32?

  9. Q9.Fletcher-16 is suitable for:

  10. Q10.Which limitation is well known about Fletcher?

0 of 10 answered