ntp.keys.def revision 1.1.1.3 1 1.1 christos /* -*- Mode: Text -*- */
2 1.1 christos
3 1.1 christos autogen definitions options;
4 1.1 christos
5 1.1 christos #include copyright.def
6 1.1 christos #include version.def
7 1.1 christos
8 1.1 christos // We want the synopsis to be "/etc/ntp.keys" but we need the prog-name
9 1.1 christos // to be ntp.keys - the latter is also how autogen produces the output
10 1.1 christos // file name.
11 1.1 christos prog-name = "ntp.keys";
12 1.1 christos file-path = "/etc/ntp.keys";
13 1.1 christos prog-title = "NTP symmetric key file format";
14 1.1 christos
15 1.1 christos /* explain: Additional information whenever the usage routine is invoked */
16 1.1 christos explain = <<- _END_EXPLAIN
17 1.1 christos _END_EXPLAIN;
18 1.1 christos
19 1.1 christos doc-section = {
20 1.1 christos ds-type = 'DESCRIPTION';
21 1.1 christos ds-format = 'mdoc';
22 1.1 christos ds-text = <<- _END_PROG_MDOC_DESCRIP
23 1.1 christos This document describes the format of an NTP symmetric key file.
24 1.1 christos For a description of the use of this type of file, see the
25 1.1 christos .Qq Authentication Support
26 1.1 christos section of the
27 1.1 christos .Xr ntp.conf 5
28 1.1 christos page.
29 1.1 christos .Pp
30 1.1 christos .Xr ntpd 8
31 1.1 christos reads its keys from a file specified using the
32 1.1 christos .Fl k
33 1.1 christos command line option or the
34 1.1 christos .Ic keys
35 1.1 christos statement in the configuration file.
36 1.1 christos While key number 0 is fixed by the NTP standard
37 1.1 christos (as 56 zero bits)
38 1.1 christos and may not be changed,
39 1.1 christos one or more keys numbered between 1 and 65534
40 1.1 christos may be arbitrarily set in the keys file.
41 1.1 christos .Pp
42 1.1 christos The key file uses the same comment conventions
43 1.1 christos as the configuration file.
44 1.1 christos Key entries use a fixed format of the form
45 1.1 christos .Pp
46 1.1.1.3 christos .D1 Ar keyno type key opt_IP_list
47 1.1 christos .Pp
48 1.1 christos where
49 1.1 christos .Ar keyno
50 1.1 christos is a positive integer (between 1 and 65534),
51 1.1 christos .Ar type
52 1.1 christos is the message digest algorithm,
53 1.1 christos and
54 1.1 christos .Ar key
55 1.1.1.3 christos is the key itself, and
56 1.1.1.3 christos .Ar opt_IP_list
57 1.1.1.3 christos is an optional comma-separated list of IPs
58 1.1.1.3 christos that are allowed to serve time.
59 1.1.1.3 christos If
60 1.1.1.3 christos .Ar opt_IP_list
61 1.1.1.3 christos is empty,
62 1.1.1.3 christos any properly-authenticated server message will be
63 1.1.1.3 christos accepted.
64 1.1 christos .Pp
65 1.1 christos The
66 1.1 christos .Ar key
67 1.1 christos may be given in a format
68 1.1 christos controlled by the
69 1.1 christos .Ar type
70 1.1 christos field.
71 1.1 christos The
72 1.1 christos .Ar type
73 1.1 christos .Li MD5
74 1.1 christos is always supported.
75 1.1 christos If
76 1.1 christos .Li ntpd
77 1.1 christos was built with the OpenSSL library
78 1.1 christos then any digest library supported by that library may be specified.
79 1.1 christos However, if compliance with FIPS 140-2 is required the
80 1.1 christos .Ar type
81 1.1 christos must be either
82 1.1 christos .Li SHA
83 1.1 christos or
84 1.1 christos .Li SHA1 .
85 1.1 christos .Pp
86 1.1 christos What follows are some key types, and corresponding formats:
87 1.1 christos .Pp
88 1.1 christos .Bl -tag -width RMD160 -compact
89 1.1 christos .It Li MD5
90 1.1 christos The key is 1 to 16 printable characters terminated by
91 1.1 christos an EOL,
92 1.1 christos whitespace,
93 1.1 christos or
94 1.1 christos a
95 1.1 christos .Li #
96 1.1 christos (which is the "start of comment" character).
97 1.1 christos .Pp
98 1.1 christos .It Li SHA
99 1.1 christos .It Li SHA1
100 1.1 christos .It Li RMD160
101 1.1 christos The key is a hex-encoded ASCII string of 40 characters,
102 1.1 christos which is truncated as necessary.
103 1.1 christos .El
104 1.1 christos .Pp
105 1.1 christos Note that the keys used by the
106 1.1 christos .Xr ntpq 8
107 1.1 christos and
108 1.1 christos .Xr ntpdc 8
109 1.1 christos programs are checked against passwords
110 1.1 christos requested by the programs and entered by hand,
111 1.1 christos so it is generally appropriate to specify these keys in ASCII format.
112 1.1 christos _END_PROG_MDOC_DESCRIP;
113 1.1 christos };
114 1.1 christos
115 1.1 christos doc-section = {
116 1.1 christos ds-type = 'FILES';
117 1.1 christos ds-format = 'mdoc';
118 1.1 christos ds-text = <<- _END_MDOC_FILES
119 1.1 christos .Bl -tag -width /etc/ntp.keys -compact
120 1.1 christos .It Pa /etc/ntp.keys
121 1.1 christos the default name of the configuration file
122 1.1 christos .El
123 1.1 christos _END_MDOC_FILES;
124 1.1 christos };
125 1.1 christos
126 1.1 christos doc-section = {
127 1.1 christos ds-type = 'SEE ALSO';
128 1.1 christos ds-format = 'mdoc';
129 1.1 christos ds-text = <<- _END_MDOC_SEE_ALSO
130 1.1 christos .Xr ntp.conf 5 ,
131 1.1 christos .Xr ntpd 1ntpdmdoc ,
132 1.1 christos .Xr ntpdate 1ntpdatemdoc ,
133 1.1 christos .Xr ntpdc 1ntpdcmdoc ,
134 1.1 christos .Xr sntp 1sntpmdoc
135 1.1 christos _END_MDOC_SEE_ALSO;
136 1.1 christos };
137 1.1 christos
138 1.1 christos /*
139 1.1 christos doc-section = {
140 1.1 christos ds-type = 'BUGS';
141 1.1 christos ds-format = 'mdoc';
142 1.1 christos ds-text = <<- _END_MDOC_BUGS
143 1.1 christos .Xr ntpd 8
144 1.1 christos has gotten rather fat.
145 1.1 christos While not huge, it has gotten larger than might
146 1.1 christos be desirable for an elevated-priority daemon running on a workstation,
147 1.1 christos particularly since many of the fancy features which consume the space
148 1.1 christos were designed more with a busy primary server, rather than a high
149 1.1 christos stratum workstation, in mind.
150 1.1 christos _END_MDOC_BUGS;
151 1.1 christos };
152 1.1 christos */
153 1.1 christos
154 1.1 christos doc-section = {
155 1.1 christos ds-type = 'NOTES';
156 1.1 christos ds-format = 'mdoc';
157 1.1 christos ds-text = <<- _END_MDOC_NOTES
158 1.1 christos This document was derived from FreeBSD.
159 1.1 christos _END_MDOC_NOTES;
160 1.1 christos };
161