summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
86ae1d4)
Previously, this code would fail if gcd(e, phi(n)) != 1 happens 3 times in a
row.
Upped to 16.
As before, if this happens, another prime is tried.
CHECK(d0_bignum_gcd(temp4, NULL, NULL, temp2, ctx->rsa_e));
if(!d0_bignum_cmp(temp4, one))
break;
CHECK(d0_bignum_gcd(temp4, NULL, NULL, temp2, ctx->rsa_e));
if(!d0_bignum_cmp(temp4, one))
break;
if(!d0_bignum_cmp(temp1, ctx->rsa_d))
{
UNLOCKTEMPS();
if(!d0_bignum_cmp(temp1, ctx->rsa_d))
{
UNLOCKTEMPS();
CHECK(d0_bignum_gcd(temp4, NULL, NULL, temp2, ctx->rsa_e));
if(!d0_bignum_cmp(temp4, one))
break;
CHECK(d0_bignum_gcd(temp4, NULL, NULL, temp2, ctx->rsa_e));
if(!d0_bignum_cmp(temp4, one))
break;
if(!d0_bignum_cmp(temp1, ctx->rsa_d))
{
UNLOCKTEMPS();
if(!d0_bignum_cmp(temp1, ctx->rsa_d))
{
UNLOCKTEMPS();