]> CyberLeo.Net >> Repos - FreeBSD/releng/10.3.git/blob - contrib/ntp/ntpd/invoke-ntp.keys.texi
Fix multiple vulnerabilities in ntp. [SA-18:02.ntp]
[FreeBSD/releng/10.3.git] / contrib / ntp / ntpd / invoke-ntp.keys.texi
1 @node ntp.keys Notes
2 @section Notes about ntp.keys
3 @pindex ntp.keys
4 @cindex NTP symmetric key file format
5 @ignore
6 #
7 # EDIT THIS FILE WITH CAUTION  (invoke-ntp.keys.texi)
8 #
9 # It has been AutoGen-ed  February 27, 2018 at 05:14:37 PM by AutoGen 5.18.5
10 # From the definitions    ntp.keys.def
11 # and the template file   agtexi-file.tpl
12 @end ignore
13
14
15
16 This document describes the format of an NTP symmetric key file.
17 For a description of the use of this type of file, see the
18 "Authentication Support"
19 section of the
20 @code{ntp.conf(5)}
21 page.
22
23 @code{ntpd(8)}
24 reads its keys from a file specified using the
25 @code{-k}
26 command line option or the
27 @code{keys}
28 statement in the configuration file.
29 While key number 0 is fixed by the NTP standard
30 (as 56 zero bits)
31 and may not be changed,
32 one or more keys numbered between 1 and 65534
33 may be arbitrarily set in the keys file.
34
35 The key file uses the same comment conventions
36 as the configuration file.
37 Key entries use a fixed format of the form
38
39 @example
40 @kbd{keyno} @kbd{type} @kbd{key} @kbd{opt_IP_list}
41 @end example
42
43 where
44 @kbd{keyno}
45 is a positive integer (between 1 and 65534),
46 @kbd{type}
47 is the message digest algorithm,
48 @kbd{key}
49 is the key itself, and
50 @kbd{opt_IP_list}
51 is an optional comma-separated list of IPs
52 where the
53 @kbd{keyno}
54 should be trusted.
55 that are allowed to serve time.
56 Each IP in
57 @kbd{opt_IP_list}
58 may contain an optional
59 @code{/subnetbits}
60 specification which identifies the number of bits for
61 the desired subnet of trust.
62 If
63 @kbd{opt_IP_list}
64 is empty,
65 any properly-authenticated message will be
66 accepted.
67
68 The
69 @kbd{key}
70 may be given in a format
71 controlled by the
72 @kbd{type}
73 field.
74 The
75 @kbd{type}
76 @code{MD5}
77 is always supported.
78 If
79 @code{ntpd}
80 was built with the OpenSSL library
81 then any digest library supported by that library may be specified.
82 However, if compliance with FIPS 140-2 is required the
83 @kbd{type}
84 must be either
85 @code{SHA}
86 or
87 @code{SHA1}.
88
89 What follows are some key types, and corresponding formats:
90
91 @table @asis
92 @item @code{MD5}
93 The key is 1 to 16 printable characters terminated by
94 an EOL,
95 whitespace,
96 or
97 a
98 @code{#}
99 (which is the "start of comment" character).
100
101 @item @code{SHA}
102 @item @code{SHA1}
103 @item @code{RMD160}
104 The key is a hex-encoded ASCII string of 40 characters,
105 which is truncated as necessary.
106 @end table
107
108 Note that the keys used by the
109 @code{ntpq(8)}
110 and
111 @code{ntpdc(8)}
112 programs are checked against passwords
113 requested by the programs and entered by hand,
114 so it is generally appropriate to specify these keys in ASCII format.
115
116 This section was generated by @strong{AutoGen},
117 using the @code{agtexi-cmd} template and the option descriptions for the @code{ntp.keys} program.
118 This software is released under the NTP license, <http://ntp.org/license>.
119
120 @menu
121 * ntp.keys Files::                  Files
122 * ntp.keys See Also::               See Also
123 * ntp.keys Notes::                  Notes
124 @end menu
125
126 @node ntp.keys Files
127 @subsection ntp.keys Files
128 @table @asis
129 @item @file{/etc/ntp.keys}
130 the default name of the configuration file
131 @end table
132 @node ntp.keys See Also
133 @subsection ntp.keys See Also
134 @code{ntp.conf(5)},
135 @code{ntpd(1ntpdmdoc)},
136 @code{ntpdate(1ntpdatemdoc)},
137 @code{ntpdc(1ntpdcmdoc)},
138 @code{sntp(1sntpmdoc)}
139 @node ntp.keys Notes
140 @subsection ntp.keys Notes
141 This document was derived from FreeBSD.