mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-30 09:14:59 +02:00
- djm@cvs.openbsd.org 2004/04/22 11:56:57
[moduli.c] Bugzilla #850: Sophie Germain is the correct name of the French mathematician, "Sophie Germaine" isn't; from Luc.Maisonobe@c-s.fr
This commit is contained in:
parent
7749c5163b
commit
47abce45b2
@ -1,3 +1,10 @@
|
|||||||
|
20050502
|
||||||
|
- (dtucker) OpenBSD CVS Sync
|
||||||
|
- djm@cvs.openbsd.org 2004/04/22 11:56:57
|
||||||
|
[moduli.c]
|
||||||
|
Bugzilla #850: Sophie Germain is the correct name of the French
|
||||||
|
mathematician, "Sophie Germaine" isn't; from Luc.Maisonobe@c-s.fr
|
||||||
|
|
||||||
20040423
|
20040423
|
||||||
- (dtucker) [configure.ac openbsd-compat/getrrsetbyname.c] Declare h_errno
|
- (dtucker) [configure.ac openbsd-compat/getrrsetbyname.c] Declare h_errno
|
||||||
as extern int if not already declared. Fixes compile errors on old SCO
|
as extern int if not already declared. Fixes compile errors on old SCO
|
||||||
@ -1038,4 +1045,4 @@
|
|||||||
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
|
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
|
||||||
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
|
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.3332 2004/04/23 08:57:13 dtucker Exp $
|
$Id: ChangeLog,v 1.3333 2004/05/02 12:09:00 dtucker Exp $
|
||||||
|
12
moduli.c
12
moduli.c
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: moduli.c,v 1.5 2003/12/22 09:16:57 djm Exp $ */
|
/* $OpenBSD: moduli.c,v 1.6 2004/04/22 11:56:57 djm Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright 1994 Phil Karn <karn@qualcomm.com>
|
* Copyright 1994 Phil Karn <karn@qualcomm.com>
|
||||||
* Copyright 1996-1998, 2003 William Allen Simpson <wsimpson@greendragon.com>
|
* Copyright 1996-1998, 2003 William Allen Simpson <wsimpson@greendragon.com>
|
||||||
@ -58,7 +58,7 @@
|
|||||||
#define QTYPE_UNSTRUCTURED (1)
|
#define QTYPE_UNSTRUCTURED (1)
|
||||||
#define QTYPE_SAFE (2)
|
#define QTYPE_SAFE (2)
|
||||||
#define QTYPE_SCHNOOR (3)
|
#define QTYPE_SCHNOOR (3)
|
||||||
#define QTYPE_SOPHIE_GERMAINE (4)
|
#define QTYPE_SOPHIE_GERMAIN (4)
|
||||||
#define QTYPE_STRONG (5)
|
#define QTYPE_STRONG (5)
|
||||||
|
|
||||||
/* Tests: decimal (bit field).
|
/* Tests: decimal (bit field).
|
||||||
@ -219,7 +219,7 @@ sieve_large(u_int32_t s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* list candidates for Sophie-Germaine primes (where q = (p-1)/2)
|
* list candidates for Sophie-Germain primes (where q = (p-1)/2)
|
||||||
* to standard output.
|
* to standard output.
|
||||||
* The list is checked against small known primes (less than 2**30).
|
* The list is checked against small known primes (less than 2**30).
|
||||||
*/
|
*/
|
||||||
@ -403,7 +403,7 @@ gen_candidates(FILE *out, int memory, int power, BIGNUM *start)
|
|||||||
debug2("test q = largebase+%u", 2 * j);
|
debug2("test q = largebase+%u", 2 * j);
|
||||||
BN_set_word(q, 2 * j);
|
BN_set_word(q, 2 * j);
|
||||||
BN_add(q, q, largebase);
|
BN_add(q, q, largebase);
|
||||||
if (qfileout(out, QTYPE_SOPHIE_GERMAINE, QTEST_SIEVE,
|
if (qfileout(out, QTYPE_SOPHIE_GERMAIN, QTEST_SIEVE,
|
||||||
largetries, (power - 1) /* MSB */, (0), q) == -1) {
|
largetries, (power - 1) /* MSB */, (0), q) == -1) {
|
||||||
ret = -1;
|
ret = -1;
|
||||||
break;
|
break;
|
||||||
@ -490,8 +490,8 @@ prime_test(FILE *in, FILE *out, u_int32_t trials,
|
|||||||
|
|
||||||
/* modulus (hex) */
|
/* modulus (hex) */
|
||||||
switch (in_type) {
|
switch (in_type) {
|
||||||
case QTYPE_SOPHIE_GERMAINE:
|
case QTYPE_SOPHIE_GERMAIN:
|
||||||
debug2("%10u: (%u) Sophie-Germaine", count_in, in_type);
|
debug2("%10u: (%u) Sophie-Germain", count_in, in_type);
|
||||||
a = q;
|
a = q;
|
||||||
BN_hex2bn(&a, cp);
|
BN_hex2bn(&a, cp);
|
||||||
/* p = 2*q + 1 */
|
/* p = 2*q + 1 */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user