summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--moduli.c12
2 files changed, 14 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 14112df26..3457022c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
120050502
2 - (dtucker) OpenBSD CVS Sync
3 - djm@cvs.openbsd.org 2004/04/22 11:56:57
4 [moduli.c]
5 Bugzilla #850: Sophie Germain is the correct name of the French
6 mathematician, "Sophie Germaine" isn't; from Luc.Maisonobe@c-s.fr
7
120040423 820040423
2 - (dtucker) [configure.ac openbsd-compat/getrrsetbyname.c] Declare h_errno 9 - (dtucker) [configure.ac openbsd-compat/getrrsetbyname.c] Declare h_errno
3 as extern int if not already declared. Fixes compile errors on old SCO 10 as extern int if not already declared. Fixes compile errors on old SCO
@@ -1038,4 +1045,4 @@
1038 - (djm) Trim deprecated options from INSTALL. Mention UsePAM 1045 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
1039 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu 1046 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
1040 1047
1041$Id: ChangeLog,v 1.3332 2004/04/23 08:57:13 dtucker Exp $ 1048$Id: ChangeLog,v 1.3333 2004/05/02 12:09:00 dtucker Exp $
diff --git a/moduli.c b/moduli.c
index a09073aed..d454c30dc 100644
--- a/moduli.c
+++ b/moduli.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: moduli.c,v 1.5 2003/12/22 09:16:57 djm Exp $ */ 1/* $OpenBSD: moduli.c,v 1.6 2004/04/22 11:56:57 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>
@@ -58,7 +58,7 @@
58#define QTYPE_UNSTRUCTURED (1) 58#define QTYPE_UNSTRUCTURED (1)
59#define QTYPE_SAFE (2) 59#define QTYPE_SAFE (2)
60#define QTYPE_SCHNOOR (3) 60#define QTYPE_SCHNOOR (3)
61#define QTYPE_SOPHIE_GERMAINE (4) 61#define QTYPE_SOPHIE_GERMAIN (4)
62#define QTYPE_STRONG (5) 62#define QTYPE_STRONG (5)
63 63
64/* Tests: decimal (bit field). 64/* Tests: decimal (bit field).
@@ -219,7 +219,7 @@ sieve_large(u_int32_t s)
219} 219}
220 220
221/* 221/*
222 * list candidates for Sophie-Germaine primes (where q = (p-1)/2) 222 * list candidates for Sophie-Germain primes (where q = (p-1)/2)
223 * to standard output. 223 * to standard output.
224 * The list is checked against small known primes (less than 2**30). 224 * The list is checked against small known primes (less than 2**30).
225 */ 225 */
@@ -403,7 +403,7 @@ gen_candidates(FILE *out, int memory, int power, BIGNUM *start)
403 debug2("test q = largebase+%u", 2 * j); 403 debug2("test q = largebase+%u", 2 * j);
404 BN_set_word(q, 2 * j); 404 BN_set_word(q, 2 * j);
405 BN_add(q, q, largebase); 405 BN_add(q, q, largebase);
406 if (qfileout(out, QTYPE_SOPHIE_GERMAINE, QTEST_SIEVE, 406 if (qfileout(out, QTYPE_SOPHIE_GERMAIN, QTEST_SIEVE,
407 largetries, (power - 1) /* MSB */, (0), q) == -1) { 407 largetries, (power - 1) /* MSB */, (0), q) == -1) {
408 ret = -1; 408 ret = -1;
409 break; 409 break;
@@ -490,8 +490,8 @@ prime_test(FILE *in, FILE *out, u_int32_t trials,
490 490
491 /* modulus (hex) */ 491 /* modulus (hex) */
492 switch (in_type) { 492 switch (in_type) {
493 case QTYPE_SOPHIE_GERMAINE: 493 case QTYPE_SOPHIE_GERMAIN:
494 debug2("%10u: (%u) Sophie-Germaine", count_in, in_type); 494 debug2("%10u: (%u) Sophie-Germain", count_in, in_type);
495 a = q; 495 a = q;
496 BN_hex2bn(&a, cp); 496 BN_hex2bn(&a, cp);
497 /* p = 2*q + 1 */ 497 /* p = 2*q + 1 */