# primes(6) [netbsd man page]

PRIMES(6) BSD Games Manual PRIMES(6)NAME

primesgenerate primes--SYNOPSIS

primes [] [start [stop]]-dDESCRIPTION

The primes utility prints primes in ascending order, one per line, starting at or above start and continuing until, but not including stop. The start value must be at least 0 and not greater than stop. The stop value must not be greater than 4294967295. The default value of stop is 4294967295. When the primes utility is invoked with no arguments, start is read from standard input. stop is taken to be 4294967295. The start value may be preceded by a single '+'. The start value is terminated by a non-digit character (such as a newline). The input line must not be longer than 255 characters. When given theargument, primes prints the difference between the current and the previous prime.-dDIAGNOSTICS

Out of range or invalid input results in an appropriate error message being written to standard error.BUGS

primes won't get you a world record.BSD

February 3, 2008 BSD

## Check Out this Related Man Page

QSIEVE(1) BSD General Commands Manual QSIEVE(1)NAME

qsieve, qsafegenerate system moduli file--SYNOPSIS

qsieve [megabytes bits [initial]] qsafe [trials [generator]]DESCRIPTION

The qsieve utility will list candidates for Sophie-Germaine primes (where q = (p-1)/2) to standard output. The list is checked against small known primes (less than 2**30). This step is both processor and memory intensive. The megabytes value sets a limit for the internal sieve buffer. This should be small enough to remain entirely in memory. Swap thrashing can increase the run time from hours to days or weeks! When the megabytes value is zero (0), qsieve will select a default suitable for the bits. The bits value sets the length of the generated possible primes (typically 768, 1024, 1536, 2048, 3072, or 4096, although others can be used for variety). The optional initial value (hex) specifies the beginning of the search. Otherwise, qsieve generates a randomly selected number. The qsafe utility will perform a Miller-Rabin primality test on the list of candidates (checking both q and p) from standard input. The result is a list of so-call "safe" primes to standard output, suitable for use as Diffie-Hellman moduli. This step is merely processor intensive. The trials value sets the number of Miller-Rabin interations (typically 16 to 128). The optional generator value (hex) limits testing to candidates with a specific generator (usually 2). Otherwise, qsafe will test each can- didate and suggest a generator.SEE ALSO

moduli(5)HISTORY

These programs were originally developed for the Photuris project, and later the OpenSSH project.BSD

July 28, 1997 BSD