remove branch in assert

pull/2/head
weidai 2007-09-24 00:45:16 +00:00
parent 23accd43c5
commit 4e8bde6f04
1 changed files with 1 additions and 1 deletions

View File

@ -2310,7 +2310,7 @@ void MontgomeryReduce(word *R, word *T, word *X, const word *M, const word *U, s
word borrow = Subtract(T, X+N, T, N); word borrow = Subtract(T, X+N, T, N);
// defend against timing attack by doing this Add even when not needed // defend against timing attack by doing this Add even when not needed
word carry = Add(T+N, T, M, N); word carry = Add(T+N, T, M, N);
assert(carry || !borrow); assert(carry | !borrow);
CopyWords(R, T + ((0-borrow) & N), N); CopyWords(R, T + ((0-borrow) & N), N);
#elif 0 #elif 0
const word u = 0-U[0]; const word u = 0-U[0];