[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Magic Numbers in MD5



I am curious where some of the magic numbers in MD5 originated.

First, we have the four chaining variables, A, B, C, and D which
are initialized with apparently random numbers.  Are they as
random as they look, or are they carefully chosen?

Second, we have the t_i values.  Schneier's first edition says this:

"In step i, t_i is the integer part of 4294967296xabs(sin(i)), when
i is in radians.  (Note that 4294967296 is 2^32.)"

Does abs(sin()) have some properties that are especially conducive to
strengthening MD5 or is it just a function to generate mildly random
numbers?  If the latter, wouldn't the algorithm be stronger if it was
used with completely random numbers?

Peter Hendrickson
[email protected]