diff options
Diffstat (limited to 'src/lib/libcrypto/bn/bn_mod.c')
-rw-r--r-- | src/lib/libcrypto/bn/bn_mod.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/bn/bn_mod.c b/src/lib/libcrypto/bn/bn_mod.c index eb2d5b072e..4c30c098d4 100644 --- a/src/lib/libcrypto/bn/bn_mod.c +++ b/src/lib/libcrypto/bn/bn_mod.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bn_mod.c,v 1.10 2016/11/05 10:47:16 miod Exp $ */ | 1 | /* $OpenBSD: bn_mod.c,v 1.11 2017/01/21 10:38:29 beck Exp $ */ |
2 | /* Includes code written by Lenka Fibikova <fibikova@exp-math.uni-essen.de> | 2 | /* Includes code written by Lenka Fibikova <fibikova@exp-math.uni-essen.de> |
3 | * for the OpenSSL project. */ | 3 | * for the OpenSSL project. */ |
4 | /* ==================================================================== | 4 | /* ==================================================================== |
@@ -121,7 +121,7 @@ BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx) | |||
121 | /* like BN_mod, but returns non-negative remainder | 121 | /* like BN_mod, but returns non-negative remainder |
122 | * (i.e., 0 <= r < |d| always holds) */ | 122 | * (i.e., 0 <= r < |d| always holds) */ |
123 | 123 | ||
124 | if (!(BN_mod(r, m,d, ctx))) | 124 | if (!(BN_mod_ct(r, m,d, ctx))) |
125 | return 0; | 125 | return 0; |
126 | if (!r->neg) | 126 | if (!r->neg) |
127 | return 1; | 127 | return 1; |
@@ -212,7 +212,7 @@ BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx) | |||
212 | if (!BN_sqr(r, a, ctx)) | 212 | if (!BN_sqr(r, a, ctx)) |
213 | return 0; | 213 | return 0; |
214 | /* r->neg == 0, thus we don't need BN_nnmod */ | 214 | /* r->neg == 0, thus we don't need BN_nnmod */ |
215 | return BN_mod(r, r, m, ctx); | 215 | return BN_mod_ct(r, r, m, ctx); |
216 | } | 216 | } |
217 | 217 | ||
218 | int | 218 | int |