summaryrefslogtreecommitdiff
path: root/lib/libcrypto/bn/bn_mod.c
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2017-01-21 10:38:30 +0000
committerBob Beck <beck@cvs.openbsd.org>2017-01-21 10:38:30 +0000
commitff6c5b2d728313569b09c4ec269eb7f0fb2023e3 (patch)
treec4e87e40c7c000af9141ad1143b2dca18ec24c63 /lib/libcrypto/bn/bn_mod.c
parent485104e2d443c36382923c3c23cc2f275e7ed81c (diff)
Split out BN_div and BN_mod into ct and nonct versions for Internal use.
ok jsing@
Diffstat (limited to 'lib/libcrypto/bn/bn_mod.c')
-rw-r--r--lib/libcrypto/bn/bn_mod.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libcrypto/bn/bn_mod.c b/lib/libcrypto/bn/bn_mod.c
index eb2d5b072e7..4c30c098d48 100644
--- a/lib/libcrypto/bn/bn_mod.c
+++ b/lib/libcrypto/bn/bn_mod.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bn_mod.c,v 1.10 2016/11/05 10:47:16 miod Exp $ */
+/* $OpenBSD: bn_mod.c,v 1.11 2017/01/21 10:38:29 beck Exp $ */
/* Includes code written by Lenka Fibikova <fibikova@exp-math.uni-essen.de>
* for the OpenSSL project. */
/* ====================================================================
@@ -121,7 +121,7 @@ BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx)
/* like BN_mod, but returns non-negative remainder
* (i.e., 0 <= r < |d| always holds) */
- if (!(BN_mod(r, m,d, ctx)))
+ if (!(BN_mod_ct(r, m,d, ctx)))
return 0;
if (!r->neg)
return 1;
@@ -212,7 +212,7 @@ BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx)
if (!BN_sqr(r, a, ctx))
return 0;
/* r->neg == 0, thus we don't need BN_nnmod */
- return BN_mod(r, r, m, ctx);
+ return BN_mod_ct(r, r, m, ctx);
}
int