diff options
author | Bodo Möller <bodo@openssl.org> | 2007-09-18 16:31:18 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2007-09-18 16:31:18 +0000 |
commit | 4f9a9d2b7969ea1d8e763c48561217827e3061a5 (patch) | |
tree | 22e206a28881357a03bd832c44c9a3b62e9ce3b5 /crypto/bn | |
parent | 346f2f93e1a798cab025a2576d98f020c069e3aa (diff) |
Make sure that BN_from_montgomery keeps the BIGNUMS in proper format
Diffstat (limited to 'crypto/bn')
-rw-r--r-- | crypto/bn/bn_mont.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/bn/bn_mont.c b/crypto/bn/bn_mont.c index 30bdeabcd5..b5d35d10be 100644 --- a/crypto/bn/bn_mont.c +++ b/crypto/bn/bn_mont.c @@ -284,6 +284,8 @@ int BN_from_montgomery(BIGNUM *ret, const BIGNUM *a, BN_MONT_CTX *mont, } for (ri+=4; i<ri; i++) rp[i]=nrp[i], ap[i]=0; + bn_correct_top(r); + bn_correct_top(ret); # else if (bn_wexpand(ret,al) == NULL) goto err; ret->top=al; |