projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
346f2f9
)
Make sure that BN_from_montgomery keeps the BIGNUMS in proper format
author
Bodo Möller
<bodo@openssl.org>
Tue, 18 Sep 2007 16:31:18 +0000
(16:31 +0000)
committer
Bodo Möller
<bodo@openssl.org>
Tue, 18 Sep 2007 16:31:18 +0000
(16:31 +0000)
crypto/bn/bn_mont.c
patch
|
blob
|
history
diff --git
a/crypto/bn/bn_mont.c
b/crypto/bn/bn_mont.c
index 30bdeabcd5d58486fe0c9276d3b7e219ecc92a55..b5d35d10be829f419f0d19212e6888e70da5f485 100644
(file)
--- 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;