AFAIK, such "magic" values have the following two properties:
- They are somehow unique, and look random.
- They can take part in algebraic operations repeatedly; i.e. even after applying some specific operation (say multiplication or exponentiation) many times, the "magic" value is still able to generate new values.
You may find a similar case in the MD5. Consider the following line:
k[i] := floor(abs(sin(i + 1)) × (2 pow 32))
Here, sin(i + 1)
is meant to generate magic values; which are unique, random-looking, and can work for a lot of i
's. (Actually, i
ranges in 0..63).
Edit: Reading the original paper on TEA, one understands that the answer given by "Steven Stadnicki" is correct. Note that the magic constant is name delta:
A different multiple of delta is used in each round so that no bit of the multiple will not change frequently. We suspect the algorithm is not very sensitive to the value of delta and we merely need to avoid a bad value. It will be noted that delta turns out to be odd with truncation or nearest rounding, so no extra precautions are needed to ensure that all the digits of sum change.
Since only 32 multiples of delta is used (one per each round), it is not odd that the algorithm is not very sensitive to any specific delta. (See Steven Stadnicki's answer for more info.)
Edit 2: Incidentally, MD4 uses square roots of 2 (0x5a827999) and 3 (0x6ed9eba1) as "magic" constants in its operations. Section 5.4.4 of the book Network Security: Private Communication in a Public World explains this well:
To show that the designers didn't purposely choose a diabolical value of the constant, the constant is based on the square root of 2.
This explanation is the same as the point made below in a comment by Gilles.