bn_fast_mp_invmod fix related to #118
This commit is contained in:
parent
a829b87b00
commit
f1b9bbf593
@ -138,6 +138,14 @@ top:
|
|||||||
goto LBL_ERR;
|
goto LBL_ERR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* too big */
|
||||||
|
while (mp_cmp_mag(&D, b) != MP_LT) {
|
||||||
|
if ((res = mp_sub(&D, b, &D)) != MP_OKAY) {
|
||||||
|
goto LBL_ERR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mp_exch(&D, c);
|
mp_exch(&D, c);
|
||||||
c->sign = neg;
|
c->sign = neg;
|
||||||
res = MP_OKAY;
|
res = MP_OKAY;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user