summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_exp.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2000-11-29 10:41:19 +0100
committerBodo Möller <bodo@openssl.org>2000-11-29 10:41:19 +0100
commit499e167fda19e01d384fb093f18447b5051d5da9 (patch)
treee1772cf5a5dbc058a264e142460dd6656d5bb023 /crypto/bn/bn_exp.c
parentCopy and paste error... bn_add_part_words() should of course call (diff)
downloadopenssl-499e167fda19e01d384fb093f18447b5051d5da9.tar.xz
openssl-499e167fda19e01d384fb093f18447b5051d5da9.zip
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;