1 .\" $OpenBSD: moduli.5,v 1.17 2012/09/26 17:34:38 jmc Exp $
3 .\" Copyright (c) 2008 Damien Miller <djm@mindrot.org>
5 .\" Permission to use, copy, modify, and distribute this software for any
6 .\" purpose with or without fee is hereby granted, provided that the above
7 .\" copyright notice and this permission notice appear in all copies.
9 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 .Dd $Mdocdate: September 26 2012 $
21 .Nd Diffie-Hellman moduli
25 file contains prime numbers and generators for use by
27 in the Diffie-Hellman Group Exchange key exchange method.
29 New moduli may be generated with
31 using a two-step process.
33 .Em candidate generation
36 calculates numbers that are likely to be useful.
41 provides a high degree of assurance that the numbers are prime and are
42 safe for use in Diffie-Hellman operations by
46 format is used as the output from each pass.
48 The file consists of newline-separated records, one per modulus,
49 containing seven space-separated fields.
50 These fields are as follows:
51 .Bl -tag -width Description -offset indent
53 The time that the modulus was last processed as YYYYMMDDHHMMSS.
55 Decimal number specifying the internal structure of the prime modulus.
58 .Bl -tag -width 0x00 -compact
62 "Safe" prime; (p-1)/2 is also prime.
64 Sophie Germain; 2p+1 is also prime.
67 Moduli candidates initially produced by
69 are Sophie Germain primes (type 4).
70 Further primality testing with
72 produces safe prime moduli (type 2) that are ready for use in
74 Other types are not used by OpenSSH.
76 Decimal number indicating the type of primality tests that the number
77 has been subjected to represented as a bitmask of the following values:
79 .Bl -tag -width 0x00 -compact
83 Composite number \(en not prime.
85 Sieve of Eratosthenes.
87 Probabilistic Miller-Rabin primality tests.
92 moduli candidate generation uses the Sieve of Eratosthenes (flag 0x02).
95 primality tests are Miller-Rabin tests (flag 0x04).
97 Decimal number indicating the number of primality trials
98 that have been performed on the modulus.
100 Decimal number indicating the size of the prime in bits.
102 The recommended generator for use with this modulus (hexadecimal).
104 The modulus itself in hexadecimal.
107 When performing Diffie-Hellman Group Exchange,
109 first estimates the size of the modulus required to produce enough
110 Diffie-Hellman output to sufficiently key the selected symmetric cipher.
112 then randomly selects a modulus from
114 that best meets the size requirement.
125 .%T Diffie-Hellman Group Exchange for the Secure Shell (SSH) Transport Layer Protocol