xref: /freebsd/contrib/ntp/ntpd/ntp.keys.html (revision 2b15cb3d0922bd70ea592f0da9b4a5b167f4d53f)
1*2b15cb3dSCy Schubert<html lang="en">
2*2b15cb3dSCy Schubert<head>
3*2b15cb3dSCy Schubert<title>NTP Symmetric Key</title>
4*2b15cb3dSCy Schubert<meta http-equiv="Content-Type" content="text/html">
5*2b15cb3dSCy Schubert<meta name="description" content="NTP Symmetric Key">
6*2b15cb3dSCy Schubert<meta name="generator" content="makeinfo 4.7">
7*2b15cb3dSCy Schubert<link title="Top" rel="top" href="#Top">
8*2b15cb3dSCy Schubert<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
9*2b15cb3dSCy Schubert<meta http-equiv="Content-Style-Type" content="text/css">
10*2b15cb3dSCy Schubert<style type="text/css"><!--
11*2b15cb3dSCy Schubert  pre.display { font-family:inherit }
12*2b15cb3dSCy Schubert  pre.format  { font-family:inherit }
13*2b15cb3dSCy Schubert  pre.smalldisplay { font-family:inherit; font-size:smaller }
14*2b15cb3dSCy Schubert  pre.smallformat  { font-family:inherit; font-size:smaller }
15*2b15cb3dSCy Schubert  pre.smallexample { font-size:smaller }
16*2b15cb3dSCy Schubert  pre.smalllisp    { font-size:smaller }
17*2b15cb3dSCy Schubert  span.sc { font-variant:small-caps }
18*2b15cb3dSCy Schubert  span.roman { font-family: serif; font-weight: normal; }
19*2b15cb3dSCy Schubert--></style>
20*2b15cb3dSCy Schubert</head>
21*2b15cb3dSCy Schubert<body>
22*2b15cb3dSCy Schubert<h1 class="settitle">NTP Symmetric Key</h1>
23*2b15cb3dSCy Schubert<div class="node">
24*2b15cb3dSCy Schubert<p><hr>
25*2b15cb3dSCy Schubert<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002ekeys-Description">ntp.keys Description</a>,
26*2b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
27*2b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
28*2b15cb3dSCy Schubert<br>
29*2b15cb3dSCy Schubert</div>
30*2b15cb3dSCy Schubert
31*2b15cb3dSCy Schubert<h2 class="unnumbered">NTP's Symmetric Key File User Manual</h2>
32*2b15cb3dSCy Schubert
33*2b15cb3dSCy Schubert<p>This document describes the symmetric key file for the NTP Project's
34*2b15cb3dSCy Schubert<code>ntpd</code> program.
35*2b15cb3dSCy Schubert
36*2b15cb3dSCy Schubert  <p>This document applies to version 4.2.8p1 of <code>ntp.keys</code>.
37*2b15cb3dSCy Schubert
38*2b15cb3dSCy Schubert  <div class="shortcontents">
39*2b15cb3dSCy Schubert<h2>Short Contents</h2>
40*2b15cb3dSCy Schubert<ul>
41*2b15cb3dSCy Schubert<a href="#Top">NTP's Symmetric Key File User Manual</a>
42*2b15cb3dSCy Schubert</ul>
43*2b15cb3dSCy Schubert</div>
44*2b15cb3dSCy Schubert
45*2b15cb3dSCy Schubert<ul class="menu">
46*2b15cb3dSCy Schubert<li><a accesskey="1" href="#ntp_002ekeys-Description">ntp.keys Description</a>
47*2b15cb3dSCy Schubert<li><a accesskey="2" href="#ntp_002ekeys-Notes">ntp.keys Notes</a>
48*2b15cb3dSCy Schubert</ul>
49*2b15cb3dSCy Schubert
50*2b15cb3dSCy Schubert<div class="node">
51*2b15cb3dSCy Schubert<p><hr>
52*2b15cb3dSCy Schubert<a name="ntp_002ekeys-Description"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#Top">Top</a>,
53*2b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
54*2b15cb3dSCy Schubert<br>
55*2b15cb3dSCy Schubert</div>
56*2b15cb3dSCy Schubert
57*2b15cb3dSCy Schubert<!-- node-name,  next,  previous,  up -->
58*2b15cb3dSCy Schubert<h3 class="section">Description</h3>
59*2b15cb3dSCy Schubert
60*2b15cb3dSCy Schubert<p>The name and location of the symmetric key file for <code>ntpd</code> can
61*2b15cb3dSCy Schubertbe specified in a configuration file, by default <code>/etc/ntp.keys</code>.
62*2b15cb3dSCy Schubert
63*2b15cb3dSCy Schubert<div class="node">
64*2b15cb3dSCy Schubert<p><hr>
65*2b15cb3dSCy Schubert<a name="ntp_002ekeys-Notes"></a>
66*2b15cb3dSCy Schubert<br>
67*2b15cb3dSCy Schubert</div>
68*2b15cb3dSCy Schubert
69*2b15cb3dSCy Schubert<h3 class="section">Notes about ntp.keys</h3>
70*2b15cb3dSCy Schubert
71*2b15cb3dSCy Schubert<p><a name="index-ntp_002ekeys-1"></a><a name="index-NTP-symmetric-key-file-format-2"></a>
72*2b15cb3dSCy Schubert
73*2b15cb3dSCy Schubert  <p>This document describes the format of an NTP symmetric key file.
74*2b15cb3dSCy SchubertFor a description of the use of this type of file, see the
75*2b15cb3dSCy Schubert"Authentication Support"
76*2b15cb3dSCy Schubertsection of the
77*2b15cb3dSCy Schubert<code>ntp.conf(5)</code>
78*2b15cb3dSCy Schubertpage.
79*2b15cb3dSCy Schubert
80*2b15cb3dSCy Schubert  <p><code>ntpd(8)</code>
81*2b15cb3dSCy Schubertreads its keys from a file specified using the
82*2b15cb3dSCy Schubert<code>-k</code>
83*2b15cb3dSCy Schubertcommand line option or the
84*2b15cb3dSCy Schubert<code>keys</code>
85*2b15cb3dSCy Schubertstatement in the configuration file.
86*2b15cb3dSCy SchubertWhile key number 0 is fixed by the NTP standard
87*2b15cb3dSCy Schubert(as 56 zero bits)
88*2b15cb3dSCy Schubertand may not be changed,
89*2b15cb3dSCy Schubertone or more keys numbered between 1 and 65534
90*2b15cb3dSCy Schubertmay be arbitrarily set in the keys file.
91*2b15cb3dSCy Schubert
92*2b15cb3dSCy Schubert  <p>The key file uses the same comment conventions
93*2b15cb3dSCy Schubertas the configuration file.
94*2b15cb3dSCy SchubertKey entries use a fixed format of the form
95*2b15cb3dSCy Schubert
96*2b15cb3dSCy Schubert<pre class="example">     <kbd>keyno</kbd> <kbd>type</kbd> <kbd>key</kbd>
97*2b15cb3dSCy Schubert</pre>
98*2b15cb3dSCy Schubert  <p>where
99*2b15cb3dSCy Schubert<kbd>keyno</kbd>
100*2b15cb3dSCy Schubertis a positive integer (between 1 and 65534),
101*2b15cb3dSCy Schubert<kbd>type</kbd>
102*2b15cb3dSCy Schubertis the message digest algorithm,
103*2b15cb3dSCy Schubertand
104*2b15cb3dSCy Schubert<kbd>key</kbd>
105*2b15cb3dSCy Schubertis the key itself.
106*2b15cb3dSCy Schubert
107*2b15cb3dSCy Schubert  <p>The
108*2b15cb3dSCy Schubert<kbd>key</kbd>
109*2b15cb3dSCy Schubertmay be given in a format
110*2b15cb3dSCy Schubertcontrolled by the
111*2b15cb3dSCy Schubert<kbd>type</kbd>
112*2b15cb3dSCy Schubertfield.
113*2b15cb3dSCy SchubertThe
114*2b15cb3dSCy Schubert<kbd>type</kbd>
115*2b15cb3dSCy Schubert<code>MD5</code>
116*2b15cb3dSCy Schubertis always supported.
117*2b15cb3dSCy SchubertIf
118*2b15cb3dSCy Schubert<code>ntpd</code>
119*2b15cb3dSCy Schubertwas built with the OpenSSL library
120*2b15cb3dSCy Schubertthen any digest library supported by that library may be specified.
121*2b15cb3dSCy SchubertHowever, if compliance with FIPS 140-2 is required the
122*2b15cb3dSCy Schubert<kbd>type</kbd>
123*2b15cb3dSCy Schubertmust be either
124*2b15cb3dSCy Schubert<code>SHA</code>
125*2b15cb3dSCy Schubertor
126*2b15cb3dSCy Schubert<code>SHA1</code>.
127*2b15cb3dSCy Schubert
128*2b15cb3dSCy Schubert  <p>What follows are some key types, and corresponding formats:
129*2b15cb3dSCy Schubert
130*2b15cb3dSCy Schubert     <dl>
131*2b15cb3dSCy Schubert<dt><code>MD5</code><dd>The key is 1 to 16 printable characters terminated by
132*2b15cb3dSCy Schubertan EOL,
133*2b15cb3dSCy Schubertwhitespace,
134*2b15cb3dSCy Schubertor
135*2b15cb3dSCy Schuberta
136*2b15cb3dSCy Schubert<code>#</code>
137*2b15cb3dSCy Schubert(which is the "start of comment" character).
138*2b15cb3dSCy Schubert
139*2b15cb3dSCy Schubert     <br><dt><code>SHA</code><br><dt><code>SHA1</code><br><dt><code>RMD160</code><dd>The key is a hex-encoded ASCII string of 40 characters,
140*2b15cb3dSCy Schubertwhich is truncated as necessary.
141*2b15cb3dSCy Schubert</dl>
142*2b15cb3dSCy Schubert
143*2b15cb3dSCy Schubert  <p>Note that the keys used by the
144*2b15cb3dSCy Schubert<code>ntpq(8)</code>
145*2b15cb3dSCy Schubertand
146*2b15cb3dSCy Schubert<code>ntpdc(8)</code>
147*2b15cb3dSCy Schubertprograms are checked against passwords
148*2b15cb3dSCy Schubertrequested by the programs and entered by hand,
149*2b15cb3dSCy Schubertso it is generally appropriate to specify these keys in ASCII format.
150*2b15cb3dSCy Schubert
151*2b15cb3dSCy Schubert  <p>This section was generated by <strong>AutoGen</strong>,
152*2b15cb3dSCy Schubertusing the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntp.keys</code> program.
153*2b15cb3dSCy SchubertThis software is released under the NTP license, &lt;http://ntp.org/license&gt;.
154*2b15cb3dSCy Schubert
155*2b15cb3dSCy Schubert<ul class="menu">
156*2b15cb3dSCy Schubert<li><a accesskey="1" href="#ntp_002ekeys-Files">ntp.keys Files</a>:                   Files
157*2b15cb3dSCy Schubert<li><a accesskey="2" href="#ntp_002ekeys-See-Also">ntp.keys See Also</a>:                See Also
158*2b15cb3dSCy Schubert<li><a accesskey="3" href="#ntp_002ekeys-Notes">ntp.keys Notes</a>:                   Notes
159*2b15cb3dSCy Schubert</ul>
160*2b15cb3dSCy Schubert
161*2b15cb3dSCy Schubert<div class="node">
162*2b15cb3dSCy Schubert<p><hr>
163*2b15cb3dSCy Schubert<a name="ntp_002ekeys-Files"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002ekeys-See-Also">ntp.keys See Also</a>,
164*2b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#ntp_002ekeys-Notes">ntp.keys Notes</a>
165*2b15cb3dSCy Schubert<br>
166*2b15cb3dSCy Schubert</div>
167*2b15cb3dSCy Schubert
168*2b15cb3dSCy Schubert<h4 class="subsection">ntp.keys Files</h4>
169*2b15cb3dSCy Schubert
170*2b15cb3dSCy Schubert     <dl>
171*2b15cb3dSCy Schubert<dt><span class="file">/etc/ntp.keys</span><dd>the default name of the configuration file
172*2b15cb3dSCy Schubert</dl>
173*2b15cb3dSCy Schubert<div class="node">
174*2b15cb3dSCy Schubert<p><hr>
175*2b15cb3dSCy Schubert<a name="ntp_002ekeys-See-Also"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002ekeys-Notes">ntp.keys Notes</a>,
176*2b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002ekeys-Files">ntp.keys Files</a>,
177*2b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#ntp_002ekeys-Notes">ntp.keys Notes</a>
178*2b15cb3dSCy Schubert<br>
179*2b15cb3dSCy Schubert</div>
180*2b15cb3dSCy Schubert
181*2b15cb3dSCy Schubert<h4 class="subsection">ntp.keys See Also</h4>
182*2b15cb3dSCy Schubert
183*2b15cb3dSCy Schubert<p><code>ntp.conf(5)</code>,
184*2b15cb3dSCy Schubert<code>ntpd(1ntpdmdoc)</code>,
185*2b15cb3dSCy Schubert<code>ntpdate(1ntpdatemdoc)</code>,
186*2b15cb3dSCy Schubert<code>ntpdc(1ntpdcmdoc)</code>,
187*2b15cb3dSCy Schubert<code>sntp(1sntpmdoc)</code>
188*2b15cb3dSCy Schubert<div class="node">
189*2b15cb3dSCy Schubert<p><hr>
190*2b15cb3dSCy Schubert<a name="ntp_002ekeys-Notes"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002ekeys-See-Also">ntp.keys See Also</a>,
191*2b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#ntp_002ekeys-Notes">ntp.keys Notes</a>
192*2b15cb3dSCy Schubert<br>
193*2b15cb3dSCy Schubert</div>
194*2b15cb3dSCy Schubert
195*2b15cb3dSCy Schubert<h4 class="subsection">ntp.keys Notes</h4>
196*2b15cb3dSCy Schubert
197*2b15cb3dSCy Schubert<p>This document was derived from FreeBSD.
198*2b15cb3dSCy Schubert
199*2b15cb3dSCy Schubert</body></html>
200*2b15cb3dSCy Schubert
201