diff options
Diffstat (limited to 'src/lib/libcrypto/bn/bn_exp2.c')
-rw-r--r-- | src/lib/libcrypto/bn/bn_exp2.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/bn/bn_exp2.c b/src/lib/libcrypto/bn/bn_exp2.c index 38bf467a38..1d938d3818 100644 --- a/src/lib/libcrypto/bn/bn_exp2.c +++ b/src/lib/libcrypto/bn/bn_exp2.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bn_exp2.c,v 1.10 2015/02/09 15:49:22 jsing Exp $ */ | 1 | /* $OpenBSD: bn_exp2.c,v 1.11 2017/01/21 10:38:29 beck Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -175,7 +175,7 @@ BN_mod_exp2_mont(BIGNUM *rr, const BIGNUM *a1, const BIGNUM *p1, | |||
175 | * Build table for a1: val1[i] := a1^(2*i + 1) mod m for i = 0 .. 2^(window1-1) | 175 | * Build table for a1: val1[i] := a1^(2*i + 1) mod m for i = 0 .. 2^(window1-1) |
176 | */ | 176 | */ |
177 | if (a1->neg || BN_ucmp(a1, m) >= 0) { | 177 | if (a1->neg || BN_ucmp(a1, m) >= 0) { |
178 | if (!BN_mod(val1[0], a1, m, ctx)) | 178 | if (!BN_mod_ct(val1[0], a1, m, ctx)) |
179 | goto err; | 179 | goto err; |
180 | a_mod_m = val1[0]; | 180 | a_mod_m = val1[0]; |
181 | } else | 181 | } else |
@@ -206,7 +206,7 @@ BN_mod_exp2_mont(BIGNUM *rr, const BIGNUM *a1, const BIGNUM *p1, | |||
206 | * Build table for a2: val2[i] := a2^(2*i + 1) mod m for i = 0 .. 2^(window2-1) | 206 | * Build table for a2: val2[i] := a2^(2*i + 1) mod m for i = 0 .. 2^(window2-1) |
207 | */ | 207 | */ |
208 | if (a2->neg || BN_ucmp(a2, m) >= 0) { | 208 | if (a2->neg || BN_ucmp(a2, m) >= 0) { |
209 | if (!BN_mod(val2[0], a2, m, ctx)) | 209 | if (!BN_mod_ct(val2[0], a2, m, ctx)) |
210 | goto err; | 210 | goto err; |
211 | a_mod_m = val2[0]; | 211 | a_mod_m = val2[0]; |
212 | } else | 212 | } else |