Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/moduli/qsafe use BN_is_prime_ex
details: https://anonhg.NetBSD.org/src/rev/5de94e0d558a
branches: trunk
changeset: 829601:5de94e0d558a
user: christos <christos%NetBSD.org@localhost>
date: Tue Feb 06 19:32:49 2018 +0000
description:
use BN_is_prime_ex
diffstat:
usr.bin/moduli/qsafe/qsafe.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 89c5bc258c46 -r 5de94e0d558a usr.bin/moduli/qsafe/qsafe.c
--- a/usr.bin/moduli/qsafe/qsafe.c Tue Feb 06 19:26:02 2018 +0000
+++ b/usr.bin/moduli/qsafe/qsafe.c Tue Feb 06 19:32:49 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: qsafe.c,v 1.3 2011/09/04 20:55:43 joerg Exp $ */
+/* $NetBSD: qsafe.c,v 1.4 2018/02/06 19:32:49 christos Exp $ */
/*-
* Copyright 1994 Phil Karn <karn%qualcomm.com@localhost>
@@ -254,7 +254,7 @@
* single pass will weed out the vast majority of composite
* q's.
*/
- if (BN_is_prime(q, 1, NULL, ctx, NULL) <= 0) {
+ if (BN_is_prime_ex(q, 1, ctx, NULL) <= 0) {
#ifdef DEBUGPRINT
(void)fprintf(stderr, "%10lu: q failed first "
"possible prime test\n", count_in);
@@ -269,7 +269,7 @@
* the first Rabin-Miller iteration so it doesn't hurt to
* specify a high iteration count.
*/
- if (!BN_is_prime(p, trials, NULL, ctx, NULL)) {
+ if (!BN_is_prime_ex(p, trials, ctx, NULL)) {
#ifdef DEBUGPRINT
(void)fprintf(stderr, "%10lu: p is not prime\n",
count_in);
@@ -283,7 +283,7 @@
#endif
/* recheck q more rigorously */
- if (!BN_is_prime(q, trials - 1, NULL, ctx, NULL)) {
+ if (!BN_is_prime_ex(q, trials - 1, ctx, NULL)) {
#ifdef DEBUGPRINT
(void)fprintf(stderr, "%10lu: q is not prime\n",
count_in);
Home |
Main Index |
Thread Index |
Old Index