diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/bn/bn_exp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/bn/bn_exp.c b/src/lib/libcrypto/bn/bn_exp.c index 9abf574b57..ba9b2700f1 100644 --- a/src/lib/libcrypto/bn/bn_exp.c +++ b/src/lib/libcrypto/bn/bn_exp.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: bn_exp.c,v 1.38 2023/03/15 04:30:20 jsing Exp $ */ | 1 | /* $OpenBSD: bn_exp.c,v 1.39 2023/03/26 18:49:48 tb 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 | * |
| @@ -1206,7 +1206,7 @@ BN_mod_exp2_mont(BIGNUM *rr, const BIGNUM *a1, const BIGNUM *p1, | |||
| 1206 | * Build table for a1: val1[i] := a1^(2*i + 1) mod m for i = 0 .. 2^(window1-1) | 1206 | * Build table for a1: val1[i] := a1^(2*i + 1) mod m for i = 0 .. 2^(window1-1) |
| 1207 | */ | 1207 | */ |
| 1208 | if (a1->neg || BN_ucmp(a1, m) >= 0) { | 1208 | if (a1->neg || BN_ucmp(a1, m) >= 0) { |
| 1209 | if (!BN_mod_ct(val1[0], a1, m, ctx)) | 1209 | if (!BN_nnmod(val1[0], a1, m, ctx)) |
| 1210 | goto err; | 1210 | goto err; |
| 1211 | a_mod_m = val1[0]; | 1211 | a_mod_m = val1[0]; |
| 1212 | } else | 1212 | } else |
| @@ -1237,7 +1237,7 @@ BN_mod_exp2_mont(BIGNUM *rr, const BIGNUM *a1, const BIGNUM *p1, | |||
| 1237 | * Build table for a2: val2[i] := a2^(2*i + 1) mod m for i = 0 .. 2^(window2-1) | 1237 | * Build table for a2: val2[i] := a2^(2*i + 1) mod m for i = 0 .. 2^(window2-1) |
| 1238 | */ | 1238 | */ |
| 1239 | if (a2->neg || BN_ucmp(a2, m) >= 0) { | 1239 | if (a2->neg || BN_ucmp(a2, m) >= 0) { |
| 1240 | if (!BN_mod_ct(val2[0], a2, m, ctx)) | 1240 | if (!BN_nnmod(val2[0], a2, m, ctx)) |
| 1241 | goto err; | 1241 | goto err; |
| 1242 | a_mod_m = val2[0]; | 1242 | a_mod_m = val2[0]; |
| 1243 | } else | 1243 | } else |
