summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_exp.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2000-11-29 09:41:19 +0000
committerBodo Möller <bodo@openssl.org>2000-11-29 09:41:19 +0000
commit499e167fda19e01d384fb093f18447b5051d5da9 (patch)
treee1772cf5a5dbc058a264e142460dd6656d5bb023 /crypto/bn/bn_exp.c
parent0135e33511fd428ef3db66cfa26418bebdb1a58c (diff)
Improve BN_mod_inverse performance.
Get the BN_mod_exp_mont bugfix (for handling negative inputs) correct this time.
Diffstat (limited to 'crypto/bn/bn_exp.c')
-rw-r--r--crypto/bn/bn_exp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/bn/bn_exp.c b/crypto/bn/bn_exp.c
index eab394b962..35ab56efc0 100644
--- a/crypto/bn/bn_exp.c
+++ b/crypto/bn/bn_exp.c
@@ -376,7 +376,7 @@ int BN_mod_exp_mont(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
BN_init(&val[0]);
ts=1;
- if (!a->neg && BN_ucmp(a,m) >= 0)
+ if (a->neg || BN_ucmp(a,m) >= 0)
{
if (!BN_nnmod(&(val[0]),a,m,ctx))
goto err;