xref: /freebsd/share/man/man5/moduli.5 (revision e4731543e7d8753cc334c25c0d7503bc4e3b1b15)
1323b03c5SDag-Erling Smørgrav.\" $OpenBSD: moduli.5,v 1.3 2001/06/24 18:50:52 provos Exp $
2323b03c5SDag-Erling Smørgrav.\"
3323b03c5SDag-Erling Smørgrav.\" Copyright 1997, 2000 William Allen Simpson <wsimpson@greendragon.com>
4323b03c5SDag-Erling Smørgrav.\" All rights reserved.
5323b03c5SDag-Erling Smørgrav.\"
6323b03c5SDag-Erling Smørgrav.\" Redistribution and use in source and binary forms, with or without
7323b03c5SDag-Erling Smørgrav.\" modification, are permitted provided that the following conditions
8323b03c5SDag-Erling Smørgrav.\" are met:
9323b03c5SDag-Erling Smørgrav.\" 1. Redistributions of source code must retain the above copyright
10323b03c5SDag-Erling Smørgrav.\"    notice, this list of conditions and the following disclaimer.
11323b03c5SDag-Erling Smørgrav.\" 2. Redistributions in binary form must reproduce the above copyright
12323b03c5SDag-Erling Smørgrav.\"    notice, this list of conditions and the following disclaimer in the
13323b03c5SDag-Erling Smørgrav.\"    documentation and/or other materials provided with the distribution.
14323b03c5SDag-Erling Smørgrav.\" 3. All advertising materials mentioning features or use of this software
15323b03c5SDag-Erling Smørgrav.\"    must display the following acknowledgement:
16323b03c5SDag-Erling Smørgrav.\"      This product includes software designed by William Allen Simpson.
17323b03c5SDag-Erling Smørgrav.\" 4. The name of the author may not be used to endorse or promote products
18323b03c5SDag-Erling Smørgrav.\"    derived from this software without specific prior written permission.
19323b03c5SDag-Erling Smørgrav.\"
20323b03c5SDag-Erling Smørgrav.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21323b03c5SDag-Erling Smørgrav.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22323b03c5SDag-Erling Smørgrav.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23323b03c5SDag-Erling Smørgrav.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24323b03c5SDag-Erling Smørgrav.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25323b03c5SDag-Erling Smørgrav.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26323b03c5SDag-Erling Smørgrav.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27323b03c5SDag-Erling Smørgrav.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28323b03c5SDag-Erling Smørgrav.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29323b03c5SDag-Erling Smørgrav.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30323b03c5SDag-Erling Smørgrav.\"
31e4731543SRuslan Ermilov.\" $FreeBSD$
32323b03c5SDag-Erling Smørgrav.\"
33323b03c5SDag-Erling Smørgrav.Dd July 28, 1997
34323b03c5SDag-Erling Smørgrav.Dt MODULI 5
35323b03c5SDag-Erling Smørgrav.Os
36323b03c5SDag-Erling Smørgrav.Sh NAME
37323b03c5SDag-Erling Smørgrav.Nm moduli
38323b03c5SDag-Erling Smørgrav.Nd system moduli file
39323b03c5SDag-Erling Smørgrav.Sh DESCRIPTION
40323b03c5SDag-Erling SmørgravThe
41e4731543SRuslan Ermilov.Nm
42323b03c5SDag-Erling Smørgravfile contains the system-wide Diffie-Hellman prime moduli for the
43323b03c5SDag-Erling Smørgrav.Xr photurisd 8
44323b03c5SDag-Erling Smørgravand
45323b03c5SDag-Erling Smørgrav.Xr sshd 8
46323b03c5SDag-Erling Smørgravprograms.
47323b03c5SDag-Erling Smørgrav.Pp
48323b03c5SDag-Erling SmørgravEach line in this file contains the following fields:
49e4731543SRuslan Ermilov.Va Time , Type , Tests , Tries , Size , Generator ,
50e4731543SRuslan Ermilovand
51e4731543SRuslan Ermilov.Va Modulus .
52323b03c5SDag-Erling SmørgravThe fields are separated by white space (tab or blank).
53e4731543SRuslan Ermilov.Bl -tag -width indent
54e4731543SRuslan Ermilov.It Va Time Pq Vt yyyymmddhhmmss
55323b03c5SDag-Erling SmørgravSpecifies the system time that the line was appended to the file.
56323b03c5SDag-Erling SmørgravThe value 00000000000000 means unknown (historic).
57323b03c5SDag-Erling Smørgrav.\"The file is sorted in ascending order.
58e4731543SRuslan Ermilov.It Va Type Pq Vt decimal
59323b03c5SDag-Erling SmørgravSpecifies the internal structure of the prime modulus.
60323b03c5SDag-Erling Smørgrav.Pp
61e4731543SRuslan Ermilov.Bl -tag -width indent -compact
62e4731543SRuslan Ermilov.It 0
63323b03c5SDag-Erling Smørgravunknown;
64323b03c5SDag-Erling Smørgravoften learned from peer during protocol operation,
65323b03c5SDag-Erling Smørgravand saved for later analysis.
66e4731543SRuslan Ermilov.It 1
67323b03c5SDag-Erling Smørgravunstructured;
68323b03c5SDag-Erling Smørgrava common large number.
69e4731543SRuslan Ermilov.It 2
70323b03c5SDag-Erling Smørgravsafe (p = 2q + 1);
71323b03c5SDag-Erling Smørgravmeets basic structural requirements.
72e4731543SRuslan Ermilov.It 3
73323b03c5SDag-Erling SmørgravSchnorr.
74e4731543SRuslan Ermilov.It 4
75323b03c5SDag-Erling SmørgravSophie-Germaine (q = (p-1)/2);
76323b03c5SDag-Erling Smørgravusually generated in the process of testing safe or strong primes.
77e4731543SRuslan Ermilov.It 5
78323b03c5SDag-Erling Smørgravstrong;
79323b03c5SDag-Erling Smørgravuseful for RSA public key generation.
80323b03c5SDag-Erling Smørgrav.El
81e4731543SRuslan Ermilov.It Xo
82e4731543SRuslan Ermilov.Va Tests Pq Vt decimal
83e4731543SRuslan Ermilov(bit field)
84e4731543SRuslan Ermilov.Xc
85323b03c5SDag-Erling SmørgravSpecifies the methods used in checking for primality.
86323b03c5SDag-Erling SmørgravUsually, more than one test is used.
87323b03c5SDag-Erling Smørgrav.Pp
88e4731543SRuslan Ermilov.Bl -tag -width indent -compact
89e4731543SRuslan Ermilov.It 0
90323b03c5SDag-Erling Smørgravnot tested;
91323b03c5SDag-Erling Smørgravoften learned from peer during protocol operation,
92323b03c5SDag-Erling Smørgravand saved for later analysis.
93e4731543SRuslan Ermilov.It 1
94323b03c5SDag-Erling Smørgravcomposite;
95323b03c5SDag-Erling Smørgravfailed one or more tests.
96323b03c5SDag-Erling SmørgravIn this case, the highest bit specifies the test that failed.
97e4731543SRuslan Ermilov.It 2
98323b03c5SDag-Erling Smørgravsieve;
99323b03c5SDag-Erling Smørgravchecked for division by a range of smaller primes.
100e4731543SRuslan Ermilov.It 4
101323b03c5SDag-Erling SmørgravMiller-Rabin.
102e4731543SRuslan Ermilov.It 8
103323b03c5SDag-Erling SmørgravJacobi.
104e4731543SRuslan Ermilov.It 16
105323b03c5SDag-Erling SmørgravElliptic Curve.
106323b03c5SDag-Erling Smørgrav.El
107e4731543SRuslan Ermilov.It Va Tries Pq Vt decimal
108323b03c5SDag-Erling SmørgravDepends on the value of the highest valid Test bit,
109323b03c5SDag-Erling Smørgravwhere the method specified is:
110323b03c5SDag-Erling Smørgrav.Pp
111e4731543SRuslan Ermilov.Bl -tag -width indent -compact
112e4731543SRuslan Ermilov.It 0
113323b03c5SDag-Erling Smørgravnot tested
114323b03c5SDag-Erling Smørgrav(always zero).
115e4731543SRuslan Ermilov.It 1
116323b03c5SDag-Erling Smørgravcomposite
117323b03c5SDag-Erling Smørgrav(irrelevant).
118e4731543SRuslan Ermilov.It 2
119323b03c5SDag-Erling Smørgravsieve;
120323b03c5SDag-Erling Smørgravnumber of primes sieved.
121323b03c5SDag-Erling SmørgravCommonly on the order of 32,000,000.
122e4731543SRuslan Ermilov.It 4
123323b03c5SDag-Erling SmørgravMiller-Rabin;
124323b03c5SDag-Erling Smørgravnumber of M-R iterations.
125323b03c5SDag-Erling SmørgravCommonly on the order of 32 to 64.
126e4731543SRuslan Ermilov.It 8
127323b03c5SDag-Erling SmørgravJacobi;
128323b03c5SDag-Erling Smørgravunknown
129323b03c5SDag-Erling Smørgrav(always zero).
130e4731543SRuslan Ermilov.It 16
131323b03c5SDag-Erling SmørgravElliptic Curve;
132323b03c5SDag-Erling Smørgravunused
133323b03c5SDag-Erling Smørgrav(always zero).
134323b03c5SDag-Erling Smørgrav.El
135e4731543SRuslan Ermilov.It Va Size Pq Vt decimal
136323b03c5SDag-Erling SmørgravSpecifies the number of significant bits.
137e4731543SRuslan Ermilov.It Va Generator Pq Vt "hex string"
138323b03c5SDag-Erling SmørgravSpecifies the best generator for a Diffie-Hellman exchange.
139323b03c5SDag-Erling Smørgrav0 = unknown or variable,
140323b03c5SDag-Erling Smørgrav2, 3, 5, etc.
141e4731543SRuslan Ermilov.It Va Modulus Pq Vt "hex string"
142323b03c5SDag-Erling SmørgravThe prime modulus.
143e4731543SRuslan Ermilov.El
144323b03c5SDag-Erling Smørgrav.Pp
145323b03c5SDag-Erling SmørgravThe file is searched for moduli that meet the appropriate
146e4731543SRuslan Ermilov.Va Time , Size
147e4731543SRuslan Ermilovand
148e4731543SRuslan Ermilov.Va Generator
149e4731543SRuslan Ermilovcriteria.
150323b03c5SDag-Erling SmørgravWhen more than one meet the criteria,
151323b03c5SDag-Erling Smørgravthe selection should be weighted toward newer moduli,
152323b03c5SDag-Erling Smørgravwithout completely disqualifying older moduli.
153323b03c5SDag-Erling Smørgrav.Sh FILES
154e4731543SRuslan Ermilov.Bl -tag -width ".Pa /etc/ssh/moduli" -compact
155575abac1SDag-Erling Smørgrav.It Pa /etc/ssh/moduli
156323b03c5SDag-Erling Smørgrav.El
157323b03c5SDag-Erling Smørgrav.Sh SEE ALSO
158323b03c5SDag-Erling Smørgrav.Xr photurisd 8 ,
159323b03c5SDag-Erling Smørgrav.Xr sshd 8
160