2 is a prime number ...
PR: 1266
This commit is contained in:
parent
db8d9b7cf1
commit
27fbb5dbf4
1 changed files with 2 additions and 1 deletions
|
@ -258,7 +258,8 @@ int BN_is_prime_fasttest_ex(const BIGNUM *a, int checks, BN_CTX *ctx_passed,
|
|||
|
||||
/* first look for small factors */
|
||||
if (!BN_is_odd(a))
|
||||
return 0;
|
||||
/* a is even => a is prime if and only if a == 2 */
|
||||
return BN_is_word(a, 2);
|
||||
if (do_trial_division)
|
||||
{
|
||||
for (i = 1; i < NUMPRIMES; i++)
|
||||
|
|
Loading…
Reference in a new issue