Fixed efficiency pre-test on RSA prime generation (no security issue, but RSA key generation with pubexp 5, 7 or 11 may be slightly more efficient).
This commit is contained in:
parent
ecdf89770e
commit
9721b3e756
2 changed files with 6 additions and 6 deletions
|
|
@ -318,9 +318,9 @@ mkprime(const br_prng_class **rng, uint16_t *x, uint32_t esize,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ((pubexp == 3 && m3 == 1)
|
if ((pubexp == 3 && m3 == 1)
|
||||||
|| (pubexp == 5 && m5 == 5)
|
|| (pubexp == 5 && m5 == 1)
|
||||||
|| (pubexp == 7 && m5 == 7)
|
|| (pubexp == 7 && m7 == 1)
|
||||||
|| (pubexp == 11 && m5 == 11))
|
|| (pubexp == 11 && m11 == 1))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -340,9 +340,9 @@ mkprime(const br_prng_class **rng, uint32_t *x, uint32_t esize,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ((pubexp == 3 && m3 == 1)
|
if ((pubexp == 3 && m3 == 1)
|
||||||
|| (pubexp == 5 && m5 == 5)
|
|| (pubexp == 5 && m5 == 1)
|
||||||
|| (pubexp == 7 && m5 == 7)
|
|| (pubexp == 7 && m7 == 1)
|
||||||
|| (pubexp == 11 && m5 == 11))
|
|| (pubexp == 11 && m11 == 1))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue