0
$\begingroup$

The Adler32 algorithm has a shortcoming as noted on Wikipedia:

Jonathan Stone discovered in 2001 that Adler-32 has a weakness for very short messages. He wrote "Briefly, the problem is that, for very short packets, Adler-32 is guaranteed to give poor coverage of the available bits. Don't take my word for it, ask Mark Adler. :-)"

If I am only computing a checksum on packets that are around 1,500 bytes long, is there an adjustment to Adler32 to make it work well in this case? Alternatively, is there another algorithm that is as fast as Adler32 but does not have such weaknesses? What about the Fletcher algorithm - does it suffer the same weakness?

$\endgroup$
  • 1
    $\begingroup$ Why do you believe any adjustment would be needed? That quote specifically says it applies to "very short messages". 1500 bytes is not "very short". I'm not seeing what the problem is here. $\endgroup$ – D.W. Oct 29 '13 at 16:47
3
$\begingroup$

In [1], the authors show that for 1500 bytes, the chance of an undetected collision with Adler32 is less than one in 100 billion.

In that paper, see Figure 13 which states:

Comparison of 8-, 16-, and 32-bit Fletcher and Adler checksums using random data at a BER of
10-5. The data point values are the mean of 10 trials.

And shows probability of undetected error using Adler32 to below 10-11 for a 1500 byte message.

Therefore, as D.W. suggested above, no adjustment is needed.


[1] Maxino, Theresa C., and Philip J. Koopman. "The effectiveness of checksums for embedded control networks." Dependable and Secure Computing, IEEE Transactions on 6.1 (2009): 59-72.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.