World's most popular travel blog for travel bloggers.

[Solved]: Is there an adjustment for Adler32 algorithm so it works well on short messages?

, , No Comments
Problem Detail: 

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?

Asked By : WilliamKF

Answered By : WilliamKF

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.

Best Answer from StackOverflow

Question Source : http://cs.stackexchange.com/questions/16547

3.2K people like this

 Download Related Notes/Documents

0 comments:

Post a Comment

Let us know your responses and feedback