remove branch in assert
parent
23accd43c5
commit
4e8bde6f04
|
|
@ -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];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue