--- pgp/src/idea.c 2018/04/24 16:43:48 1.1.1.6 +++ pgp/src/idea.c 2018/04/24 16:44:46 1.1.1.7 @@ -92,9 +92,9 @@ CONST static uint16 a = p >> 16; return (b - a) + (b < a); } else if (a) { - return 1 - b; - } else { return 1 - a; + } else { + return 1 - b; } } /* mul */ #endif /* SMALL_CACHE */ @@ -200,9 +200,9 @@ static void ideaInvertKey(word16 const * /* * MUL(x,y) computes x = x*y, modulo 0x10001. Requires two temps, - * t16 and t32. x is modified, and must me a side-effect-free lvalue. - * y may be anything, but unlike x, must be strictly 16 bits even if - * low16() is #defined. + * t16 and t32. x is modified, and must be a side-effect-free lvalue. + * y may be anything, but unlike x, must be strictly less than 65536 + * even if low16() is #defined. * All of these are equivalent - see which is faster on your machine */ #ifdef SMALL_CACHE @@ -210,8 +210,8 @@ static void ideaInvertKey(word16 const * #else /* !SMALL_CACHE */ #ifdef AVOID_JUMPS #define MUL(x,y) (x = low16(x-1), t16 = low16((y)-1), \ - t32 = (word32)x*t16 + x + t16 + 1, x = low16(t32), \ - t16 = t32>>16, x = (x-t16) + (x>16, x = (x-t16) + (x