At 05:14 PM 12/11/2000 -0800, Nikita Borisov wrote:
>But in his examples, addition mod 2^128 - 159 can be implemented rather
>quickly:
>
>S_i = S_{i-1} + b [regular 128-bit addition]
>if (b > S_i) S_i += 159

Ahhh, yes, a classical example of premature optimisation. This is, of 
course, a different definition of modular arithmetic than most people would 
use.

Suppose that the result of the addition S_i falls into the range
   [2^128-159 .. 2^128)
then his nice quick method gives an answer that isn't reduced at all, 
whereas it really ought to be in the range [0 .. 159) by most people's 
definitions of modular arithmetic.

So long as both ends use the broken method, or you aren't terribly unlucky 
(since only about 1 in 2^121 calculations will hit this case), it will all 
still work.

Greg.


Greg Rose                                       INTERNET: [EMAIL PROTECTED]
Qualcomm Australia          VOICE:  +61-2-9181-4851   FAX: +61-2-9181-5470
Level 3, 230 Victoria Road,                http://people.qualcomm.com/ggr/
Gladesville NSW 2111    232B EC8F 44C6 C853 D68F  E107 E6BF CD2F 1081 A37C


Reply via email to