xref: /freebsd/usr.sbin/ntp/doc/ntp.keys.5 (revision c697fb7f)
1.Dd August 14 2018
2.Dt NTP_KEYS 5 File Formats
3.Os SunOS 5.10
4.\"  EDIT THIS FILE WITH CAUTION  (ntp.mdoc)
5.\"
6.\" $FreeBSD$
7.\"
8.\"  It has been AutoGen-ed  August 14, 2018 at 08:29:18 AM by AutoGen 5.18.5
9.\"  From the definitions    ntp.keys.def
10.\"  and the template file   agmdoc-file.tpl
11.Sh NAME
12.Nm ntp.keys
13.Nd NTP symmetric key file format
14
15.Sh NAME
16.Nm ntp.keys
17.Nd NTP symmetric key file format
18.Sh SYNOPSIS
19.Nm
20.Op Fl \-option\-name
21.Op Fl \-option\-name Ar value
22.Pp
23All arguments must be options.
24.Pp
25.Sh DESCRIPTION
26This document describes the format of an NTP symmetric key file.
27For a description of the use of this type of file, see the
28.Qq Authentication Support
29section of the
30.Xr ntp.conf 5
31page.
32.Pp
33.Xr ntpd 8
34reads its keys from a file specified using the
35.Fl k
36command line option or the
37.Ic keys
38statement in the configuration file.
39While key number 0 is fixed by the NTP standard
40(as 56 zero bits)
41and may not be changed,
42one or more keys numbered between 1 and 65535
43may be arbitrarily set in the keys file.
44.Pp
45The key file uses the same comment conventions
46as the configuration file.
47Key entries use a fixed format of the form
48.Pp
49.D1 Ar keyno type key opt_IP_list
50.Pp
51where
52.Ar keyno
53is a positive integer (between 1 and 65535),
54.Ar type
55is the message digest algorithm,
56.Ar key
57is the key itself, and
58.Ar opt_IP_list
59is an optional comma\-separated list of IPs
60where the
61.Ar keyno
62should be trusted.
63that are allowed to serve time.
64Each IP in
65.Ar opt_IP_list
66may contain an optional
67.Cm /subnetbits
68specification which identifies the number of bits for
69the desired subnet of trust.
70If
71.Ar opt_IP_list
72is empty,
73any properly\-authenticated message will be
74accepted.
75.Pp
76The
77.Ar key
78may be given in a format
79controlled by the
80.Ar type
81field.
82The
83.Ar type
84.Li MD5
85is always supported.
86If
87.Li ntpd
88was built with the OpenSSL library
89then any digest library supported by that library may be specified.
90However, if compliance with FIPS 140\-2 is required the
91.Ar type
92must be either
93.Li SHA
94or
95.Li SHA1 .
96.Pp
97What follows are some key types, and corresponding formats:
98.Pp
99.Bl -tag -width RMD160 -compact
100.It Li MD5
101The key is 1 to 16 printable characters terminated by
102an EOL,
103whitespace,
104or
105a
106.Li #
107(which is the "start of comment" character).
108.Pp
109.It Li SHA
110.It Li SHA1
111.It Li RMD160
112The key is a hex\-encoded ASCII string of 40 characters,
113which is truncated as necessary.
114.El
115.Pp
116Note that the keys used by the
117.Xr ntpq 8
118and
119.Xr ntpdc 8
120programs are checked against passwords
121requested by the programs and entered by hand,
122so it is generally appropriate to specify these keys in ASCII format.
123.Sh "OPTIONS"
124.Bl -tag
125.It Fl \-help
126Display usage information and exit.
127.It Fl \-more\-help
128Pass the extended usage information through a pager.
129.It Fl \-version Op Brq Ar v|c|n
130Output version of program and exit.  The default mode is `v', a simple
131version.  The `c' mode will print copyright information and `n' will
132print the full copyright notice.
133.El
134.Sh "OPTION PRESETS"
135Any option that is not marked as \fInot presettable\fP may be preset
136by loading values from environment variables named:
137.nf
138  \fBNTP_KEYS_<option\-name>\fP or \fBNTP_KEYS\fP
139.fi
140.ad
141.Sh "ENVIRONMENT"
142See \fBOPTION PRESETS\fP for configuration environment variables.
143.Sh FILES
144.Bl -tag -width /etc/ntp.keys -compact
145.It Pa /etc/ntp.keys
146the default name of the configuration file
147.El
148.Sh "EXIT STATUS"
149One of the following exit values will be returned:
150.Bl -tag
151.It 0 " (EXIT_SUCCESS)"
152Successful program execution.
153.It 1 " (EXIT_FAILURE)"
154The operation failed or the command syntax was not valid.
155.It 70 " (EX_SOFTWARE)"
156libopts had an internal operational error.  Please report
157it to autogen\-users@lists.sourceforge.net.  Thank you.
158.El
159.Sh "SEE ALSO"
160.Xr ntp.conf 5 ,
161.Xr ntpd 8 ,
162.Xr ntpdate 8 ,
163.Xr ntpdc 8 ,
164.Xr sntp 8
165.Sh "AUTHORS"
166The University of Delaware and Network Time Foundation
167.Sh "COPYRIGHT"
168Copyright (C) 1992\-2017 The University of Delaware and Network Time Foundation all rights reserved.
169This program is released under the terms of the NTP license, <http://ntp.org/license>.
170.Sh "BUGS"
171Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
172.Sh NOTES
173This document was derived from FreeBSD.
174.Pp
175This manual page was \fIAutoGen\fP\-erated from the \fBntp.keys\fP
176option definitions.
177