diff options
Diffstat (limited to 'moduli.c')
-rw-r--r-- | moduli.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: moduli.c,v 1.21 2008/06/26 09:19:40 djm Exp $ */ | 1 | /* $OpenBSD: moduli.c,v 1.22 2010/11/10 01:33:07 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright 1994 Phil Karn <karn@qualcomm.com> | 3 | * Copyright 1994 Phil Karn <karn@qualcomm.com> |
4 | * Copyright 1996-1998, 2003 William Allen Simpson <wsimpson@greendragon.com> | 4 | * Copyright 1996-1998, 2003 William Allen Simpson <wsimpson@greendragon.com> |
@@ -600,7 +600,7 @@ prime_test(FILE *in, FILE *out, u_int32_t trials, u_int32_t generator_wanted) | |||
600 | * that p is also prime. A single pass will weed out the | 600 | * that p is also prime. A single pass will weed out the |
601 | * vast majority of composite q's. | 601 | * vast majority of composite q's. |
602 | */ | 602 | */ |
603 | if (BN_is_prime(q, 1, NULL, ctx, NULL) <= 0) { | 603 | if (BN_is_prime_ex(q, 1, ctx, NULL) <= 0) { |
604 | debug("%10u: q failed first possible prime test", | 604 | debug("%10u: q failed first possible prime test", |
605 | count_in); | 605 | count_in); |
606 | continue; | 606 | continue; |
@@ -613,14 +613,14 @@ prime_test(FILE *in, FILE *out, u_int32_t trials, u_int32_t generator_wanted) | |||
613 | * will show up on the first Rabin-Miller iteration so it | 613 | * will show up on the first Rabin-Miller iteration so it |
614 | * doesn't hurt to specify a high iteration count. | 614 | * doesn't hurt to specify a high iteration count. |
615 | */ | 615 | */ |
616 | if (!BN_is_prime(p, trials, NULL, ctx, NULL)) { | 616 | if (!BN_is_prime_ex(p, trials, ctx, NULL)) { |
617 | debug("%10u: p is not prime", count_in); | 617 | debug("%10u: p is not prime", count_in); |
618 | continue; | 618 | continue; |
619 | } | 619 | } |
620 | debug("%10u: p is almost certainly prime", count_in); | 620 | debug("%10u: p is almost certainly prime", count_in); |
621 | 621 | ||
622 | /* recheck q more rigorously */ | 622 | /* recheck q more rigorously */ |
623 | if (!BN_is_prime(q, trials - 1, NULL, ctx, NULL)) { | 623 | if (!BN_is_prime_ex(q, trials - 1, ctx, NULL)) { |
624 | debug("%10u: q is not prime", count_in); | 624 | debug("%10u: q is not prime", count_in); |
625 | continue; | 625 | continue; |
626 | } | 626 | } |