xref: /freebsd/contrib/ntp/ntpd/ntp.keys.def (revision 68ba7e87e74b00b0511b346607b464f318c91083)
12b15cb3dSCy Schubert/* -*- Mode: Text -*- */
22b15cb3dSCy Schubert
32b15cb3dSCy Schubertautogen definitions options;
42b15cb3dSCy Schubert
52b15cb3dSCy Schubert#include copyright.def
62b15cb3dSCy Schubert#include version.def
72b15cb3dSCy Schubert
82b15cb3dSCy Schubert// We want the synopsis to be "/etc/ntp.keys" but we need the prog-name
92b15cb3dSCy Schubert// to be ntp.keys - the latter is also how autogen produces the output
102b15cb3dSCy Schubert// file name.
112b15cb3dSCy Schubertprog-name	= "ntp.keys";
122b15cb3dSCy Schubertfile-path	= "/etc/ntp.keys";
132b15cb3dSCy Schubertprog-title	= "NTP symmetric key file format";
142b15cb3dSCy Schubert
152b15cb3dSCy Schubert/* explain: Additional information whenever the usage routine is invoked */
162b15cb3dSCy Schubertexplain = <<- _END_EXPLAIN
172b15cb3dSCy Schubert	_END_EXPLAIN;
182b15cb3dSCy Schubert
192b15cb3dSCy Schubertdoc-section	= {
202b15cb3dSCy Schubert  ds-type	= 'DESCRIPTION';
212b15cb3dSCy Schubert  ds-format	= 'mdoc';
222b15cb3dSCy Schubert  ds-text	= <<- _END_PROG_MDOC_DESCRIP
232b15cb3dSCy SchubertThis document describes the format of an NTP symmetric key file.
242b15cb3dSCy SchubertFor a description of the use of this type of file, see the
252b15cb3dSCy Schubert.Qq Authentication Support
262b15cb3dSCy Schubertsection of the
272b15cb3dSCy Schubert.Xr ntp.conf 5
282b15cb3dSCy Schubertpage.
292b15cb3dSCy Schubert.Pp
302b15cb3dSCy Schubert.Xr ntpd 8
312b15cb3dSCy Schubertreads its keys from a file specified using the
322b15cb3dSCy Schubert.Fl k
332b15cb3dSCy Schubertcommand line option or the
342b15cb3dSCy Schubert.Ic keys
352b15cb3dSCy Schubertstatement in the configuration file.
362b15cb3dSCy SchubertWhile key number 0 is fixed by the NTP standard
372b15cb3dSCy Schubert(as 56 zero bits)
382b15cb3dSCy Schubertand may not be changed,
392b15cb3dSCy Schubertone or more keys numbered between 1 and 65534
402b15cb3dSCy Schubertmay be arbitrarily set in the keys file.
412b15cb3dSCy Schubert.Pp
422b15cb3dSCy SchubertThe key file uses the same comment conventions
432b15cb3dSCy Schubertas the configuration file.
442b15cb3dSCy SchubertKey entries use a fixed format of the form
452b15cb3dSCy Schubert.Pp
46*68ba7e87SXin LI.D1 Ar keyno type key opt_IP_list
472b15cb3dSCy Schubert.Pp
482b15cb3dSCy Schubertwhere
492b15cb3dSCy Schubert.Ar keyno
502b15cb3dSCy Schubertis a positive integer (between 1 and 65534),
512b15cb3dSCy Schubert.Ar type
522b15cb3dSCy Schubertis the message digest algorithm,
532b15cb3dSCy Schubertand
542b15cb3dSCy Schubert.Ar key
55*68ba7e87SXin LIis the key itself, and
56*68ba7e87SXin LI.Ar opt_IP_list
57*68ba7e87SXin LIis an optional comma-separated list of IPs
58*68ba7e87SXin LIthat are allowed to serve time.
59*68ba7e87SXin LIIf
60*68ba7e87SXin LI.Ar opt_IP_list
61*68ba7e87SXin LIis empty,
62*68ba7e87SXin LIany properly-authenticated server message will be
63*68ba7e87SXin LIaccepted.
642b15cb3dSCy Schubert.Pp
652b15cb3dSCy SchubertThe
662b15cb3dSCy Schubert.Ar key
672b15cb3dSCy Schubertmay be given in a format
682b15cb3dSCy Schubertcontrolled by the
692b15cb3dSCy Schubert.Ar type
702b15cb3dSCy Schubertfield.
712b15cb3dSCy SchubertThe
722b15cb3dSCy Schubert.Ar type
732b15cb3dSCy Schubert.Li MD5
742b15cb3dSCy Schubertis always supported.
752b15cb3dSCy SchubertIf
762b15cb3dSCy Schubert.Li ntpd
772b15cb3dSCy Schubertwas built with the OpenSSL library
782b15cb3dSCy Schubertthen any digest library supported by that library may be specified.
792b15cb3dSCy SchubertHowever, if compliance with FIPS 140-2 is required the
802b15cb3dSCy Schubert.Ar type
812b15cb3dSCy Schubertmust be either
822b15cb3dSCy Schubert.Li SHA
832b15cb3dSCy Schubertor
842b15cb3dSCy Schubert.Li SHA1 .
852b15cb3dSCy Schubert.Pp
862b15cb3dSCy SchubertWhat follows are some key types, and corresponding formats:
872b15cb3dSCy Schubert.Pp
882b15cb3dSCy Schubert.Bl -tag -width RMD160 -compact
892b15cb3dSCy Schubert.It Li MD5
902b15cb3dSCy SchubertThe key is 1 to 16 printable characters terminated by
912b15cb3dSCy Schubertan EOL,
922b15cb3dSCy Schubertwhitespace,
932b15cb3dSCy Schubertor
942b15cb3dSCy Schuberta
952b15cb3dSCy Schubert.Li #
962b15cb3dSCy Schubert(which is the "start of comment" character).
972b15cb3dSCy Schubert.Pp
982b15cb3dSCy Schubert.It Li SHA
992b15cb3dSCy Schubert.It Li SHA1
1002b15cb3dSCy Schubert.It Li RMD160
1012b15cb3dSCy SchubertThe key is a hex-encoded ASCII string of 40 characters,
1022b15cb3dSCy Schubertwhich is truncated as necessary.
1032b15cb3dSCy Schubert.El
1042b15cb3dSCy Schubert.Pp
1052b15cb3dSCy SchubertNote that the keys used by the
1062b15cb3dSCy Schubert.Xr ntpq 8
1072b15cb3dSCy Schubertand
1082b15cb3dSCy Schubert.Xr ntpdc 8
1092b15cb3dSCy Schubertprograms are checked against passwords
1102b15cb3dSCy Schubertrequested by the programs and entered by hand,
1112b15cb3dSCy Schubertso it is generally appropriate to specify these keys in ASCII format.
1122b15cb3dSCy Schubert	_END_PROG_MDOC_DESCRIP;
1132b15cb3dSCy Schubert};
1142b15cb3dSCy Schubert
1152b15cb3dSCy Schubertdoc-section	= {
1162b15cb3dSCy Schubert  ds-type	= 'FILES';
1172b15cb3dSCy Schubert  ds-format	= 'mdoc';
1182b15cb3dSCy Schubert  ds-text	= <<- _END_MDOC_FILES
1192b15cb3dSCy Schubert.Bl -tag -width /etc/ntp.keys -compact
1202b15cb3dSCy Schubert.It Pa /etc/ntp.keys
1212b15cb3dSCy Schubertthe default name of the configuration file
1222b15cb3dSCy Schubert.El
1232b15cb3dSCy Schubert	_END_MDOC_FILES;
1242b15cb3dSCy Schubert};
1252b15cb3dSCy Schubert
1262b15cb3dSCy Schubertdoc-section	= {
1272b15cb3dSCy Schubert  ds-type	= 'SEE ALSO';
1282b15cb3dSCy Schubert  ds-format	= 'mdoc';
1292b15cb3dSCy Schubert  ds-text	= <<- _END_MDOC_SEE_ALSO
1302b15cb3dSCy Schubert.Xr ntp.conf 5 ,
1312b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc ,
1322b15cb3dSCy Schubert.Xr ntpdate 1ntpdatemdoc ,
1332b15cb3dSCy Schubert.Xr ntpdc 1ntpdcmdoc ,
1342b15cb3dSCy Schubert.Xr sntp 1sntpmdoc
1352b15cb3dSCy Schubert	_END_MDOC_SEE_ALSO;
1362b15cb3dSCy Schubert};
1372b15cb3dSCy Schubert
1382b15cb3dSCy Schubert/*
1392b15cb3dSCy Schubertdoc-section	= {
1402b15cb3dSCy Schubert  ds-type	= 'BUGS';
1412b15cb3dSCy Schubert  ds-format	= 'mdoc';
1422b15cb3dSCy Schubert  ds-text	= <<- _END_MDOC_BUGS
1432b15cb3dSCy Schubert.Xr ntpd 8
1442b15cb3dSCy Schuberthas gotten rather fat.
1452b15cb3dSCy SchubertWhile not huge, it has gotten larger than might
1462b15cb3dSCy Schubertbe desirable for an elevated-priority daemon running on a workstation,
1472b15cb3dSCy Schubertparticularly since many of the fancy features which consume the space
1482b15cb3dSCy Schubertwere designed more with a busy primary server, rather than a high
1492b15cb3dSCy Schubertstratum workstation, in mind.
1502b15cb3dSCy Schubert	_END_MDOC_BUGS;
1512b15cb3dSCy Schubert};
1522b15cb3dSCy Schubert*/
1532b15cb3dSCy Schubert
1542b15cb3dSCy Schubertdoc-section	= {
1552b15cb3dSCy Schubert  ds-type	= 'NOTES';
1562b15cb3dSCy Schubert  ds-format	= 'mdoc';
1572b15cb3dSCy Schubert  ds-text	= <<- _END_MDOC_NOTES
1582b15cb3dSCy SchubertThis document was derived from FreeBSD.
1592b15cb3dSCy Schubert	_END_MDOC_NOTES;
1602b15cb3dSCy Schubert};
161