Bug fix: Montgomery multiplication could produce results with the wrong
sign.
This commit is contained in:
@@ -190,6 +190,7 @@ int BN_from_montgomery(BIGNUM *ret, BIGNUM *a, BN_MONT_CTX *mont,
|
||||
#if 0
|
||||
BN_rshift(ret,r,mont->ri);
|
||||
#else
|
||||
ret->neg = r->neg;
|
||||
x=ri;
|
||||
rp=ret->d;
|
||||
ap= &(r->d[x]);
|
||||
|
||||
Reference in New Issue
Block a user