Home | History | Annotate | Line # | Download | only in util
ntp-keygen.html revision 1.1.1.2.4.4
      1  1.1.1.2.4.2  snj <html lang="en">
      2  1.1.1.2.4.2  snj <head>
      3  1.1.1.2.4.2  snj <title>Ntp-keygen User's Manual</title>
      4  1.1.1.2.4.2  snj <meta http-equiv="Content-Type" content="text/html">
      5  1.1.1.2.4.2  snj <meta name="description" content="Ntp-keygen User's Manual">
      6  1.1.1.2.4.2  snj <meta name="generator" content="makeinfo 4.7">
      7  1.1.1.2.4.2  snj <link title="Top" rel="top" href="#Top">
      8  1.1.1.2.4.2  snj <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
      9  1.1.1.2.4.2  snj <meta http-equiv="Content-Style-Type" content="text/css">
     10  1.1.1.2.4.2  snj <style type="text/css"><!--
     11  1.1.1.2.4.2  snj   pre.display { font-family:inherit }
     12  1.1.1.2.4.2  snj   pre.format  { font-family:inherit }
     13  1.1.1.2.4.2  snj   pre.smalldisplay { font-family:inherit; font-size:smaller }
     14  1.1.1.2.4.2  snj   pre.smallformat  { font-family:inherit; font-size:smaller }
     15  1.1.1.2.4.2  snj   pre.smallexample { font-size:smaller }
     16  1.1.1.2.4.2  snj   pre.smalllisp    { font-size:smaller }
     17  1.1.1.2.4.2  snj   span.sc { font-variant:small-caps }
     18  1.1.1.2.4.2  snj   span.roman { font-family: serif; font-weight: normal; } 
     19  1.1.1.2.4.2  snj --></style>
     20  1.1.1.2.4.2  snj </head>
     21  1.1.1.2.4.2  snj <body>
     22  1.1.1.2.4.2  snj <h1 class="settitle">Ntp-keygen User's Manual</h1>
     23  1.1.1.2.4.2  snj   <div class="shortcontents">
     24  1.1.1.2.4.2  snj <h2>Short Contents</h2>
     25  1.1.1.2.4.2  snj <ul>
     26  1.1.1.2.4.2  snj <a href="#Top">Top</a>
     27  1.1.1.2.4.2  snj <a href="#Top">NTP Key Generation Program User Manual</a>
     28  1.1.1.2.4.2  snj </ul>
     29  1.1.1.2.4.2  snj </div>
     30  1.1.1.2.4.2  snj 
     31  1.1.1.2.4.2  snj 
     32  1.1.1.2.4.2  snj 
     33  1.1.1.2.4.2  snj <div class="node">
     34  1.1.1.2.4.2  snj <p><hr>
     35  1.1.1.2.4.2  snj <a name="Top"></a>Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
     36  1.1.1.2.4.2  snj <br>
     37  1.1.1.2.4.2  snj </div>
     38  1.1.1.2.4.2  snj 
     39  1.1.1.2.4.2  snj <h2 class="unnumbered">Top</h2>
     40  1.1.1.2.4.2  snj 
     41  1.1.1.2.4.2  snj <ul class="menu">
     42  1.1.1.2.4.2  snj <li><a accesskey="1" href="#Description">Description</a>
     43  1.1.1.2.4.2  snj <li><a accesskey="2" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>: 	Invoking ntp-keygen
     44  1.1.1.2.4.2  snj <li><a accesskey="3" href="#Running-the-Program">Running the Program</a>
     45  1.1.1.2.4.2  snj <li><a accesskey="4" href="#Random-Seed-File">Random Seed File</a>
     46  1.1.1.2.4.2  snj <li><a accesskey="5" href="#Cryptographic-Data-Files">Cryptographic Data Files</a>
     47  1.1.1.2.4.2  snj </ul>
     48  1.1.1.2.4.2  snj 
     49  1.1.1.2.4.2  snj <div class="node">
     50  1.1.1.2.4.2  snj <p><hr>
     51  1.1.1.2.4.2  snj <a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Description">Description</a>,
     52  1.1.1.2.4.2  snj Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
     53  1.1.1.2.4.2  snj Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
     54  1.1.1.2.4.2  snj <br>
     55  1.1.1.2.4.2  snj </div>
     56  1.1.1.2.4.2  snj 
     57  1.1.1.2.4.2  snj <h2 class="unnumbered">NTP Key Generation Program User Manual</h2>
     58  1.1.1.2.4.2  snj 
     59  1.1.1.2.4.2  snj <p>This document describes the use of the NTP Project's <code>ntp-keygen</code>
     60  1.1.1.2.4.2  snj program, that generates cryptographic data files used by the NTPv4
     61  1.1.1.2.4.2  snj authentication and identity schemes. 
     62  1.1.1.2.4.2  snj It can generate message digest keys used in symmetric key cryptography and,
     63  1.1.1.2.4.2  snj if the OpenSSL software
     64  1.1.1.2.4.2  snj library has been installed, it can generate host keys, sign keys,
     65  1.1.1.2.4.2  snj certificates, and identity keys and parameters used by the Autokey
     66  1.1.1.2.4.2  snj public key cryptography. 
     67  1.1.1.2.4.2  snj The message digest keys file is generated in a
     68  1.1.1.2.4.2  snj format compatible with NTPv3. 
     69  1.1.1.2.4.2  snj All other files are in PEM-encoded
     70  1.1.1.2.4.2  snj printable ASCII format so they can be embedded as MIME attachments in
     71  1.1.1.2.4.2  snj mail to other sites.
     72  1.1.1.2.4.2  snj 
     73  1.1.1.2.4.4  snj   <p>This document applies to version 4.2.8p7 of <code>ntp-keygen</code>.
     74  1.1.1.2.4.2  snj 
     75  1.1.1.2.4.2  snj <div class="node">
     76  1.1.1.2.4.2  snj <p><hr>
     77  1.1.1.2.4.2  snj <a name="Description"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Running-the-Program">Running the Program</a>,
     78  1.1.1.2.4.2  snj Previous:&nbsp;<a rel="previous" accesskey="p" href="#Top">Top</a>,
     79  1.1.1.2.4.2  snj Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
     80  1.1.1.2.4.2  snj <br>
     81  1.1.1.2.4.2  snj </div>
     82  1.1.1.2.4.2  snj 
     83  1.1.1.2.4.2  snj <!-- node-name,  next,  previous,  up -->
     84  1.1.1.2.4.2  snj <h3 class="section">Description</h3>
     85  1.1.1.2.4.2  snj 
     86  1.1.1.2.4.2  snj <p>This program generates cryptographic data files used by the NTPv4
     87  1.1.1.2.4.2  snj authentication and identity schemes. It can generate message digest
     88  1.1.1.2.4.2  snj keys used in symmetric key cryptography and, if the OpenSSL software
     89  1.1.1.2.4.2  snj library has been installed, it can generate host keys, sign keys,
     90  1.1.1.2.4.2  snj certificates, and identity keys and parameters used by the Autokey
     91  1.1.1.2.4.2  snj public key cryptography. The message digest keys file is generated in a
     92  1.1.1.2.4.2  snj format compatible with NTPv3. All other files are in PEM-encoded
     93  1.1.1.2.4.2  snj printable ASCII format so they can be embedded as MIME attachments in
     94  1.1.1.2.4.2  snj mail to other sites.
     95  1.1.1.2.4.2  snj 
     96  1.1.1.2.4.2  snj   <p>When used to generate message digest keys, the program produces a file
     97  1.1.1.2.4.2  snj containing ten pseudo-random printable ASCII strings suitable for the
     98  1.1.1.2.4.2  snj MD5 message digest algorithm included in the distribution. 
     99  1.1.1.2.4.2  snj If the
    100  1.1.1.2.4.2  snj OpenSSL library is installed, it produces an additional ten hex-encoded
    101  1.1.1.2.4.2  snj random bit strings suitable for the SHA1 and other message digest
    102  1.1.1.2.4.2  snj algorithms. 
    103  1.1.1.2.4.2  snj The message digest keys file must be distributed and stored
    104  1.1.1.2.4.2  snj using secure means beyond the scope of NTP itself. 
    105  1.1.1.2.4.2  snj Besides the keys
    106  1.1.1.2.4.2  snj used for ordinary NTP associations, additional keys can be defined as
    107  1.1.1.2.4.2  snj passwords for the ntpq and ntpdc utility programs.
    108  1.1.1.2.4.2  snj 
    109  1.1.1.2.4.2  snj   <p>The remaining generated files are compatible with other OpenSSL
    110  1.1.1.2.4.2  snj applications and other Public Key Infrastructure (PKI) resources. 
    111  1.1.1.2.4.2  snj Certificates generated by this program are compatible with extant
    112  1.1.1.2.4.2  snj industry practice, although some users might find the interpretation of
    113  1.1.1.2.4.2  snj X509v3 extension fields somewhat liberal. 
    114  1.1.1.2.4.2  snj However, the identity keys
    115  1.1.1.2.4.2  snj are probably not compatible with anything other than Autokey.
    116  1.1.1.2.4.2  snj 
    117  1.1.1.2.4.2  snj   <p>Some files used by this program are encrypted using a private password. 
    118  1.1.1.2.4.2  snj The <code>-p</code> option specifies the password for local encrypted files and the
    119  1.1.1.2.4.2  snj <code>-q</code> option the password for encrypted files sent to remote sites. 
    120  1.1.1.2.4.2  snj If no password is specified, the host name returned by the Unix
    121  1.1.1.2.4.2  snj <code>gethostname()</code> function, normally the DNS name of the host, is used.
    122  1.1.1.2.4.2  snj 
    123  1.1.1.2.4.2  snj   <p>The <kbd>pw</kbd> option of the <code>crypto</code> configuration command
    124  1.1.1.2.4.2  snj specifies the read password for previously encrypted local files. 
    125  1.1.1.2.4.2  snj This must match the local password used by this program. 
    126  1.1.1.2.4.2  snj If not specified, the host name is used. 
    127  1.1.1.2.4.2  snj Thus, if files are generated by this program without password,
    128  1.1.1.2.4.2  snj they can be read back by ntpd without password, but only on the same
    129  1.1.1.2.4.2  snj host.
    130  1.1.1.2.4.2  snj 
    131  1.1.1.2.4.2  snj   <p>Normally, encrypted files for each host are generated by that host and
    132  1.1.1.2.4.2  snj used only by that host, although exceptions exist as noted later on
    133  1.1.1.2.4.2  snj this page. 
    134  1.1.1.2.4.2  snj The symmetric keys file, normally called <code>ntp.keys</code>, is
    135  1.1.1.2.4.2  snj usually installed in <code>/etc</code>. 
    136  1.1.1.2.4.2  snj Other files and links are usually installed
    137  1.1.1.2.4.2  snj in <code>/usr/local/etc</code>, which is normally in a shared filesystem in
    138  1.1.1.2.4.2  snj NFS-mounted networks and cannot be changed by shared clients. 
    139  1.1.1.2.4.2  snj The location of the keys directory can be changed by the keysdir
    140  1.1.1.2.4.2  snj configuration command in such cases. 
    141  1.1.1.2.4.2  snj Normally, this is in <code>/etc</code>.
    142  1.1.1.2.4.2  snj 
    143  1.1.1.2.4.2  snj   <p>This program directs commentary and error messages to the standard
    144  1.1.1.2.4.2  snj error stream <code>stderr</code> and remote files to the standard output stream
    145  1.1.1.2.4.2  snj <code>stdout</code> where they can be piped to other applications or redirected to
    146  1.1.1.2.4.2  snj files. 
    147  1.1.1.2.4.2  snj The names used for generated files and links all begin with the
    148  1.1.1.2.4.2  snj string <code>ntpkey</code> and include the file type,
    149  1.1.1.2.4.2  snj generating host and filestamp,
    150  1.1.1.2.4.2  snj as described in the <a href="#Cryptographic-Data-Files">Cryptographic Data Files</a> section below.
    151  1.1.1.2.4.2  snj 
    152  1.1.1.2.4.2  snj <div class="node">
    153  1.1.1.2.4.2  snj <p><hr>
    154  1.1.1.2.4.2  snj <a name="Running-the-Program"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Random-Seed-File">Random Seed File</a>,
    155  1.1.1.2.4.2  snj Previous:&nbsp;<a rel="previous" accesskey="p" href="#Description">Description</a>,
    156  1.1.1.2.4.2  snj Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
    157  1.1.1.2.4.2  snj <br>
    158  1.1.1.2.4.2  snj </div>
    159  1.1.1.2.4.2  snj 
    160  1.1.1.2.4.2  snj <!-- node-name,  next,  previous,  up -->
    161  1.1.1.2.4.2  snj <h3 class="section">Running the Program</h3>
    162  1.1.1.2.4.2  snj 
    163  1.1.1.2.4.2  snj <p>To test and gain experience with Autokey concepts, log in as root and
    164  1.1.1.2.4.2  snj change to the keys directory, usually <code>/usr/local/etc</code>. 
    165  1.1.1.2.4.2  snj When run for the
    166  1.1.1.2.4.2  snj first time, or if all files with names beginning <code>ntpkey</code>] have been
    167  1.1.1.2.4.2  snj removed, use the <code>ntp-keygen</code> command without arguments to generate a
    168  1.1.1.2.4.2  snj default RSA host key and matching RSA-MD5 certificate with expiration
    169  1.1.1.2.4.2  snj date one year hence. 
    170  1.1.1.2.4.2  snj If run again without options, the program uses the
    171  1.1.1.2.4.2  snj existing keys and parameters and generates only a new certificate with
    172  1.1.1.2.4.2  snj new expiration date one year hence.
    173  1.1.1.2.4.2  snj 
    174  1.1.1.2.4.2  snj   <p>Run the command on as many hosts as necessary. 
    175  1.1.1.2.4.2  snj Designate one of them as the trusted host (TH) using <code>ntp-keygen</code>
    176  1.1.1.2.4.2  snj with the <code>-T</code> option and configure
    177  1.1.1.2.4.2  snj it to synchronize from reliable Internet servers. 
    178  1.1.1.2.4.2  snj Then configure the other hosts to synchronize to the TH directly or indirectly. 
    179  1.1.1.2.4.2  snj A certificate trail is created when Autokey asks the immediately
    180  1.1.1.2.4.2  snj ascendant host towards the TH to sign its certificate, which is then
    181  1.1.1.2.4.2  snj provided to the immediately descendant host on request. 
    182  1.1.1.2.4.2  snj All group hosts should have acyclic certificate trails ending on the TH.
    183  1.1.1.2.4.2  snj 
    184  1.1.1.2.4.2  snj   <p>The host key is used to encrypt the cookie when required and so must be
    185  1.1.1.2.4.2  snj RSA type. 
    186  1.1.1.2.4.2  snj By default, the host key is also the sign key used to encrypt signatures. 
    187  1.1.1.2.4.2  snj A different sign key can be assigned using the <code>-S</code> option
    188  1.1.1.2.4.2  snj and this can be either RSA or DSA type. 
    189  1.1.1.2.4.2  snj By default, the signature
    190  1.1.1.2.4.2  snj message digest type is MD5, but any combination of sign key type and
    191  1.1.1.2.4.2  snj message digest type supported by the OpenSSL library can be specified
    192  1.1.1.2.4.2  snj using the <code>-c</code> option.
    193  1.1.1.2.4.2  snj 
    194  1.1.1.2.4.2  snj   <p>The rules say cryptographic media should be generated with proventic
    195  1.1.1.2.4.2  snj filestamps, which means the host should already be synchronized before
    196  1.1.1.2.4.2  snj this program is run. 
    197  1.1.1.2.4.2  snj This of course creates a chicken-and-egg problem
    198  1.1.1.2.4.2  snj when the host is started for the first time. 
    199  1.1.1.2.4.2  snj Accordingly, the host time
    200  1.1.1.2.4.2  snj should be set by some other means, such as eyeball-and-wristwatch, at
    201  1.1.1.2.4.2  snj least so that the certificate lifetime is within the current year. 
    202  1.1.1.2.4.2  snj After that and when the host is synchronized to a proventic source, the
    203  1.1.1.2.4.2  snj certificate should be re-generated.
    204  1.1.1.2.4.2  snj 
    205  1.1.1.2.4.2  snj   <p>Additional information on trusted groups and identity schemes is on the
    206  1.1.1.2.4.2  snj Autokey Public-Key Authentication page.
    207  1.1.1.2.4.2  snj 
    208  1.1.1.2.4.2  snj <div class="node">
    209  1.1.1.2.4.2  snj <p><hr>
    210  1.1.1.2.4.2  snj <a name="ntp_002dkeygen-Invocation"></a>
    211  1.1.1.2.4.2  snj <br>
    212  1.1.1.2.4.2  snj </div>
    213  1.1.1.2.4.2  snj 
    214  1.1.1.2.4.2  snj <h3 class="section">Invoking ntp-keygen</h3>
    215  1.1.1.2.4.2  snj 
    216  1.1.1.2.4.2  snj <p><a name="index-ntp_002dkeygen-1"></a><a name="index-Create-a-NTP-host-key-2"></a>
    217  1.1.1.2.4.2  snj 
    218  1.1.1.2.4.2  snj   <p>This program generates cryptographic data files used by the NTPv4
    219  1.1.1.2.4.2  snj authentication and identification schemes. 
    220  1.1.1.2.4.2  snj It generates MD5 key files used in symmetric key cryptography. 
    221  1.1.1.2.4.2  snj In addition, if the OpenSSL software library has been installed,
    222  1.1.1.2.4.2  snj it generates keys, certificate and identity files used in public key
    223  1.1.1.2.4.2  snj cryptography. 
    224  1.1.1.2.4.2  snj These files are used for cookie encryption,
    225  1.1.1.2.4.2  snj digital signature and challenge/response identification algorithms
    226  1.1.1.2.4.2  snj compatible with the Internet standard security infrastructure.
    227  1.1.1.2.4.2  snj 
    228  1.1.1.2.4.2  snj   <p>All files are in PEM-encoded printable ASCII format,
    229  1.1.1.2.4.2  snj so they can be embedded as MIME attachments in mail to other sites
    230  1.1.1.2.4.2  snj and certificate authorities. 
    231  1.1.1.2.4.2  snj By default, files are not encrypted.
    232  1.1.1.2.4.2  snj 
    233  1.1.1.2.4.2  snj   <p>When used to generate message digest keys, the program produces a file
    234  1.1.1.2.4.2  snj containing ten pseudo-random printable ASCII strings suitable for the
    235  1.1.1.2.4.2  snj MD5 message digest algorithm included in the distribution. 
    236  1.1.1.2.4.2  snj If the OpenSSL library is installed, it produces an additional ten
    237  1.1.1.2.4.2  snj hex-encoded random bit strings suitable for the SHA1 and other message
    238  1.1.1.2.4.2  snj digest algorithms. 
    239  1.1.1.2.4.2  snj The message digest keys file must be distributed and stored
    240  1.1.1.2.4.2  snj using secure means beyond the scope of NTP itself. 
    241  1.1.1.2.4.2  snj Besides the keys used for ordinary NTP associations, additional keys
    242  1.1.1.2.4.2  snj can be defined as passwords for the
    243  1.1.1.2.4.2  snj <code>ntpq(1ntpqmdoc)</code>
    244  1.1.1.2.4.2  snj and
    245  1.1.1.2.4.2  snj <code>ntpdc(1ntpdcmdoc)</code>
    246  1.1.1.2.4.2  snj utility programs.
    247  1.1.1.2.4.2  snj 
    248  1.1.1.2.4.2  snj   <p>The remaining generated files are compatible with other OpenSSL
    249  1.1.1.2.4.2  snj applications and other Public Key Infrastructure (PKI) resources. 
    250  1.1.1.2.4.2  snj Certificates generated by this program are compatible with extant
    251  1.1.1.2.4.2  snj industry practice, although some users might find the interpretation of
    252  1.1.1.2.4.2  snj X509v3 extension fields somewhat liberal. 
    253  1.1.1.2.4.2  snj However, the identity keys are probably not compatible with anything
    254  1.1.1.2.4.2  snj other than Autokey.
    255  1.1.1.2.4.2  snj 
    256  1.1.1.2.4.2  snj   <p>Some files used by this program are encrypted using a private password. 
    257  1.1.1.2.4.2  snj The
    258  1.1.1.2.4.2  snj <code>-p</code>
    259  1.1.1.2.4.2  snj option specifies the password for local encrypted files and the
    260  1.1.1.2.4.2  snj <code>-q</code>
    261  1.1.1.2.4.2  snj option the password for encrypted files sent to remote sites. 
    262  1.1.1.2.4.2  snj If no password is specified, the host name returned by the Unix
    263  1.1.1.2.4.2  snj <code>gethostname()</code>
    264  1.1.1.2.4.2  snj function, normally the DNS name of the host is used.
    265  1.1.1.2.4.2  snj 
    266  1.1.1.2.4.2  snj   <p>The
    267  1.1.1.2.4.2  snj <kbd>pw</kbd>
    268  1.1.1.2.4.2  snj option of the
    269  1.1.1.2.4.2  snj <kbd>crypto</kbd>
    270  1.1.1.2.4.2  snj configuration command specifies the read
    271  1.1.1.2.4.2  snj password for previously encrypted local files. 
    272  1.1.1.2.4.2  snj This must match the local password used by this program. 
    273  1.1.1.2.4.2  snj If not specified, the host name is used. 
    274  1.1.1.2.4.2  snj Thus, if files are generated by this program without password,
    275  1.1.1.2.4.2  snj they can be read back by
    276  1.1.1.2.4.2  snj <kbd>ntpd</kbd>
    277  1.1.1.2.4.2  snj without password but only on the same host.
    278  1.1.1.2.4.2  snj 
    279  1.1.1.2.4.2  snj   <p>Normally, encrypted files for each host are generated by that host and
    280  1.1.1.2.4.2  snj used only by that host, although exceptions exist as noted later on
    281  1.1.1.2.4.2  snj this page. 
    282  1.1.1.2.4.2  snj The symmetric keys file, normally called
    283  1.1.1.2.4.2  snj <kbd>ntp.keys</kbd>,
    284  1.1.1.2.4.2  snj is usually installed in
    285  1.1.1.2.4.2  snj <span class="file">/etc</span>. 
    286  1.1.1.2.4.2  snj Other files and links are usually installed in
    287  1.1.1.2.4.2  snj <span class="file">/usr/local/etc</span>,
    288  1.1.1.2.4.2  snj which is normally in a shared filesystem in
    289  1.1.1.2.4.2  snj NFS-mounted networks and cannot be changed by shared clients. 
    290  1.1.1.2.4.2  snj The location of the keys directory can be changed by the
    291  1.1.1.2.4.2  snj <kbd>keysdir</kbd>
    292  1.1.1.2.4.2  snj configuration command in such cases. 
    293  1.1.1.2.4.2  snj Normally, this is in
    294  1.1.1.2.4.2  snj <span class="file">/etc</span>.
    295  1.1.1.2.4.2  snj 
    296  1.1.1.2.4.2  snj   <p>This program directs commentary and error messages to the standard
    297  1.1.1.2.4.2  snj error stream
    298  1.1.1.2.4.2  snj <kbd>stderr</kbd>
    299  1.1.1.2.4.2  snj and remote files to the standard output stream
    300  1.1.1.2.4.2  snj <kbd>stdout</kbd>
    301  1.1.1.2.4.2  snj where they can be piped to other applications or redirected to files. 
    302  1.1.1.2.4.2  snj The names used for generated files and links all begin with the
    303  1.1.1.2.4.2  snj string
    304  1.1.1.2.4.2  snj <kbd>ntpkey</kbd>
    305  1.1.1.2.4.2  snj and include the file type, generating host and filestamp,
    306  1.1.1.2.4.2  snj as described in the
    307  1.1.1.2.4.2  snj Cryptographic Data Files
    308  1.1.1.2.4.2  snj section below.
    309  1.1.1.2.4.2  snj 
    310  1.1.1.2.4.2  snj <h5 class="subsubsection">Running the Program</h5>
    311  1.1.1.2.4.2  snj 
    312  1.1.1.2.4.2  snj <p>To test and gain experience with Autokey concepts, log in as root and
    313  1.1.1.2.4.2  snj change to the keys directory, usually
    314  1.1.1.2.4.2  snj <span class="file">/usr/local/etc</span>
    315  1.1.1.2.4.2  snj When run for the first time, or if all files with names beginning with
    316  1.1.1.2.4.2  snj <kbd>ntpkey</kbd>
    317  1.1.1.2.4.2  snj have been removed, use the
    318  1.1.1.2.4.2  snj <code>ntp-keygen</code>
    319  1.1.1.2.4.2  snj command without arguments to generate a
    320  1.1.1.2.4.2  snj default RSA host key and matching RSA-MD5 certificate with expiration
    321  1.1.1.2.4.2  snj date one year hence. 
    322  1.1.1.2.4.2  snj If run again without options, the program uses the
    323  1.1.1.2.4.2  snj existing keys and parameters and generates only a new certificate with
    324  1.1.1.2.4.2  snj new expiration date one year hence.
    325  1.1.1.2.4.2  snj 
    326  1.1.1.2.4.2  snj   <p>Run the command on as many hosts as necessary. 
    327  1.1.1.2.4.2  snj Designate one of them as the trusted host (TH) using
    328  1.1.1.2.4.2  snj <code>ntp-keygen</code>
    329  1.1.1.2.4.2  snj with the
    330  1.1.1.2.4.2  snj <code>-T</code>
    331  1.1.1.2.4.2  snj option and configure it to synchronize from reliable Internet servers. 
    332  1.1.1.2.4.2  snj Then configure the other hosts to synchronize to the TH directly or
    333  1.1.1.2.4.2  snj indirectly. 
    334  1.1.1.2.4.2  snj A certificate trail is created when Autokey asks the immediately
    335  1.1.1.2.4.2  snj ascendant host towards the TH to sign its certificate, which is then
    336  1.1.1.2.4.2  snj provided to the immediately descendant host on request. 
    337  1.1.1.2.4.2  snj All group hosts should have acyclic certificate trails ending on the TH.
    338  1.1.1.2.4.2  snj 
    339  1.1.1.2.4.2  snj   <p>The host key is used to encrypt the cookie when required and so must be
    340  1.1.1.2.4.2  snj RSA type. 
    341  1.1.1.2.4.2  snj By default, the host key is also the sign key used to encrypt
    342  1.1.1.2.4.2  snj signatures. 
    343  1.1.1.2.4.2  snj A different sign key can be assigned using the
    344  1.1.1.2.4.2  snj <code>-S</code>
    345  1.1.1.2.4.2  snj option and this can be either RSA or DSA type. 
    346  1.1.1.2.4.2  snj By default, the signature
    347  1.1.1.2.4.2  snj message digest type is MD5, but any combination of sign key type and
    348  1.1.1.2.4.2  snj message digest type supported by the OpenSSL library can be specified
    349  1.1.1.2.4.2  snj using the
    350  1.1.1.2.4.2  snj <code>-c</code>
    351  1.1.1.2.4.2  snj option. 
    352  1.1.1.2.4.2  snj The rules say cryptographic media should be generated with proventic
    353  1.1.1.2.4.2  snj filestamps, which means the host should already be synchronized before
    354  1.1.1.2.4.2  snj this program is run. 
    355  1.1.1.2.4.2  snj This of course creates a chicken-and-egg problem
    356  1.1.1.2.4.2  snj when the host is started for the first time. 
    357  1.1.1.2.4.2  snj Accordingly, the host time
    358  1.1.1.2.4.2  snj should be set by some other means, such as eyeball-and-wristwatch, at
    359  1.1.1.2.4.2  snj least so that the certificate lifetime is within the current year. 
    360  1.1.1.2.4.2  snj After that and when the host is synchronized to a proventic source, the
    361  1.1.1.2.4.2  snj certificate should be re-generated.
    362  1.1.1.2.4.2  snj 
    363  1.1.1.2.4.2  snj   <p>Additional information on trusted groups and identity schemes is on the
    364  1.1.1.2.4.2  snj Autokey Public-Key Authentication
    365  1.1.1.2.4.2  snj page.
    366  1.1.1.2.4.2  snj 
    367  1.1.1.2.4.2  snj   <p>The
    368  1.1.1.2.4.2  snj <code>ntpd(1ntpdmdoc)</code>
    369  1.1.1.2.4.2  snj configuration command
    370  1.1.1.2.4.2  snj <code>crypto</code> <code>pw</code> <kbd>password</kbd>
    371  1.1.1.2.4.2  snj specifies the read password for previously encrypted files. 
    372  1.1.1.2.4.2  snj The daemon expires on the spot if the password is missing
    373  1.1.1.2.4.2  snj or incorrect. 
    374  1.1.1.2.4.2  snj For convenience, if a file has been previously encrypted,
    375  1.1.1.2.4.2  snj the default read password is the name of the host running
    376  1.1.1.2.4.2  snj the program. 
    377  1.1.1.2.4.2  snj If the previous write password is specified as the host name,
    378  1.1.1.2.4.2  snj these files can be read by that host with no explicit password.
    379  1.1.1.2.4.2  snj 
    380  1.1.1.2.4.2  snj   <p>File names begin with the prefix
    381  1.1.1.2.4.2  snj <code>ntpkey_</code>
    382  1.1.1.2.4.2  snj and end with the postfix
    383  1.1.1.2.4.2  snj <kbd>_hostname.filestamp</kbd>,
    384  1.1.1.2.4.2  snj where
    385  1.1.1.2.4.2  snj <kbd>hostname</kbd>
    386  1.1.1.2.4.2  snj is the owner name, usually the string returned
    387  1.1.1.2.4.2  snj by the Unix gethostname() routine, and
    388  1.1.1.2.4.2  snj <kbd>filestamp</kbd>
    389  1.1.1.2.4.2  snj is the NTP seconds when the file was generated, in decimal digits. 
    390  1.1.1.2.4.2  snj This both guarantees uniqueness and simplifies maintenance
    391  1.1.1.2.4.2  snj procedures, since all files can be quickly removed
    392  1.1.1.2.4.2  snj by a
    393  1.1.1.2.4.2  snj <code>rm</code> <code>ntpkey*</code>
    394  1.1.1.2.4.2  snj command or all files generated
    395  1.1.1.2.4.2  snj at a specific time can be removed by a
    396  1.1.1.2.4.2  snj <code>rm</code>
    397  1.1.1.2.4.2  snj <kbd>*filestamp</kbd>
    398  1.1.1.2.4.2  snj command. 
    399  1.1.1.2.4.2  snj To further reduce the risk of misconfiguration,
    400  1.1.1.2.4.2  snj the first two lines of a file contain the file name
    401  1.1.1.2.4.2  snj and generation date and time as comments.
    402  1.1.1.2.4.2  snj 
    403  1.1.1.2.4.2  snj   <p>All files are installed by default in the keys directory
    404  1.1.1.2.4.2  snj <span class="file">/usr/local/etc</span>,
    405  1.1.1.2.4.2  snj which is normally in a shared filesystem
    406  1.1.1.2.4.2  snj in NFS-mounted networks. 
    407  1.1.1.2.4.2  snj The actual location of the keys directory
    408  1.1.1.2.4.2  snj and each file can be overridden by configuration commands,
    409  1.1.1.2.4.2  snj but this is not recommended. 
    410  1.1.1.2.4.2  snj Normally, the files for each host are generated by that host
    411  1.1.1.2.4.2  snj and used only by that host, although exceptions exist
    412  1.1.1.2.4.2  snj as noted later on this page.
    413  1.1.1.2.4.2  snj 
    414  1.1.1.2.4.2  snj   <p>Normally, files containing private values,
    415  1.1.1.2.4.2  snj including the host key, sign key and identification parameters,
    416  1.1.1.2.4.2  snj are permitted root read/write-only;
    417  1.1.1.2.4.2  snj while others containing public values are permitted world readable. 
    418  1.1.1.2.4.2  snj Alternatively, files containing private values can be encrypted
    419  1.1.1.2.4.2  snj and these files permitted world readable,
    420  1.1.1.2.4.2  snj which simplifies maintenance in shared file systems. 
    421  1.1.1.2.4.2  snj Since uniqueness is insured by the hostname and
    422  1.1.1.2.4.2  snj file name extensions, the files for a NFS server and
    423  1.1.1.2.4.2  snj dependent clients can all be installed in the same shared directory.
    424  1.1.1.2.4.2  snj 
    425  1.1.1.2.4.2  snj   <p>The recommended practice is to keep the file name extensions
    426  1.1.1.2.4.2  snj when installing a file and to install a soft link
    427  1.1.1.2.4.2  snj from the generic names specified elsewhere on this page
    428  1.1.1.2.4.2  snj to the generated files. 
    429  1.1.1.2.4.2  snj This allows new file generations to be activated simply
    430  1.1.1.2.4.2  snj by changing the link. 
    431  1.1.1.2.4.2  snj If a link is present, ntpd follows it to the file name
    432  1.1.1.2.4.2  snj to extract the filestamp. 
    433  1.1.1.2.4.2  snj If a link is not present,
    434  1.1.1.2.4.2  snj <code>ntpd(1ntpdmdoc)</code>
    435  1.1.1.2.4.2  snj extracts the filestamp from the file itself. 
    436  1.1.1.2.4.2  snj This allows clients to verify that the file and generation times
    437  1.1.1.2.4.2  snj are always current. 
    438  1.1.1.2.4.2  snj The
    439  1.1.1.2.4.2  snj <code>ntp-keygen</code>
    440  1.1.1.2.4.2  snj program uses the same timestamp extension for all files generated
    441  1.1.1.2.4.2  snj at one time, so each generation is distinct and can be readily
    442  1.1.1.2.4.2  snj recognized in monitoring data.
    443  1.1.1.2.4.2  snj 
    444  1.1.1.2.4.2  snj <h5 class="subsubsection">Running the program</h5>
    445  1.1.1.2.4.2  snj 
    446  1.1.1.2.4.2  snj <p>The safest way to run the
    447  1.1.1.2.4.2  snj <code>ntp-keygen</code>
    448  1.1.1.2.4.2  snj program is logged in directly as root. 
    449  1.1.1.2.4.2  snj The recommended procedure is change to the keys directory,
    450  1.1.1.2.4.2  snj usually
    451  1.1.1.2.4.2  snj <span class="file">/usr/local/etc</span>,
    452  1.1.1.2.4.2  snj then run the program. 
    453  1.1.1.2.4.2  snj When run for the first time,
    454  1.1.1.2.4.2  snj or if all
    455  1.1.1.2.4.2  snj <code>ntpkey</code>
    456  1.1.1.2.4.2  snj files have been removed,
    457  1.1.1.2.4.2  snj the program generates a RSA host key file and matching RSA-MD5 certificate file,
    458  1.1.1.2.4.2  snj which is all that is necessary in many cases. 
    459  1.1.1.2.4.2  snj The program also generates soft links from the generic names
    460  1.1.1.2.4.2  snj to the respective files. 
    461  1.1.1.2.4.2  snj If run again, the program uses the same host key file,
    462  1.1.1.2.4.2  snj but generates a new certificate file and link.
    463  1.1.1.2.4.2  snj 
    464  1.1.1.2.4.2  snj   <p>The host key is used to encrypt the cookie when required and so must be RSA type. 
    465  1.1.1.2.4.2  snj By default, the host key is also the sign key used to encrypt signatures. 
    466  1.1.1.2.4.2  snj When necessary, a different sign key can be specified and this can be
    467  1.1.1.2.4.2  snj either RSA or DSA type. 
    468  1.1.1.2.4.2  snj By default, the message digest type is MD5, but any combination
    469  1.1.1.2.4.2  snj of sign key type and message digest type supported by the OpenSSL library
    470  1.1.1.2.4.2  snj can be specified, including those using the MD2, MD5, SHA, SHA1, MDC2
    471  1.1.1.2.4.2  snj and RIPE160 message digest algorithms. 
    472  1.1.1.2.4.2  snj However, the scheme specified in the certificate must be compatible
    473  1.1.1.2.4.2  snj with the sign key. 
    474  1.1.1.2.4.2  snj Certificates using any digest algorithm are compatible with RSA sign keys;
    475  1.1.1.2.4.2  snj however, only SHA and SHA1 certificates are compatible with DSA sign keys.
    476  1.1.1.2.4.2  snj 
    477  1.1.1.2.4.2  snj   <p>Private/public key files and certificates are compatible with
    478  1.1.1.2.4.2  snj other OpenSSL applications and very likely other libraries as well. 
    479  1.1.1.2.4.2  snj Certificates or certificate requests derived from them should be compatible
    480  1.1.1.2.4.2  snj with extant industry practice, although some users might find
    481  1.1.1.2.4.2  snj the interpretation of X509v3 extension fields somewhat liberal. 
    482  1.1.1.2.4.2  snj However, the identification parameter files, although encoded
    483  1.1.1.2.4.2  snj as the other files, are probably not compatible with anything other than Autokey.
    484  1.1.1.2.4.2  snj 
    485  1.1.1.2.4.2  snj   <p>Running the program as other than root and using the Unix
    486  1.1.1.2.4.2  snj <code>su</code>
    487  1.1.1.2.4.2  snj command
    488  1.1.1.2.4.2  snj to assume root may not work properly, since by default the OpenSSL library
    489  1.1.1.2.4.2  snj looks for the random seed file
    490  1.1.1.2.4.2  snj <code>.rnd</code>
    491  1.1.1.2.4.2  snj in the user home directory. 
    492  1.1.1.2.4.2  snj However, there should be only one
    493  1.1.1.2.4.2  snj <code>.rnd</code>,
    494  1.1.1.2.4.2  snj most conveniently
    495  1.1.1.2.4.2  snj in the root directory, so it is convenient to define the
    496  1.1.1.2.4.2  snj <code>$RANDFILE</code>
    497  1.1.1.2.4.2  snj environment variable used by the OpenSSL library as the path to
    498  1.1.1.2.4.2  snj <code>/.rnd</code>.
    499  1.1.1.2.4.2  snj 
    500  1.1.1.2.4.2  snj   <p>Installing the keys as root might not work in NFS-mounted
    501  1.1.1.2.4.2  snj shared file systems, as NFS clients may not be able to write
    502  1.1.1.2.4.2  snj to the shared keys directory, even as root. 
    503  1.1.1.2.4.2  snj In this case, NFS clients can specify the files in another
    504  1.1.1.2.4.2  snj directory such as
    505  1.1.1.2.4.2  snj <span class="file">/etc</span>
    506  1.1.1.2.4.2  snj using the
    507  1.1.1.2.4.2  snj <code>keysdir</code>
    508  1.1.1.2.4.2  snj command. 
    509  1.1.1.2.4.2  snj There is no need for one client to read the keys and certificates
    510  1.1.1.2.4.2  snj of other clients or servers, as these data are obtained automatically
    511  1.1.1.2.4.2  snj by the Autokey protocol.
    512  1.1.1.2.4.2  snj 
    513  1.1.1.2.4.2  snj   <p>Ordinarily, cryptographic files are generated by the host that uses them,
    514  1.1.1.2.4.2  snj but it is possible for a trusted agent (TA) to generate these files
    515  1.1.1.2.4.2  snj for other hosts; however, in such cases files should always be encrypted. 
    516  1.1.1.2.4.2  snj The subject name and trusted name default to the hostname
    517  1.1.1.2.4.2  snj of the host generating the files, but can be changed by command line options. 
    518  1.1.1.2.4.2  snj It is convenient to designate the owner name and trusted name
    519  1.1.1.2.4.2  snj as the subject and issuer fields, respectively, of the certificate. 
    520  1.1.1.2.4.2  snj The owner name is also used for the host and sign key files,
    521  1.1.1.2.4.2  snj while the trusted name is used for the identity files.
    522  1.1.1.2.4.2  snj 
    523  1.1.1.2.4.2  snj   <p>All files are installed by default in the keys directory
    524  1.1.1.2.4.2  snj <span class="file">/usr/local/etc</span>,
    525  1.1.1.2.4.2  snj which is normally in a shared filesystem
    526  1.1.1.2.4.2  snj in NFS-mounted networks. 
    527  1.1.1.2.4.2  snj The actual location of the keys directory
    528  1.1.1.2.4.2  snj and each file can be overridden by configuration commands,
    529  1.1.1.2.4.2  snj but this is not recommended. 
    530  1.1.1.2.4.2  snj Normally, the files for each host are generated by that host
    531  1.1.1.2.4.2  snj and used only by that host, although exceptions exist
    532  1.1.1.2.4.2  snj as noted later on this page.
    533  1.1.1.2.4.2  snj 
    534  1.1.1.2.4.2  snj   <p>Normally, files containing private values,
    535  1.1.1.2.4.2  snj including the host key, sign key and identification parameters,
    536  1.1.1.2.4.2  snj are permitted root read/write-only;
    537  1.1.1.2.4.2  snj while others containing public values are permitted world readable. 
    538  1.1.1.2.4.2  snj Alternatively, files containing private values can be encrypted
    539  1.1.1.2.4.2  snj and these files permitted world readable,
    540  1.1.1.2.4.2  snj which simplifies maintenance in shared file systems. 
    541  1.1.1.2.4.2  snj Since uniqueness is insured by the hostname and
    542  1.1.1.2.4.2  snj file name extensions, the files for a NFS server and
    543  1.1.1.2.4.2  snj dependent clients can all be installed in the same shared directory.
    544  1.1.1.2.4.2  snj 
    545  1.1.1.2.4.2  snj   <p>The recommended practice is to keep the file name extensions
    546  1.1.1.2.4.2  snj when installing a file and to install a soft link
    547  1.1.1.2.4.2  snj from the generic names specified elsewhere on this page
    548  1.1.1.2.4.2  snj to the generated files. 
    549  1.1.1.2.4.2  snj This allows new file generations to be activated simply
    550  1.1.1.2.4.2  snj by changing the link. 
    551  1.1.1.2.4.2  snj If a link is present, ntpd follows it to the file name
    552  1.1.1.2.4.2  snj to extract the filestamp. 
    553  1.1.1.2.4.2  snj If a link is not present,
    554  1.1.1.2.4.2  snj <code>ntpd(1ntpdmdoc)</code>
    555  1.1.1.2.4.2  snj extracts the filestamp from the file itself. 
    556  1.1.1.2.4.2  snj This allows clients to verify that the file and generation times
    557  1.1.1.2.4.2  snj are always current. 
    558  1.1.1.2.4.2  snj The
    559  1.1.1.2.4.2  snj <code>ntp-keygen</code>
    560  1.1.1.2.4.2  snj program uses the same timestamp extension for all files generated
    561  1.1.1.2.4.2  snj at one time, so each generation is distinct and can be readily
    562  1.1.1.2.4.2  snj recognized in monitoring data.
    563  1.1.1.2.4.2  snj 
    564  1.1.1.2.4.2  snj <h5 class="subsubsection">Running the program</h5>
    565  1.1.1.2.4.2  snj 
    566  1.1.1.2.4.2  snj <p>The safest way to run the
    567  1.1.1.2.4.2  snj <code>ntp-keygen</code>
    568  1.1.1.2.4.2  snj program is logged in directly as root. 
    569  1.1.1.2.4.2  snj The recommended procedure is change to the keys directory,
    570  1.1.1.2.4.2  snj usually
    571  1.1.1.2.4.2  snj <span class="file">/usr/local/etc</span>,
    572  1.1.1.2.4.2  snj then run the program. 
    573  1.1.1.2.4.2  snj When run for the first time,
    574  1.1.1.2.4.2  snj or if all
    575  1.1.1.2.4.2  snj <code>ntpkey</code>
    576  1.1.1.2.4.2  snj files have been removed,
    577  1.1.1.2.4.2  snj the program generates a RSA host key file and matching RSA-MD5 certificate file,
    578  1.1.1.2.4.2  snj which is all that is necessary in many cases. 
    579  1.1.1.2.4.2  snj The program also generates soft links from the generic names
    580  1.1.1.2.4.2  snj to the respective files. 
    581  1.1.1.2.4.2  snj If run again, the program uses the same host key file,
    582  1.1.1.2.4.2  snj but generates a new certificate file and link.
    583  1.1.1.2.4.2  snj 
    584  1.1.1.2.4.2  snj   <p>The host key is used to encrypt the cookie when required and so must be RSA type. 
    585  1.1.1.2.4.2  snj By default, the host key is also the sign key used to encrypt signatures. 
    586  1.1.1.2.4.2  snj When necessary, a different sign key can be specified and this can be
    587  1.1.1.2.4.2  snj either RSA or DSA type. 
    588  1.1.1.2.4.2  snj By default, the message digest type is MD5, but any combination
    589  1.1.1.2.4.2  snj of sign key type and message digest type supported by the OpenSSL library
    590  1.1.1.2.4.2  snj can be specified, including those using the MD2, MD5, SHA, SHA1, MDC2
    591  1.1.1.2.4.2  snj and RIPE160 message digest algorithms. 
    592  1.1.1.2.4.2  snj However, the scheme specified in the certificate must be compatible
    593  1.1.1.2.4.2  snj with the sign key. 
    594  1.1.1.2.4.2  snj Certificates using any digest algorithm are compatible with RSA sign keys;
    595  1.1.1.2.4.2  snj however, only SHA and SHA1 certificates are compatible with DSA sign keys.
    596  1.1.1.2.4.2  snj 
    597  1.1.1.2.4.2  snj   <p>Private/public key files and certificates are compatible with
    598  1.1.1.2.4.2  snj other OpenSSL applications and very likely other libraries as well. 
    599  1.1.1.2.4.2  snj Certificates or certificate requests derived from them should be compatible
    600  1.1.1.2.4.2  snj with extant industry practice, although some users might find
    601  1.1.1.2.4.2  snj the interpretation of X509v3 extension fields somewhat liberal. 
    602  1.1.1.2.4.2  snj However, the identification parameter files, although encoded
    603  1.1.1.2.4.2  snj as the other files, are probably not compatible with anything other than Autokey.
    604  1.1.1.2.4.2  snj 
    605  1.1.1.2.4.2  snj   <p>Running the program as other than root and using the Unix
    606  1.1.1.2.4.2  snj <code>su</code>
    607  1.1.1.2.4.2  snj command
    608  1.1.1.2.4.2  snj to assume root may not work properly, since by default the OpenSSL library
    609  1.1.1.2.4.2  snj looks for the random seed file
    610  1.1.1.2.4.2  snj <code>.rnd</code>
    611  1.1.1.2.4.2  snj in the user home directory. 
    612  1.1.1.2.4.2  snj However, there should be only one
    613  1.1.1.2.4.2  snj <code>.rnd</code>,
    614  1.1.1.2.4.2  snj most conveniently
    615  1.1.1.2.4.2  snj in the root directory, so it is convenient to define the
    616  1.1.1.2.4.2  snj <code>$RANDFILE</code>
    617  1.1.1.2.4.2  snj environment variable used by the OpenSSL library as the path to
    618  1.1.1.2.4.2  snj <code>/.rnd</code>.
    619  1.1.1.2.4.2  snj 
    620  1.1.1.2.4.2  snj   <p>Installing the keys as root might not work in NFS-mounted
    621  1.1.1.2.4.2  snj shared file systems, as NFS clients may not be able to write
    622  1.1.1.2.4.2  snj to the shared keys directory, even as root. 
    623  1.1.1.2.4.2  snj In this case, NFS clients can specify the files in another
    624  1.1.1.2.4.2  snj directory such as
    625  1.1.1.2.4.2  snj <span class="file">/etc</span>
    626  1.1.1.2.4.2  snj using the
    627  1.1.1.2.4.2  snj <code>keysdir</code>
    628  1.1.1.2.4.2  snj command. 
    629  1.1.1.2.4.2  snj There is no need for one client to read the keys and certificates
    630  1.1.1.2.4.2  snj of other clients or servers, as these data are obtained automatically
    631  1.1.1.2.4.2  snj by the Autokey protocol.
    632  1.1.1.2.4.2  snj 
    633  1.1.1.2.4.2  snj   <p>Ordinarily, cryptographic files are generated by the host that uses them,
    634  1.1.1.2.4.2  snj but it is possible for a trusted agent (TA) to generate these files
    635  1.1.1.2.4.2  snj for other hosts; however, in such cases files should always be encrypted. 
    636  1.1.1.2.4.2  snj The subject name and trusted name default to the hostname
    637  1.1.1.2.4.2  snj of the host generating the files, but can be changed by command line options. 
    638  1.1.1.2.4.2  snj It is convenient to designate the owner name and trusted name
    639  1.1.1.2.4.2  snj as the subject and issuer fields, respectively, of the certificate. 
    640  1.1.1.2.4.2  snj The owner name is also used for the host and sign key files,
    641  1.1.1.2.4.2  snj while the trusted name is used for the identity files. 
    642  1.1.1.2.4.2  snj seconds. 
    643  1.1.1.2.4.2  snj seconds.
    644  1.1.1.2.4.2  snj 
    645  1.1.1.2.4.2  snj   <p>s Trusted Hosts and Groups
    646  1.1.1.2.4.2  snj Each cryptographic configuration involves selection of a signature scheme
    647  1.1.1.2.4.2  snj and identification scheme, called a cryptotype,
    648  1.1.1.2.4.2  snj as explained in the
    649  1.1.1.2.4.2  snj <a href="#Authentication-Options">Authentication Options</a>
    650  1.1.1.2.4.2  snj section of
    651  1.1.1.2.4.2  snj <code>ntp.conf(5)</code>. 
    652  1.1.1.2.4.2  snj The default cryptotype uses RSA encryption, MD5 message digest
    653  1.1.1.2.4.2  snj and TC identification. 
    654  1.1.1.2.4.2  snj First, configure a NTP subnet including one or more low-stratum
    655  1.1.1.2.4.2  snj trusted hosts from which all other hosts derive synchronization
    656  1.1.1.2.4.2  snj directly or indirectly. 
    657  1.1.1.2.4.2  snj Trusted hosts have trusted certificates;
    658  1.1.1.2.4.2  snj all other hosts have nontrusted certificates. 
    659  1.1.1.2.4.2  snj These hosts will automatically and dynamically build authoritative
    660  1.1.1.2.4.2  snj certificate trails to one or more trusted hosts. 
    661  1.1.1.2.4.2  snj A trusted group is the set of all hosts that have, directly or indirectly,
    662  1.1.1.2.4.2  snj a certificate trail ending at a trusted host. 
    663  1.1.1.2.4.2  snj The trail is defined by static configuration file entries
    664  1.1.1.2.4.2  snj or dynamic means described on the
    665  1.1.1.2.4.2  snj <a href="#Automatic-NTP-Configuration-Options">Automatic NTP Configuration Options</a>
    666  1.1.1.2.4.2  snj section of
    667  1.1.1.2.4.2  snj <code>ntp.conf(5)</code>.
    668  1.1.1.2.4.2  snj 
    669  1.1.1.2.4.2  snj   <p>On each trusted host as root, change to the keys directory. 
    670  1.1.1.2.4.2  snj To insure a fresh fileset, remove all
    671  1.1.1.2.4.2  snj <code>ntpkey</code>
    672  1.1.1.2.4.2  snj files. 
    673  1.1.1.2.4.2  snj Then run
    674  1.1.1.2.4.2  snj <code>ntp-keygen</code>
    675  1.1.1.2.4.2  snj <code>-T</code>
    676  1.1.1.2.4.2  snj to generate keys and a trusted certificate. 
    677  1.1.1.2.4.2  snj On all other hosts do the same, but leave off the
    678  1.1.1.2.4.2  snj <code>-T</code>
    679  1.1.1.2.4.2  snj flag to generate keys and nontrusted certificates. 
    680  1.1.1.2.4.2  snj When complete, start the NTP daemons beginning at the lowest stratum
    681  1.1.1.2.4.2  snj and working up the tree. 
    682  1.1.1.2.4.2  snj It may take some time for Autokey to instantiate the certificate trails
    683  1.1.1.2.4.2  snj throughout the subnet, but setting up the environment is completely automatic.
    684  1.1.1.2.4.2  snj 
    685  1.1.1.2.4.2  snj   <p>If it is necessary to use a different sign key or different digest/signature
    686  1.1.1.2.4.2  snj scheme than the default, run
    687  1.1.1.2.4.2  snj <code>ntp-keygen</code>
    688  1.1.1.2.4.2  snj with the
    689  1.1.1.2.4.2  snj <code>-S</code> <kbd>type</kbd>
    690  1.1.1.2.4.2  snj option, where
    691  1.1.1.2.4.2  snj <kbd>type</kbd>
    692  1.1.1.2.4.2  snj is either
    693  1.1.1.2.4.2  snj <code>RSA</code>
    694  1.1.1.2.4.2  snj or
    695  1.1.1.2.4.2  snj <code>DSA</code>. 
    696  1.1.1.2.4.2  snj The most often need to do this is when a DSA-signed certificate is used. 
    697  1.1.1.2.4.2  snj If it is necessary to use a different certificate scheme than the default,
    698  1.1.1.2.4.2  snj run
    699  1.1.1.2.4.2  snj <code>ntp-keygen</code>
    700  1.1.1.2.4.2  snj with the
    701  1.1.1.2.4.2  snj <code>-c</code> <kbd>scheme</kbd>
    702  1.1.1.2.4.2  snj option and selected
    703  1.1.1.2.4.2  snj <kbd>scheme</kbd>
    704  1.1.1.2.4.2  snj as needed. 
    705  1.1.1.2.4.2  snj f
    706  1.1.1.2.4.2  snj <code>ntp-keygen</code>
    707  1.1.1.2.4.2  snj is run again without these options, it generates a new certificate
    708  1.1.1.2.4.2  snj using the same scheme and sign key.
    709  1.1.1.2.4.2  snj 
    710  1.1.1.2.4.2  snj   <p>After setting up the environment it is advisable to update certificates
    711  1.1.1.2.4.2  snj from time to time, if only to extend the validity interval. 
    712  1.1.1.2.4.2  snj Simply run
    713  1.1.1.2.4.2  snj <code>ntp-keygen</code>
    714  1.1.1.2.4.2  snj with the same flags as before to generate new certificates
    715  1.1.1.2.4.2  snj using existing keys. 
    716  1.1.1.2.4.2  snj However, if the host or sign key is changed,
    717  1.1.1.2.4.2  snj <code>ntpd(1ntpdmdoc)</code>
    718  1.1.1.2.4.2  snj should be restarted. 
    719  1.1.1.2.4.2  snj When
    720  1.1.1.2.4.2  snj <code>ntpd(1ntpdmdoc)</code>
    721  1.1.1.2.4.2  snj is restarted, it loads any new files and restarts the protocol. 
    722  1.1.1.2.4.2  snj Other dependent hosts will continue as usual until signatures are refreshed,
    723  1.1.1.2.4.2  snj at which time the protocol is restarted.
    724  1.1.1.2.4.2  snj 
    725  1.1.1.2.4.2  snj <h5 class="subsubsection">Identity Schemes</h5>
    726  1.1.1.2.4.2  snj 
    727  1.1.1.2.4.2  snj <p>As mentioned on the Autonomous Authentication page,
    728  1.1.1.2.4.2  snj the default TC identity scheme is vulnerable to a middleman attack. 
    729  1.1.1.2.4.2  snj However, there are more secure identity schemes available,
    730  1.1.1.2.4.2  snj including PC, IFF, GQ and MV described on the
    731  1.1.1.2.4.2  snj "Identification Schemes"
    732  1.1.1.2.4.2  snj page
    733  1.1.1.2.4.2  snj (maybe available at
    734  1.1.1.2.4.2  snj <code>http://www.eecis.udel.edu/%7emills/keygen.html</code>). 
    735  1.1.1.2.4.2  snj These schemes are based on a TA, one or more trusted hosts
    736  1.1.1.2.4.2  snj and some number of nontrusted hosts. 
    737  1.1.1.2.4.2  snj Trusted hosts prove identity using values provided by the TA,
    738  1.1.1.2.4.2  snj while the remaining hosts prove identity using values provided
    739  1.1.1.2.4.2  snj by a trusted host and certificate trails that end on that host. 
    740  1.1.1.2.4.2  snj The name of a trusted host is also the name of its sugroup
    741  1.1.1.2.4.2  snj and also the subject and issuer name on its trusted certificate. 
    742  1.1.1.2.4.2  snj The TA is not necessarily a trusted host in this sense, but often is.
    743  1.1.1.2.4.2  snj 
    744  1.1.1.2.4.2  snj   <p>In some schemes there are separate keys for servers and clients. 
    745  1.1.1.2.4.2  snj A server can also be a client of another server,
    746  1.1.1.2.4.2  snj but a client can never be a server for another client. 
    747  1.1.1.2.4.2  snj In general, trusted hosts and nontrusted hosts that operate
    748  1.1.1.2.4.2  snj as both server and client have parameter files that contain
    749  1.1.1.2.4.2  snj both server and client keys. 
    750  1.1.1.2.4.2  snj Hosts that operate
    751  1.1.1.2.4.2  snj only as clients have key files that contain only client keys.
    752  1.1.1.2.4.2  snj 
    753  1.1.1.2.4.2  snj   <p>The PC scheme supports only one trusted host in the group. 
    754  1.1.1.2.4.2  snj On trusted host alice run
    755  1.1.1.2.4.2  snj <code>ntp-keygen</code>
    756  1.1.1.2.4.2  snj <code>-P</code>
    757  1.1.1.2.4.2  snj <code>-p</code> <kbd>password</kbd>
    758  1.1.1.2.4.2  snj to generate the host key file
    759  1.1.1.2.4.2  snj <span class="file">ntpkey_RSAkey_</span><kbd>alice.filestamp</kbd>
    760  1.1.1.2.4.2  snj and trusted private certificate file
    761  1.1.1.2.4.2  snj <span class="file">ntpkey_RSA-MD5_cert_</span><kbd>alice.filestamp</kbd>. 
    762  1.1.1.2.4.2  snj Copy both files to all group hosts;
    763  1.1.1.2.4.2  snj they replace the files which would be generated in other schemes. 
    764  1.1.1.2.4.2  snj On each host bob install a soft link from the generic name
    765  1.1.1.2.4.2  snj <span class="file">ntpkey_host_</span><kbd>bob</kbd>
    766  1.1.1.2.4.2  snj to the host key file and soft link
    767  1.1.1.2.4.2  snj <span class="file">ntpkey_cert_</span><kbd>bob</kbd>
    768  1.1.1.2.4.2  snj to the private certificate file. 
    769  1.1.1.2.4.2  snj Note the generic links are on bob, but point to files generated
    770  1.1.1.2.4.2  snj by trusted host alice. 
    771  1.1.1.2.4.2  snj In this scheme it is not possible to refresh
    772  1.1.1.2.4.2  snj either the keys or certificates without copying them
    773  1.1.1.2.4.2  snj to all other hosts in the group.
    774  1.1.1.2.4.2  snj 
    775  1.1.1.2.4.2  snj   <p>For the IFF scheme proceed as in the TC scheme to generate keys
    776  1.1.1.2.4.2  snj and certificates for all group hosts, then for every trusted host in the group,
    777  1.1.1.2.4.2  snj generate the IFF parameter file. 
    778  1.1.1.2.4.2  snj On trusted host alice run
    779  1.1.1.2.4.2  snj <code>ntp-keygen</code>
    780  1.1.1.2.4.2  snj <code>-T</code>
    781  1.1.1.2.4.2  snj <code>-I</code>
    782  1.1.1.2.4.2  snj <code>-p</code> <kbd>password</kbd>
    783  1.1.1.2.4.2  snj to produce her parameter file
    784  1.1.1.2.4.2  snj <span class="file">ntpkey_IFFpar_</span><kbd>alice.filestamp</kbd>,
    785  1.1.1.2.4.2  snj which includes both server and client keys. 
    786  1.1.1.2.4.2  snj Copy this file to all group hosts that operate as both servers
    787  1.1.1.2.4.2  snj and clients and install a soft link from the generic
    788  1.1.1.2.4.2  snj <span class="file">ntpkey_iff_</span><kbd>alice</kbd>
    789  1.1.1.2.4.2  snj to this file. 
    790  1.1.1.2.4.2  snj If there are no hosts restricted to operate only as clients,
    791  1.1.1.2.4.2  snj there is nothing further to do. 
    792  1.1.1.2.4.2  snj As the IFF scheme is independent
    793  1.1.1.2.4.2  snj of keys and certificates, these files can be refreshed as needed.
    794  1.1.1.2.4.2  snj 
    795  1.1.1.2.4.2  snj   <p>If a rogue client has the parameter file, it could masquerade
    796  1.1.1.2.4.2  snj as a legitimate server and present a middleman threat. 
    797  1.1.1.2.4.2  snj To eliminate this threat, the client keys can be extracted
    798  1.1.1.2.4.2  snj from the parameter file and distributed to all restricted clients. 
    799  1.1.1.2.4.2  snj After generating the parameter file, on alice run
    800  1.1.1.2.4.2  snj <code>ntp-keygen</code>
    801  1.1.1.2.4.2  snj <code>-e</code>
    802  1.1.1.2.4.2  snj and pipe the output to a file or mail program. 
    803  1.1.1.2.4.2  snj Copy or mail this file to all restricted clients. 
    804  1.1.1.2.4.2  snj On these clients install a soft link from the generic
    805  1.1.1.2.4.2  snj <span class="file">ntpkey_iff_</span><kbd>alice</kbd>
    806  1.1.1.2.4.2  snj to this file. 
    807  1.1.1.2.4.2  snj To further protect the integrity of the keys,
    808  1.1.1.2.4.2  snj each file can be encrypted with a secret password.
    809  1.1.1.2.4.2  snj 
    810  1.1.1.2.4.2  snj   <p>For the GQ scheme proceed as in the TC scheme to generate keys
    811  1.1.1.2.4.2  snj and certificates for all group hosts, then for every trusted host
    812  1.1.1.2.4.2  snj in the group, generate the IFF parameter file. 
    813  1.1.1.2.4.2  snj On trusted host alice run
    814  1.1.1.2.4.2  snj <code>ntp-keygen</code>
    815  1.1.1.2.4.2  snj <code>-T</code>
    816  1.1.1.2.4.2  snj <code>-G</code>
    817  1.1.1.2.4.2  snj <code>-p</code> <kbd>password</kbd>
    818  1.1.1.2.4.2  snj to produce her parameter file
    819  1.1.1.2.4.2  snj <span class="file">ntpkey_GQpar_</span><kbd>alice.filestamp</kbd>,
    820  1.1.1.2.4.2  snj which includes both server and client keys. 
    821  1.1.1.2.4.2  snj Copy this file to all group hosts and install a soft link
    822  1.1.1.2.4.2  snj from the generic
    823  1.1.1.2.4.2  snj <span class="file">ntpkey_gq_</span><kbd>alice</kbd>
    824  1.1.1.2.4.2  snj to this file. 
    825  1.1.1.2.4.2  snj In addition, on each host bob install a soft link
    826  1.1.1.2.4.2  snj from generic
    827  1.1.1.2.4.2  snj <span class="file">ntpkey_gq_</span><kbd>bob</kbd>
    828  1.1.1.2.4.2  snj to this file. 
    829  1.1.1.2.4.2  snj As the GQ scheme updates the GQ parameters file and certificate
    830  1.1.1.2.4.2  snj at the same time, keys and certificates can be regenerated as needed.
    831  1.1.1.2.4.2  snj 
    832  1.1.1.2.4.2  snj   <p>For the MV scheme, proceed as in the TC scheme to generate keys
    833  1.1.1.2.4.2  snj and certificates for all group hosts. 
    834  1.1.1.2.4.2  snj For illustration assume trish is the TA, alice one of several trusted hosts
    835  1.1.1.2.4.2  snj and bob one of her clients. 
    836  1.1.1.2.4.2  snj On TA trish run
    837  1.1.1.2.4.2  snj <code>ntp-keygen</code>
    838  1.1.1.2.4.2  snj <code>-V</code> <kbd>n</kbd>
    839  1.1.1.2.4.2  snj <code>-p</code> <kbd>password</kbd>,
    840  1.1.1.2.4.2  snj where
    841  1.1.1.2.4.2  snj <kbd>n</kbd>
    842  1.1.1.2.4.2  snj is the number of revokable keys (typically 5) to produce
    843  1.1.1.2.4.2  snj the parameter file
    844  1.1.1.2.4.2  snj <span class="file">ntpkeys_MVpar_</span><kbd>trish.filestamp</kbd>
    845  1.1.1.2.4.2  snj and client key files
    846  1.1.1.2.4.2  snj <span class="file">ntpkeys_MVkeyd_</span><kbd>trish.filestamp</kbd>
    847  1.1.1.2.4.2  snj where
    848  1.1.1.2.4.2  snj <kbd>d</kbd>
    849  1.1.1.2.4.2  snj is the key number (0 &lt;
    850  1.1.1.2.4.2  snj <kbd>d</kbd>
    851  1.1.1.2.4.2  snj &lt;
    852  1.1.1.2.4.2  snj <kbd>n</kbd>). 
    853  1.1.1.2.4.2  snj Copy the parameter file to alice and install a soft link
    854  1.1.1.2.4.2  snj from the generic
    855  1.1.1.2.4.2  snj <span class="file">ntpkey_mv_</span><kbd>alice</kbd>
    856  1.1.1.2.4.2  snj to this file. 
    857  1.1.1.2.4.2  snj Copy one of the client key files to alice for later distribution
    858  1.1.1.2.4.2  snj to her clients. 
    859  1.1.1.2.4.2  snj It doesn't matter which client key file goes to alice,
    860  1.1.1.2.4.2  snj since they all work the same way. 
    861  1.1.1.2.4.2  snj Alice copies the client key file to all of her cliens. 
    862  1.1.1.2.4.2  snj On client bob install a soft link from generic
    863  1.1.1.2.4.2  snj <span class="file">ntpkey_mvkey_</span><kbd>bob</kbd>
    864  1.1.1.2.4.2  snj to the client key file. 
    865  1.1.1.2.4.2  snj As the MV scheme is independent of keys and certificates,
    866  1.1.1.2.4.2  snj these files can be refreshed as needed.
    867  1.1.1.2.4.2  snj 
    868  1.1.1.2.4.2  snj <h5 class="subsubsection">Command Line Options</h5>
    869  1.1.1.2.4.2  snj 
    870  1.1.1.2.4.2  snj      <dl>
    871  1.1.1.2.4.2  snj <dt><code>-c</code> <kbd>scheme</kbd><dd>Select certificate message digest/signature encryption scheme. 
    872  1.1.1.2.4.2  snj The
    873  1.1.1.2.4.2  snj <kbd>scheme</kbd>
    874  1.1.1.2.4.2  snj can be one of the following:
    875  1.1.1.2.4.2  snj . Cm RSA-MD2 , RSA-MD5 , RSA-SHA , RSA-SHA1 , RSA-MDC2 , RSA-RIPEMD160 , DSA-SHA ,
    876  1.1.1.2.4.2  snj or
    877  1.1.1.2.4.2  snj <code>DSA-SHA1</code>. 
    878  1.1.1.2.4.2  snj Note that RSA schemes must be used with a RSA sign key and DSA
    879  1.1.1.2.4.2  snj schemes must be used with a DSA sign key. 
    880  1.1.1.2.4.2  snj The default without this option is
    881  1.1.1.2.4.2  snj <code>RSA-MD5</code>. 
    882  1.1.1.2.4.2  snj <br><dt><code>-d</code><dd>Enable debugging. 
    883  1.1.1.2.4.2  snj This option displays the cryptographic data produced in eye-friendly billboards. 
    884  1.1.1.2.4.2  snj <br><dt><code>-e</code><dd>Write the IFF client keys to the standard output. 
    885  1.1.1.2.4.2  snj This is intended for automatic key distribution by mail. 
    886  1.1.1.2.4.2  snj <br><dt><code>-G</code><dd>Generate parameters and keys for the GQ identification scheme,
    887  1.1.1.2.4.2  snj obsoleting any that may exist. 
    888  1.1.1.2.4.2  snj <br><dt><code>-g</code><dd>Generate keys for the GQ identification scheme
    889  1.1.1.2.4.2  snj using the existing GQ parameters. 
    890  1.1.1.2.4.2  snj If the GQ parameters do not yet exist, create them first. 
    891  1.1.1.2.4.2  snj <br><dt><code>-H</code><dd>Generate new host keys, obsoleting any that may exist. 
    892  1.1.1.2.4.2  snj <br><dt><code>-I</code><dd>Generate parameters for the IFF identification scheme,
    893  1.1.1.2.4.2  snj obsoleting any that may exist. 
    894  1.1.1.2.4.2  snj <br><dt><code>-i</code> <kbd>name</kbd><dd>Set the suject name to
    895  1.1.1.2.4.2  snj <kbd>name</kbd>. 
    896  1.1.1.2.4.2  snj This is used as the subject field in certificates
    897  1.1.1.2.4.2  snj and in the file name for host and sign keys. 
    898  1.1.1.2.4.2  snj <br><dt><code>-M</code><dd>Generate MD5 keys, obsoleting any that may exist. 
    899  1.1.1.2.4.2  snj <br><dt><code>-P</code><dd>Generate a private certificate. 
    900  1.1.1.2.4.2  snj By default, the program generates public certificates. 
    901  1.1.1.2.4.2  snj <br><dt><code>-p</code> <kbd>password</kbd><dd>Encrypt generated files containing private data with
    902  1.1.1.2.4.2  snj <kbd>password</kbd>
    903  1.1.1.2.4.2  snj and the DES-CBC algorithm. 
    904  1.1.1.2.4.2  snj <br><dt><code>-q</code><dd>Set the password for reading files to password. 
    905  1.1.1.2.4.2  snj <br><dt><code>-S</code> <code>[RSA | DSA]</code><dd>Generate a new sign key of the designated type,
    906  1.1.1.2.4.2  snj obsoleting any that may exist. 
    907  1.1.1.2.4.2  snj By default, the program uses the host key as the sign key. 
    908  1.1.1.2.4.2  snj <br><dt><code>-s</code> <kbd>name</kbd><dd>Set the issuer name to
    909  1.1.1.2.4.2  snj <kbd>name</kbd>. 
    910  1.1.1.2.4.2  snj This is used for the issuer field in certificates
    911  1.1.1.2.4.2  snj and in the file name for identity files. 
    912  1.1.1.2.4.2  snj <br><dt><code>-T</code><dd>Generate a trusted certificate. 
    913  1.1.1.2.4.2  snj By default, the program generates a non-trusted certificate. 
    914  1.1.1.2.4.2  snj <br><dt><code>-V</code> <kbd>nkeys</kbd><dd>Generate parameters and keys for the Mu-Varadharajan (MV) identification scheme. 
    915  1.1.1.2.4.2  snj </dl>
    916  1.1.1.2.4.2  snj 
    917  1.1.1.2.4.2  snj <h5 class="subsubsection">Random Seed File</h5>
    918  1.1.1.2.4.2  snj 
    919  1.1.1.2.4.2  snj <p>All cryptographically sound key generation schemes must have means
    920  1.1.1.2.4.2  snj to randomize the entropy seed used to initialize
    921  1.1.1.2.4.2  snj the internal pseudo-random number generator used
    922  1.1.1.2.4.2  snj by the library routines. 
    923  1.1.1.2.4.2  snj The OpenSSL library uses a designated random seed file for this purpose. 
    924  1.1.1.2.4.2  snj The file must be available when starting the NTP daemon and
    925  1.1.1.2.4.2  snj <code>ntp-keygen</code>
    926  1.1.1.2.4.2  snj program. 
    927  1.1.1.2.4.2  snj If a site supports OpenSSL or its companion OpenSSH,
    928  1.1.1.2.4.2  snj it is very likely that means to do this are already available.
    929  1.1.1.2.4.2  snj 
    930  1.1.1.2.4.2  snj   <p>It is important to understand that entropy must be evolved
    931  1.1.1.2.4.2  snj for each generation, for otherwise the random number sequence
    932  1.1.1.2.4.2  snj would be predictable. 
    933  1.1.1.2.4.2  snj Various means dependent on external events, such as keystroke intervals,
    934  1.1.1.2.4.2  snj can be used to do this and some systems have built-in entropy sources. 
    935  1.1.1.2.4.2  snj Suitable means are described in the OpenSSL software documentation,
    936  1.1.1.2.4.2  snj but are outside the scope of this page.
    937  1.1.1.2.4.2  snj 
    938  1.1.1.2.4.2  snj   <p>The entropy seed used by the OpenSSL library is contained in a file,
    939  1.1.1.2.4.2  snj usually called
    940  1.1.1.2.4.2  snj <code>.rnd</code>,
    941  1.1.1.2.4.2  snj which must be available when starting the NTP daemon
    942  1.1.1.2.4.2  snj or the
    943  1.1.1.2.4.2  snj <code>ntp-keygen</code>
    944  1.1.1.2.4.2  snj program. 
    945  1.1.1.2.4.2  snj The NTP daemon will first look for the file
    946  1.1.1.2.4.2  snj using the path specified by the
    947  1.1.1.2.4.2  snj <code>randfile</code>
    948  1.1.1.2.4.2  snj subcommand of the
    949  1.1.1.2.4.2  snj <code>crypto</code>
    950  1.1.1.2.4.2  snj configuration command. 
    951  1.1.1.2.4.2  snj If not specified in this way, or when starting the
    952  1.1.1.2.4.2  snj <code>ntp-keygen</code>
    953  1.1.1.2.4.2  snj program,
    954  1.1.1.2.4.2  snj the OpenSSL library will look for the file using the path specified
    955  1.1.1.2.4.2  snj by the
    956  1.1.1.2.4.2  snj .Ev RANDFILE
    957  1.1.1.2.4.2  snj environment variable in the user home directory,
    958  1.1.1.2.4.2  snj whether root or some other user. 
    959  1.1.1.2.4.2  snj If the
    960  1.1.1.2.4.2  snj .Ev RANDFILE
    961  1.1.1.2.4.2  snj environment variable is not present,
    962  1.1.1.2.4.2  snj the library will look for the
    963  1.1.1.2.4.2  snj <code>.rnd</code>
    964  1.1.1.2.4.2  snj file in the user home directory. 
    965  1.1.1.2.4.2  snj If the file is not available or cannot be written,
    966  1.1.1.2.4.2  snj the daemon exits with a message to the system log and the program
    967  1.1.1.2.4.2  snj exits with a suitable error message.
    968  1.1.1.2.4.2  snj 
    969  1.1.1.2.4.2  snj <h5 class="subsubsection">Cryptographic Data Files</h5>
    970  1.1.1.2.4.2  snj 
    971  1.1.1.2.4.2  snj <p>All other file formats begin with two lines. 
    972  1.1.1.2.4.2  snj The first contains the file name, including the generated host name
    973  1.1.1.2.4.2  snj and filestamp. 
    974  1.1.1.2.4.2  snj The second contains the datestamp in conventional Unix date format. 
    975  1.1.1.2.4.2  snj Lines beginning with # are considered comments and ignored by the
    976  1.1.1.2.4.2  snj <code>ntp-keygen</code>
    977  1.1.1.2.4.2  snj program and
    978  1.1.1.2.4.2  snj <code>ntpd(1ntpdmdoc)</code>
    979  1.1.1.2.4.2  snj daemon. 
    980  1.1.1.2.4.2  snj Cryptographic values are encoded first using ASN.1 rules,
    981  1.1.1.2.4.2  snj then encrypted if necessary, and finally written PEM-encoded
    982  1.1.1.2.4.2  snj printable ASCII format preceded and followed by MIME content identifier lines.
    983  1.1.1.2.4.2  snj 
    984  1.1.1.2.4.2  snj   <p>The format of the symmetric keys file is somewhat different
    985  1.1.1.2.4.2  snj than the other files in the interest of backward compatibility. 
    986  1.1.1.2.4.2  snj Since DES-CBC is deprecated in NTPv4, the only key format of interest
    987  1.1.1.2.4.2  snj is MD5 alphanumeric strings. 
    988  1.1.1.2.4.2  snj Following hte heard the keys are
    989  1.1.1.2.4.2  snj entered one per line in the format
    990  1.1.1.2.4.2  snj <pre class="example">     <kbd>keyno</kbd> <kbd>type</kbd> <kbd>key</kbd>
    991  1.1.1.2.4.2  snj </pre>
    992  1.1.1.2.4.2  snj   <p>where
    993  1.1.1.2.4.2  snj <kbd>keyno</kbd>
    994  1.1.1.2.4.2  snj is a positive integer in the range 1-65,535,
    995  1.1.1.2.4.2  snj <kbd>type</kbd>
    996  1.1.1.2.4.2  snj is the string MD5 defining the key format and
    997  1.1.1.2.4.2  snj <kbd>key</kbd>
    998  1.1.1.2.4.2  snj is the key itself,
    999  1.1.1.2.4.2  snj which is a printable ASCII string 16 characters or less in length. 
   1000  1.1.1.2.4.2  snj Each character is chosen from the 93 printable characters
   1001  1.1.1.2.4.2  snj in the range 0x21 through 0x7f excluding space and the
   1002  1.1.1.2.4.2  snj #
   1003  1.1.1.2.4.2  snj character.
   1004  1.1.1.2.4.2  snj 
   1005  1.1.1.2.4.2  snj   <p>Note that the keys used by the
   1006  1.1.1.2.4.2  snj <code>ntpq(1ntpqmdoc)</code>
   1007  1.1.1.2.4.2  snj and
   1008  1.1.1.2.4.2  snj <code>ntpdc(1ntpdcmdoc)</code>
   1009  1.1.1.2.4.2  snj programs
   1010  1.1.1.2.4.2  snj are checked against passwords requested by the programs
   1011  1.1.1.2.4.2  snj and entered by hand, so it is generally appropriate to specify these keys
   1012  1.1.1.2.4.2  snj in human readable ASCII format.
   1013  1.1.1.2.4.2  snj 
   1014  1.1.1.2.4.2  snj   <p>The
   1015  1.1.1.2.4.2  snj <code>ntp-keygen</code>
   1016  1.1.1.2.4.2  snj program generates a MD5 symmetric keys file
   1017  1.1.1.2.4.2  snj <span class="file">ntpkey_MD5key_</span><kbd>hostname.filestamp</kbd>. 
   1018  1.1.1.2.4.2  snj Since the file contains private shared keys,
   1019  1.1.1.2.4.2  snj it should be visible only to root and distributed by secure means
   1020  1.1.1.2.4.2  snj to other subnet hosts. 
   1021  1.1.1.2.4.2  snj The NTP daemon loads the file
   1022  1.1.1.2.4.2  snj <span class="file">ntp.keys</span>,
   1023  1.1.1.2.4.2  snj so
   1024  1.1.1.2.4.2  snj <code>ntp-keygen</code>
   1025  1.1.1.2.4.2  snj installs a soft link from this name to the generated file. 
   1026  1.1.1.2.4.2  snj Subsequently, similar soft links must be installed by manual
   1027  1.1.1.2.4.2  snj or automated means on the other subnet hosts. 
   1028  1.1.1.2.4.2  snj While this file is not used with the Autokey Version 2 protocol,
   1029  1.1.1.2.4.2  snj it is needed to authenticate some remote configuration commands
   1030  1.1.1.2.4.2  snj used by the
   1031  1.1.1.2.4.2  snj <code>ntpq(1ntpqmdoc)</code>
   1032  1.1.1.2.4.2  snj and
   1033  1.1.1.2.4.2  snj <code>ntpdc(1ntpdcmdoc)</code>
   1034  1.1.1.2.4.2  snj utilities.
   1035  1.1.1.2.4.2  snj 
   1036  1.1.1.2.4.2  snj   <p>This section was generated by <strong>AutoGen</strong>,
   1037  1.1.1.2.4.2  snj using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntp-keygen</code> program. 
   1038  1.1.1.2.4.2  snj This software is released under the NTP license, &lt;http://ntp.org/license>;.
   1039  1.1.1.2.4.2  snj 
   1040  1.1.1.2.4.2  snj <ul class="menu">
   1041  1.1.1.2.4.2  snj <li><a accesskey="1" href="#ntp_002dkeygen-usage">ntp-keygen usage</a>:                   ntp-keygen help/usage (<span class="option">--help</span>)
   1042  1.1.1.2.4.2  snj <li><a accesskey="2" href="#ntp_002dkeygen-imbits">ntp-keygen imbits</a>:                  imbits option (-b)
   1043  1.1.1.2.4.2  snj <li><a accesskey="3" href="#ntp_002dkeygen-certificate">ntp-keygen certificate</a>:             certificate option (-c)
   1044  1.1.1.2.4.2  snj <li><a accesskey="4" href="#ntp_002dkeygen-cipher">ntp-keygen cipher</a>:                  cipher option (-C)
   1045  1.1.1.2.4.2  snj <li><a accesskey="5" href="#ntp_002dkeygen-id_002dkey">ntp-keygen id-key</a>:                  id-key option (-e)
   1046  1.1.1.2.4.2  snj <li><a accesskey="6" href="#ntp_002dkeygen-gq_002dparams">ntp-keygen gq-params</a>:               gq-params option (-G)
   1047  1.1.1.2.4.2  snj <li><a accesskey="7" href="#ntp_002dkeygen-host_002dkey">ntp-keygen host-key</a>:                host-key option (-H)
   1048  1.1.1.2.4.2  snj <li><a accesskey="8" href="#ntp_002dkeygen-iffkey">ntp-keygen iffkey</a>:                  iffkey option (-I)
   1049  1.1.1.2.4.2  snj <li><a accesskey="9" href="#ntp_002dkeygen-ident">ntp-keygen ident</a>:                   ident option (-i)
   1050  1.1.1.2.4.2  snj <li><a href="#ntp_002dkeygen-lifetime">ntp-keygen lifetime</a>:                lifetime option (-l)
   1051  1.1.1.2.4.2  snj <li><a href="#ntp_002dkeygen-md5key">ntp-keygen md5key</a>:                  md5key option (-M)
   1052  1.1.1.2.4.2  snj <li><a href="#ntp_002dkeygen-modulus">ntp-keygen modulus</a>:                 modulus option (-m)
   1053  1.1.1.2.4.2  snj <li><a href="#ntp_002dkeygen-pvt_002dcert">ntp-keygen pvt-cert</a>:                pvt-cert option (-P)
   1054  1.1.1.2.4.2  snj <li><a href="#ntp_002dkeygen-password">ntp-keygen password</a>:                password option (-p)
   1055  1.1.1.2.4.2  snj <li><a href="#ntp_002dkeygen-export_002dpasswd">ntp-keygen export-passwd</a>:           export-passwd option (-q)
   1056  1.1.1.2.4.2  snj <li><a href="#ntp_002dkeygen-sign_002dkey">ntp-keygen sign-key</a>:                sign-key option (-S)
   1057  1.1.1.2.4.2  snj <li><a href="#ntp_002dkeygen-subject_002dname">ntp-keygen subject-name</a>:            subject-name option (-s)
   1058  1.1.1.2.4.2  snj <li><a href="#ntp_002dkeygen-trusted_002dcert">ntp-keygen trusted-cert</a>:            trusted-cert option (-T)
   1059  1.1.1.2.4.2  snj <li><a href="#ntp_002dkeygen-mv_002dparams">ntp-keygen mv-params</a>:               mv-params option (-V)
   1060  1.1.1.2.4.2  snj <li><a href="#ntp_002dkeygen-mv_002dkeys">ntp-keygen mv-keys</a>:                 mv-keys option (-v)
   1061  1.1.1.2.4.2  snj <li><a href="#ntp_002dkeygen-config">ntp-keygen config</a>:                  presetting/configuring ntp-keygen
   1062  1.1.1.2.4.2  snj <li><a href="#ntp_002dkeygen-exit-status">ntp-keygen exit status</a>:             exit status
   1063  1.1.1.2.4.2  snj <li><a href="#ntp_002dkeygen-Usage">ntp-keygen Usage</a>:                   Usage
   1064  1.1.1.2.4.2  snj <li><a href="#ntp_002dkeygen-Notes">ntp-keygen Notes</a>:                   Notes
   1065  1.1.1.2.4.2  snj <li><a href="#ntp_002dkeygen-Bugs">ntp-keygen Bugs</a>:                    Bugs
   1066  1.1.1.2.4.2  snj </ul>
   1067  1.1.1.2.4.2  snj 
   1068  1.1.1.2.4.2  snj <div class="node">
   1069  1.1.1.2.4.2  snj <p><hr>
   1070  1.1.1.2.4.2  snj <a name="ntp_002dkeygen-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-imbits">ntp-keygen imbits</a>,
   1071  1.1.1.2.4.2  snj Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
   1072  1.1.1.2.4.2  snj <br>
   1073  1.1.1.2.4.2  snj </div>
   1074  1.1.1.2.4.2  snj 
   1075  1.1.1.2.4.2  snj <h4 class="subsection">ntp-keygen help/usage (<span class="option">--help</span>)</h4>
   1076  1.1.1.2.4.2  snj 
   1077  1.1.1.2.4.2  snj <p><a name="index-ntp_002dkeygen-help-3"></a>
   1078  1.1.1.2.4.2  snj This is the automatically generated usage text for ntp-keygen.
   1079  1.1.1.2.4.2  snj 
   1080  1.1.1.2.4.2  snj   <p>The text printed is the same whether selected with the <code>help</code> option
   1081  1.1.1.2.4.2  snj (<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>).  <code>more-help</code> will print
   1082  1.1.1.2.4.2  snj the usage text by passing it through a pager program. 
   1083  1.1.1.2.4.2  snj <code>more-help</code> is disabled on platforms without a working
   1084  1.1.1.2.4.2  snj <code>fork(2)</code> function.  The <code>PAGER</code> environment variable is
   1085  1.1.1.2.4.2  snj used to select the program, defaulting to <span class="file">more</span>.  Both will exit
   1086  1.1.1.2.4.2  snj with a status code of 0.
   1087  1.1.1.2.4.2  snj 
   1088  1.1.1.2.4.4  snj <pre class="example">ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p6
   1089  1.1.1.2.4.2  snj Usage:  ntp-keygen [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
   1090  1.1.1.2.4.2  snj   Flg Arg Option-Name    Description
   1091  1.1.1.2.4.2  snj    -b Num imbits         identity modulus bits
   1092  1.1.1.2.4.2  snj                                 - it must be in the range:
   1093  1.1.1.2.4.2  snj                                   256 to 2048
   1094  1.1.1.2.4.2  snj    -c Str certificate    certificate scheme
   1095  1.1.1.2.4.2  snj    -C Str cipher         privatekey cipher
   1096  1.1.1.2.4.2  snj    -d no  debug-level    Increase debug verbosity level
   1097  1.1.1.2.4.2  snj                                 - may appear multiple times
   1098  1.1.1.2.4.2  snj    -D Num set-debug-level Set the debug verbosity level
   1099  1.1.1.2.4.2  snj                                 - may appear multiple times
   1100  1.1.1.2.4.2  snj    -e no  id-key         Write IFF or GQ identity keys
   1101  1.1.1.2.4.2  snj    -G no  gq-params      Generate GQ parameters and keys
   1102  1.1.1.2.4.2  snj    -H no  host-key       generate RSA host key
   1103  1.1.1.2.4.2  snj    -I no  iffkey         generate IFF parameters
   1104  1.1.1.2.4.2  snj    -i Str ident          set Autokey group name
   1105  1.1.1.2.4.2  snj    -l Num lifetime       set certificate lifetime
   1106  1.1.1.2.4.2  snj    -M no  md5key         generate MD5 keys
   1107  1.1.1.2.4.2  snj    -m Num modulus        modulus
   1108  1.1.1.2.4.2  snj                                 - it must be in the range:
   1109  1.1.1.2.4.2  snj                                   256 to 2048
   1110  1.1.1.2.4.2  snj    -P no  pvt-cert       generate PC private certificate
   1111  1.1.1.2.4.2  snj    -p Str password       local private password
   1112  1.1.1.2.4.2  snj    -q Str export-passwd  export IFF or GQ group keys with password
   1113  1.1.1.2.4.2  snj    -S Str sign-key       generate sign key (RSA or DSA)
   1114  1.1.1.2.4.2  snj    -s Str subject-name   set host and optionally group name
   1115  1.1.1.2.4.2  snj    -T no  trusted-cert   trusted certificate (TC scheme)
   1116  1.1.1.2.4.2  snj    -V Num mv-params      generate &lt;num&gt; MV parameters
   1117  1.1.1.2.4.2  snj    -v Num mv-keys        update &lt;num&gt; MV keys
   1118  1.1.1.2.4.2  snj       opt version        output version information and exit
   1119  1.1.1.2.4.2  snj    -? no  help           display extended usage information and exit
   1120  1.1.1.2.4.2  snj    -! no  more-help      extended usage information passed thru pager
   1121  1.1.1.2.4.2  snj    -&gt; opt save-opts      save the option state to a config file
   1122  1.1.1.2.4.2  snj    -&lt; Str load-opts      load options from a config file
   1123  1.1.1.2.4.2  snj                                 - disabled as '--no-load-opts'
   1124  1.1.1.2.4.2  snj                                 - may appear multiple times
   1125  1.1.1.2.4.2  snj 
   1126  1.1.1.2.4.2  snj Options are specified by doubled hyphens and their name or by a single
   1127  1.1.1.2.4.2  snj hyphen and the flag character.
   1128  1.1.1.2.4.2  snj 
   1129  1.1.1.2.4.2  snj 
   1130  1.1.1.2.4.2  snj The following option preset mechanisms are supported:
   1131  1.1.1.2.4.2  snj  - reading file $HOME/.ntprc
   1132  1.1.1.2.4.2  snj  - reading file ./.ntprc
   1133  1.1.1.2.4.2  snj  - examining environment variables named NTP_KEYGEN_*
   1134  1.1.1.2.4.2  snj 
   1135  1.1.1.2.4.2  snj Please send bug reports to:  &lt;http://bugs.ntp.org, bugs (a] ntp.org&gt;
   1136  1.1.1.2.4.2  snj </pre>
   1137  1.1.1.2.4.2  snj   <div class="node">
   1138  1.1.1.2.4.2  snj <p><hr>
   1139  1.1.1.2.4.2  snj <a name="ntp_002dkeygen-imbits"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-certificate">ntp-keygen certificate</a>,
   1140  1.1.1.2.4.2  snj Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-usage">ntp-keygen usage</a>,
   1141  1.1.1.2.4.2  snj Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
   1142  1.1.1.2.4.2  snj <br>
   1143  1.1.1.2.4.2  snj </div>
   1144  1.1.1.2.4.2  snj 
   1145  1.1.1.2.4.2  snj <h4 class="subsection">imbits option (-b)</h4>
   1146  1.1.1.2.4.2  snj 
   1147  1.1.1.2.4.2  snj <p><a name="index-ntp_002dkeygen_002dimbits-4"></a>
   1148  1.1.1.2.4.2  snj This is the &ldquo;identity modulus bits&rdquo; option. 
   1149  1.1.1.2.4.2  snj This option takes a number argument <span class="file">imbits</span>.
   1150  1.1.1.2.4.2  snj 
   1151  1.1.1.2.4.2  snj <p class="noindent">This option has some usage constraints.  It:
   1152  1.1.1.2.4.2  snj      <ul>
   1153  1.1.1.2.4.2  snj <li>must be compiled in by defining <code>AUTOKEY</code> during the compilation. 
   1154  1.1.1.2.4.2  snj </ul>
   1155  1.1.1.2.4.2  snj 
   1156  1.1.1.2.4.2  snj   <p>The number of bits in the identity modulus.  The default is 256. 
   1157  1.1.1.2.4.2  snj <div class="node">
   1158  1.1.1.2.4.2  snj <p><hr>
   1159  1.1.1.2.4.2  snj <a name="ntp_002dkeygen-certificate"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-cipher">ntp-keygen cipher</a>,
   1160  1.1.1.2.4.2  snj Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-imbits">ntp-keygen imbits</a>,
   1161  1.1.1.2.4.2  snj Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
   1162  1.1.1.2.4.2  snj <br>
   1163  1.1.1.2.4.2  snj </div>
   1164  1.1.1.2.4.2  snj 
   1165  1.1.1.2.4.2  snj <h4 class="subsection">certificate option (-c)</h4>
   1166  1.1.1.2.4.2  snj 
   1167  1.1.1.2.4.2  snj <p><a name="index-ntp_002dkeygen_002dcertificate-5"></a>
   1168  1.1.1.2.4.2  snj This is the &ldquo;certificate scheme&rdquo; option. 
   1169  1.1.1.2.4.2  snj This option takes a string argument <span class="file">scheme</span>.
   1170  1.1.1.2.4.2  snj 
   1171  1.1.1.2.4.2  snj <p class="noindent">This option has some usage constraints.  It:
   1172  1.1.1.2.4.2  snj      <ul>
   1173  1.1.1.2.4.2  snj <li>must be compiled in by defining <code>AUTOKEY</code> during the compilation. 
   1174  1.1.1.2.4.2  snj </ul>
   1175  1.1.1.2.4.2  snj 
   1176  1.1.1.2.4.2  snj   <p>scheme is one of
   1177  1.1.1.2.4.2  snj RSA-MD2, RSA-MD5, RSA-SHA, RSA-SHA1, RSA-MDC2, RSA-RIPEMD160,
   1178  1.1.1.2.4.2  snj DSA-SHA, or DSA-SHA1.
   1179  1.1.1.2.4.2  snj 
   1180  1.1.1.2.4.2  snj   <p>Select the certificate message digest/signature encryption scheme. 
   1181  1.1.1.2.4.2  snj Note that RSA schemes must be used with a RSA sign key and DSA
   1182  1.1.1.2.4.2  snj schemes must be used with a DSA sign key.  The default without
   1183  1.1.1.2.4.2  snj this option is RSA-MD5. 
   1184  1.1.1.2.4.2  snj <div class="node">
   1185  1.1.1.2.4.2  snj <p><hr>
   1186  1.1.1.2.4.2  snj <a name="ntp_002dkeygen-cipher"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-id_002dkey">ntp-keygen id-key</a>,
   1187  1.1.1.2.4.2  snj Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-certificate">ntp-keygen certificate</a>,
   1188  1.1.1.2.4.2  snj Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
   1189  1.1.1.2.4.2  snj <br>
   1190  1.1.1.2.4.2  snj </div>
   1191  1.1.1.2.4.2  snj 
   1192  1.1.1.2.4.2  snj <h4 class="subsection">cipher option (-C)</h4>
   1193  1.1.1.2.4.2  snj 
   1194  1.1.1.2.4.2  snj <p><a name="index-ntp_002dkeygen_002dcipher-6"></a>
   1195  1.1.1.2.4.2  snj This is the &ldquo;privatekey cipher&rdquo; option. 
   1196  1.1.1.2.4.2  snj This option takes a string argument <span class="file">cipher</span>.
   1197  1.1.1.2.4.2  snj 
   1198  1.1.1.2.4.2  snj <p class="noindent">This option has some usage constraints.  It:
   1199  1.1.1.2.4.2  snj      <ul>
   1200  1.1.1.2.4.2  snj <li>must be compiled in by defining <code>AUTOKEY</code> during the compilation. 
   1201  1.1.1.2.4.2  snj </ul>
   1202  1.1.1.2.4.2  snj 
   1203  1.1.1.2.4.2  snj   <p>Select the cipher which is used to encrypt the files containing
   1204  1.1.1.2.4.2  snj private keys.  The default is three-key triple DES in CBC mode,
   1205  1.1.1.2.4.2  snj equivalent to "<code>-C des-ede3-cbc".  The openssl tool lists ciphers
   1206  1.1.1.2.4.2  snj available in "openssl -h" output. 
   1207  1.1.1.2.4.2  snj </code><div class="node">
   1208  1.1.1.2.4.2  snj <p><hr>
   1209  1.1.1.2.4.2  snj <a name="ntp_002dkeygen-id_002dkey"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-gq_002dparams">ntp-keygen gq-params</a>,
   1210  1.1.1.2.4.2  snj Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-cipher">ntp-keygen cipher</a>,
   1211  1.1.1.2.4.2  snj Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
   1212  1.1.1.2.4.2  snj <br>
   1213  1.1.1.2.4.2  snj </div>
   1214  1.1.1.2.4.2  snj 
   1215  1.1.1.2.4.2  snj <h4 class="subsection">id-key option (-e)</h4>
   1216  1.1.1.2.4.2  snj 
   1217  1.1.1.2.4.2  snj <p><a name="index-ntp_002dkeygen_002did_002dkey-7"></a>
   1218  1.1.1.2.4.2  snj This is the &ldquo;write iff or gq identity keys&rdquo; option.
   1219  1.1.1.2.4.2  snj 
   1220  1.1.1.2.4.2  snj <p class="noindent">This option has some usage constraints.  It:
   1221  1.1.1.2.4.2  snj      <ul>
   1222  1.1.1.2.4.2  snj <li>must be compiled in by defining <code>AUTOKEY</code> during the compilation. 
   1223  1.1.1.2.4.2  snj </ul>
   1224  1.1.1.2.4.2  snj 
   1225  1.1.1.2.4.2  snj   <p>Write the IFF or GQ client keys to the standard output.  This is
   1226  1.1.1.2.4.2  snj intended for automatic key distribution by mail. 
   1227  1.1.1.2.4.2  snj <div class="node">
   1228  1.1.1.2.4.2  snj <p><hr>
   1229  1.1.1.2.4.2  snj <a name="ntp_002dkeygen-gq_002dparams"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-host_002dkey">ntp-keygen host-key</a>,
   1230  1.1.1.2.4.2  snj Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-id_002dkey">ntp-keygen id-key</a>,
   1231  1.1.1.2.4.2  snj Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
   1232  1.1.1.2.4.2  snj <br>
   1233  1.1.1.2.4.2  snj </div>
   1234  1.1.1.2.4.2  snj 
   1235  1.1.1.2.4.2  snj <h4 class="subsection">gq-params option (-G)</h4>
   1236  1.1.1.2.4.2  snj 
   1237  1.1.1.2.4.2  snj <p><a name="index-ntp_002dkeygen_002dgq_002dparams-8"></a>
   1238  1.1.1.2.4.2  snj This is the &ldquo;generate gq parameters and keys&rdquo; option.
   1239  1.1.1.2.4.2  snj 
   1240  1.1.1.2.4.2  snj <p class="noindent">This option has some usage constraints.  It:
   1241  1.1.1.2.4.2  snj      <ul>
   1242  1.1.1.2.4.2  snj <li>must be compiled in by defining <code>AUTOKEY</code> during the compilation. 
   1243  1.1.1.2.4.2  snj </ul>
   1244  1.1.1.2.4.2  snj 
   1245  1.1.1.2.4.2  snj   <p>Generate parameters and keys for the GQ identification scheme,
   1246  1.1.1.2.4.2  snj obsoleting any that may exist. 
   1247  1.1.1.2.4.2  snj <div class="node">
   1248  1.1.1.2.4.2  snj <p><hr>
   1249  1.1.1.2.4.2  snj <a name="ntp_002dkeygen-host_002dkey"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-iffkey">ntp-keygen iffkey</a>,
   1250  1.1.1.2.4.2  snj Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-gq_002dparams">ntp-keygen gq-params</a>,
   1251  1.1.1.2.4.2  snj Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
   1252  1.1.1.2.4.2  snj <br>
   1253  1.1.1.2.4.2  snj </div>
   1254  1.1.1.2.4.2  snj 
   1255  1.1.1.2.4.2  snj <h4 class="subsection">host-key option (-H)</h4>
   1256  1.1.1.2.4.2  snj 
   1257  1.1.1.2.4.2  snj <p><a name="index-ntp_002dkeygen_002dhost_002dkey-9"></a>
   1258  1.1.1.2.4.2  snj This is the &ldquo;generate rsa host key&rdquo; option.
   1259  1.1.1.2.4.2  snj 
   1260  1.1.1.2.4.2  snj <p class="noindent">This option has some usage constraints.  It:
   1261  1.1.1.2.4.2  snj      <ul>
   1262  1.1.1.2.4.2  snj <li>must be compiled in by defining <code>AUTOKEY</code> during the compilation. 
   1263  1.1.1.2.4.2  snj </ul>
   1264  1.1.1.2.4.2  snj 
   1265  1.1.1.2.4.2  snj   <p>Generate new host keys, obsoleting any that may exist. 
   1266  1.1.1.2.4.2  snj <div class="node">
   1267  1.1.1.2.4.2  snj <p><hr>
   1268  1.1.1.2.4.2  snj <a name="ntp_002dkeygen-iffkey"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-ident">ntp-keygen ident</a>,
   1269  1.1.1.2.4.2  snj Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-host_002dkey">ntp-keygen host-key</a>,
   1270  1.1.1.2.4.2  snj Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
   1271  1.1.1.2.4.2  snj <br>
   1272  1.1.1.2.4.2  snj </div>
   1273  1.1.1.2.4.2  snj 
   1274  1.1.1.2.4.2  snj <h4 class="subsection">iffkey option (-I)</h4>
   1275  1.1.1.2.4.2  snj 
   1276  1.1.1.2.4.2  snj <p><a name="index-ntp_002dkeygen_002diffkey-10"></a>
   1277  1.1.1.2.4.2  snj This is the &ldquo;generate iff parameters&rdquo; option.
   1278  1.1.1.2.4.2  snj 
   1279  1.1.1.2.4.2  snj <p class="noindent">This option has some usage constraints.  It:
   1280  1.1.1.2.4.2  snj      <ul>
   1281  1.1.1.2.4.2  snj <li>must be compiled in by defining <code>AUTOKEY</code> during the compilation. 
   1282  1.1.1.2.4.2  snj </ul>
   1283  1.1.1.2.4.2  snj 
   1284  1.1.1.2.4.2  snj   <p>Generate parameters for the IFF identification scheme, obsoleting
   1285  1.1.1.2.4.2  snj any that may exist. 
   1286  1.1.1.2.4.2  snj <div class="node">
   1287  1.1.1.2.4.2  snj <p><hr>
   1288  1.1.1.2.4.2  snj <a name="ntp_002dkeygen-ident"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-lifetime">ntp-keygen lifetime</a>,
   1289  1.1.1.2.4.2  snj Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-iffkey">ntp-keygen iffkey</a>,
   1290  1.1.1.2.4.2  snj Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
   1291  1.1.1.2.4.2  snj <br>
   1292  1.1.1.2.4.2  snj </div>
   1293  1.1.1.2.4.2  snj 
   1294  1.1.1.2.4.2  snj <h4 class="subsection">ident option (-i)</h4>
   1295  1.1.1.2.4.2  snj 
   1296  1.1.1.2.4.2  snj <p><a name="index-ntp_002dkeygen_002dident-11"></a>
   1297  1.1.1.2.4.2  snj This is the &ldquo;set autokey group name&rdquo; option. 
   1298  1.1.1.2.4.2  snj This option takes a string argument <span class="file">group</span>.
   1299  1.1.1.2.4.2  snj 
   1300  1.1.1.2.4.2  snj <p class="noindent">This option has some usage constraints.  It:
   1301  1.1.1.2.4.2  snj      <ul>
   1302  1.1.1.2.4.2  snj <li>must be compiled in by defining <code>AUTOKEY</code> during the compilation. 
   1303  1.1.1.2.4.2  snj </ul>
   1304  1.1.1.2.4.2  snj 
   1305  1.1.1.2.4.2  snj   <p>Set the optional Autokey group name to name.  This is used in
   1306  1.1.1.2.4.2  snj the file name of IFF, GQ, and MV client parameters files.  In
   1307  1.1.1.2.4.2  snj that role, the default is the host name if this option is not
   1308  1.1.1.2.4.2  snj provided.  The group name, if specified using <code>-i/--ident</code> or
   1309  1.1.1.2.4.2  snj using <code>-s/--subject-name</code> following an '<code>}' character,
   1310  1.1.1.2.4.2  snj is also a part of the self-signed host certificate's subject and
   1311  1.1.1.2.4.2  snj issuer names in the form host
   1312  1.1.1.2.4.2  snj   <p>'crypto ident' or 'server ident' configuration in
   1313  1.1.1.2.4.2  snj ntpd's configuration file. 
   1314  1.1.1.2.4.2  snj </code><div class="node">
   1315  1.1.1.2.4.2  snj <p><hr>
   1316  1.1.1.2.4.2  snj <a name="ntp_002dkeygen-lifetime"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-md5key">ntp-keygen md5key</a>,
   1317  1.1.1.2.4.2  snj Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-ident">ntp-keygen ident</a>,
   1318  1.1.1.2.4.2  snj Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
   1319  1.1.1.2.4.2  snj <br>
   1320  1.1.1.2.4.2  snj </div>
   1321  1.1.1.2.4.2  snj 
   1322  1.1.1.2.4.2  snj <h4 class="subsection">lifetime option (-l)</h4>
   1323  1.1.1.2.4.2  snj 
   1324  1.1.1.2.4.2  snj <p><a name="index-ntp_002dkeygen_002dlifetime-12"></a>
   1325  1.1.1.2.4.2  snj This is the ``set certificate lifetime'' option. 
   1326  1.1.1.2.4.2  snj This option takes a number argument <span class="file">lifetime</span>.
   1327  1.1.1.2.4.2  snj 
   1328  1.1.1.2.4.2  snj <p class="noindent">This option has some usage constraints.  It:
   1329  1.1.1.2.4.2  snj      <ul>
   1330  1.1.1.2.4.2  snj <li>must be compiled in by defining <code>AUTOKEY</code> during the compilation. 
   1331  1.1.1.2.4.2  snj </ul>
   1332  1.1.1.2.4.2  snj 
   1333  1.1.1.2.4.2  snj   <p>Set the certificate expiration to lifetime days from now. 
   1334  1.1.1.2.4.2  snj <div class="node">
   1335  1.1.1.2.4.2  snj <p><hr>
   1336  1.1.1.2.4.2  snj <a name="ntp_002dkeygen-md5key"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-modulus">ntp-keygen modulus</a>,
   1337  1.1.1.2.4.2  snj Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-lifetime">ntp-keygen lifetime</a>,
   1338  1.1.1.2.4.2  snj Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
   1339  1.1.1.2.4.2  snj <br>
   1340  1.1.1.2.4.2  snj </div>
   1341  1.1.1.2.4.2  snj 
   1342  1.1.1.2.4.2  snj <h4 class="subsection">md5key option (-M)</h4>
   1343  1.1.1.2.4.2  snj 
   1344  1.1.1.2.4.2  snj <p><a name="index-ntp_002dkeygen_002dmd5key-13"></a>
   1345  1.1.1.2.4.2  snj This is the ``generate md5 keys'' option. 
   1346  1.1.1.2.4.2  snj Generate MD5 keys, obsoleting any that may exist. 
   1347  1.1.1.2.4.2  snj <div class="node">
   1348  1.1.1.2.4.2  snj <p><hr>
   1349  1.1.1.2.4.2  snj <a name="ntp_002dkeygen-modulus"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-pvt_002dcert">ntp-keygen pvt-cert</a>,
   1350  1.1.1.2.4.2  snj Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-md5key">ntp-keygen md5key</a>,
   1351  1.1.1.2.4.2  snj Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
   1352  1.1.1.2.4.2  snj <br>
   1353  1.1.1.2.4.2  snj </div>
   1354  1.1.1.2.4.2  snj 
   1355  1.1.1.2.4.2  snj <h4 class="subsection">modulus option (-m)</h4>
   1356  1.1.1.2.4.2  snj 
   1357  1.1.1.2.4.2  snj <p><a name="index-ntp_002dkeygen_002dmodulus-14"></a>
   1358  1.1.1.2.4.2  snj This is the ``modulus'' option. 
   1359  1.1.1.2.4.2  snj This option takes a number argument <span class="file">modulus</span>.
   1360  1.1.1.2.4.2  snj 
   1361  1.1.1.2.4.2  snj <p class="noindent">This option has some usage constraints.  It:
   1362  1.1.1.2.4.2  snj      <ul>
   1363  1.1.1.2.4.2  snj <li>must be compiled in by defining <code>AUTOKEY</code> during the compilation. 
   1364  1.1.1.2.4.2  snj </ul>
   1365  1.1.1.2.4.2  snj 
   1366  1.1.1.2.4.2  snj   <p>The number of bits in the prime modulus.  The default is 512. 
   1367  1.1.1.2.4.2  snj <div class="node">
   1368  1.1.1.2.4.2  snj <p><hr>
   1369  1.1.1.2.4.2  snj <a name="ntp_002dkeygen-pvt_002dcert"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-password">ntp-keygen password</a>,
   1370  1.1.1.2.4.2  snj Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-modulus">ntp-keygen modulus</a>,
   1371  1.1.1.2.4.2  snj Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
   1372  1.1.1.2.4.2  snj <br>
   1373  1.1.1.2.4.2  snj </div>
   1374  1.1.1.2.4.2  snj 
   1375  1.1.1.2.4.2  snj <h4 class="subsection">pvt-cert option (-P)</h4>
   1376  1.1.1.2.4.2  snj 
   1377  1.1.1.2.4.2  snj <p><a name="index-ntp_002dkeygen_002dpvt_002dcert-15"></a>
   1378  1.1.1.2.4.2  snj This is the ``generate pc private certificate'' option.
   1379  1.1.1.2.4.2  snj 
   1380  1.1.1.2.4.2  snj <p class="noindent">This option has some usage constraints.  It:
   1381  1.1.1.2.4.2  snj      <ul>
   1382  1.1.1.2.4.2  snj <li>must be compiled in by defining <code>AUTOKEY</code> during the compilation. 
   1383  1.1.1.2.4.2  snj </ul>
   1384  1.1.1.2.4.2  snj 
   1385  1.1.1.2.4.2  snj   <p>Generate a private certificate.  By default, the program generates
   1386  1.1.1.2.4.2  snj public certificates. 
   1387  1.1.1.2.4.2  snj <div class="node">
   1388  1.1.1.2.4.2  snj <p><hr>
   1389  1.1.1.2.4.2  snj <a name="ntp_002dkeygen-password"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-export_002dpasswd">ntp-keygen export-passwd</a>,
   1390  1.1.1.2.4.2  snj Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-pvt_002dcert">ntp-keygen pvt-cert</a>,
   1391  1.1.1.2.4.2  snj Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
   1392  1.1.1.2.4.2  snj <br>
   1393  1.1.1.2.4.2  snj </div>
   1394  1.1.1.2.4.2  snj 
   1395  1.1.1.2.4.2  snj <h4 class="subsection">password option (-p)</h4>
   1396  1.1.1.2.4.2  snj 
   1397  1.1.1.2.4.2  snj <p><a name="index-ntp_002dkeygen_002dpassword-16"></a>
   1398  1.1.1.2.4.2  snj This is the ``local private password'' option. 
   1399  1.1.1.2.4.2  snj This option takes a string argument <span class="file">passwd</span>.
   1400  1.1.1.2.4.2  snj 
   1401  1.1.1.2.4.2  snj <p class="noindent">This option has some usage constraints.  It:
   1402  1.1.1.2.4.2  snj      <ul>
   1403  1.1.1.2.4.2  snj <li>must be compiled in by defining <code>AUTOKEY</code> during the compilation. 
   1404  1.1.1.2.4.2  snj </ul>
   1405  1.1.1.2.4.2  snj 
   1406  1.1.1.2.4.2  snj   <p>Local files containing private data are encrypted with the
   1407  1.1.1.2.4.2  snj DES-CBC algorithm and the specified password.  The same password
   1408  1.1.1.2.4.2  snj must be specified to the local ntpd via the "crypto pw password"
   1409  1.1.1.2.4.2  snj configuration command.  The default password is the local
   1410  1.1.1.2.4.2  snj hostname. 
   1411  1.1.1.2.4.2  snj <div class="node">
   1412  1.1.1.2.4.2  snj <p><hr>
   1413  1.1.1.2.4.2  snj <a name="ntp_002dkeygen-export_002dpasswd"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-sign_002dkey">ntp-keygen sign-key</a>,
   1414  1.1.1.2.4.2  snj Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-password">ntp-keygen password</a>,
   1415  1.1.1.2.4.2  snj Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
   1416  1.1.1.2.4.2  snj <br>
   1417  1.1.1.2.4.2  snj </div>
   1418  1.1.1.2.4.2  snj 
   1419  1.1.1.2.4.2  snj <h4 class="subsection">export-passwd option (-q)</h4>
   1420  1.1.1.2.4.2  snj 
   1421  1.1.1.2.4.2  snj <p><a name="index-ntp_002dkeygen_002dexport_002dpasswd-17"></a>
   1422  1.1.1.2.4.2  snj This is the ``export iff or gq group keys with password'' option. 
   1423  1.1.1.2.4.2  snj This option takes a string argument <span class="file">passwd</span>.
   1424  1.1.1.2.4.2  snj 
   1425  1.1.1.2.4.2  snj <p class="noindent">This option has some usage constraints.  It:
   1426  1.1.1.2.4.2  snj      <ul>
   1427  1.1.1.2.4.2  snj <li>must be compiled in by defining <code>AUTOKEY</code> during the compilation. 
   1428  1.1.1.2.4.2  snj </ul>
   1429  1.1.1.2.4.2  snj 
   1430  1.1.1.2.4.2  snj   <p>Export IFF or GQ identity group keys to the standard output,
   1431  1.1.1.2.4.2  snj encrypted with the DES-CBC algorithm and the specified password. 
   1432  1.1.1.2.4.2  snj The same password must be specified to the remote ntpd via the
   1433  1.1.1.2.4.2  snj "crypto pw password" configuration command.  See also the option
   1434  1.1.1.2.4.2  snj --id-key (-e) for unencrypted exports. 
   1435  1.1.1.2.4.2  snj <div class="node">
   1436  1.1.1.2.4.2  snj <p><hr>
   1437  1.1.1.2.4.2  snj <a name="ntp_002dkeygen-sign_002dkey"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-subject_002dname">ntp-keygen subject-name</a>,
   1438  1.1.1.2.4.2  snj Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-export_002dpasswd">ntp-keygen export-passwd</a>,
   1439  1.1.1.2.4.2  snj Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
   1440  1.1.1.2.4.2  snj <br>
   1441  1.1.1.2.4.2  snj </div>
   1442  1.1.1.2.4.2  snj 
   1443  1.1.1.2.4.2  snj <h4 class="subsection">sign-key option (-S)</h4>
   1444  1.1.1.2.4.2  snj 
   1445  1.1.1.2.4.2  snj <p><a name="index-ntp_002dkeygen_002dsign_002dkey-18"></a>
   1446  1.1.1.2.4.2  snj This is the ``generate sign key (rsa or dsa)'' option. 
   1447  1.1.1.2.4.2  snj This option takes a string argument <span class="file">sign</span>.
   1448  1.1.1.2.4.2  snj 
   1449  1.1.1.2.4.2  snj <p class="noindent">This option has some usage constraints.  It:
   1450  1.1.1.2.4.2  snj      <ul>
   1451  1.1.1.2.4.2  snj <li>must be compiled in by defining <code>AUTOKEY</code> during the compilation. 
   1452  1.1.1.2.4.2  snj </ul>
   1453  1.1.1.2.4.2  snj 
   1454  1.1.1.2.4.2  snj   <p>Generate a new sign key of the designated type, obsoleting any
   1455  1.1.1.2.4.2  snj that may exist.  By default, the program uses the host key as the
   1456  1.1.1.2.4.2  snj sign key. 
   1457  1.1.1.2.4.2  snj <div class="node">
   1458  1.1.1.2.4.2  snj <p><hr>
   1459  1.1.1.2.4.2  snj <a name="ntp_002dkeygen-subject_002dname"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-trusted_002dcert">ntp-keygen trusted-cert</a>,
   1460  1.1.1.2.4.2  snj Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-sign_002dkey">ntp-keygen sign-key</a>,
   1461  1.1.1.2.4.2  snj Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
   1462  1.1.1.2.4.2  snj <br>
   1463  1.1.1.2.4.2  snj </div>
   1464  1.1.1.2.4.2  snj 
   1465  1.1.1.2.4.2  snj <h4 class="subsection">subject-name option (-s)</h4>
   1466  1.1.1.2.4.2  snj 
   1467  1.1.1.2.4.2  snj <p><a name="index-ntp_002dkeygen_002dsubject_002dname-19"></a>
   1468  1.1.1.2.4.2  snj This is the ``set host and optionally group name'' option. 
   1469  1.1.1.2.4.2  snj This option takes a string argument <span class="file">host@group</span>.
   1470  1.1.1.2.4.2  snj 
   1471  1.1.1.2.4.2  snj <p class="noindent">This option has some usage constraints.  It:
   1472  1.1.1.2.4.2  snj      <ul>
   1473  1.1.1.2.4.2  snj <li>must be compiled in by defining <code>AUTOKEY</code> during the compilation. 
   1474  1.1.1.2.4.2  snj </ul>
   1475  1.1.1.2.4.2  snj 
   1476  1.1.1.2.4.2  snj   <p>Set the Autokey host name, and optionally, group name specified
   1477  1.1.1.2.4.2  snj following an '<code>}' character.  The host name is used in the file
   1478  1.1.1.2.4.2  snj name of generated host and signing certificates, without the
   1479  1.1.1.2.4.2  snj group name.  The host name, and if provided, group name are used
   1480  1.1.1.2.4.2  snj in host
   1481  1.1.1.2.4.2  snj   <p>fields.  Specifying '-s
   1482  1.1.1.2.4.2  snj   <p>leaving the host name unchanged while appending
   1483  1.1.1.2.4.2  snj   <p>subject and issuer fields, as with -i group.  The group name, or
   1484  1.1.1.2.4.2  snj if not provided, the host name are also used in the file names
   1485  1.1.1.2.4.2  snj of IFF, GQ, and MV client parameter files. 
   1486  1.1.1.2.4.2  snj </code><div class="node">
   1487  1.1.1.2.4.2  snj <p><hr>
   1488  1.1.1.2.4.2  snj <a name="ntp_002dkeygen-trusted_002dcert"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-mv_002dparams">ntp-keygen mv-params</a>,
   1489  1.1.1.2.4.2  snj Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-subject_002dname">ntp-keygen subject-name</a>,
   1490  1.1.1.2.4.2  snj Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
   1491  1.1.1.2.4.2  snj <br>
   1492  1.1.1.2.4.2  snj </div>
   1493  1.1.1.2.4.2  snj 
   1494  1.1.1.2.4.2  snj <h4 class="subsection">trusted-cert option (-T)</h4>
   1495  1.1.1.2.4.2  snj 
   1496  1.1.1.2.4.2  snj <p><a name="index-ntp_002dkeygen_002dtrusted_002dcert-20"></a>
   1497  1.1.1.2.4.2  snj This is the ``trusted certificate (tc scheme)'' option.
   1498  1.1.1.2.4.2  snj 
   1499  1.1.1.2.4.2  snj <p class="noindent">This option has some usage constraints.  It:
   1500  1.1.1.2.4.2  snj      <ul>
   1501  1.1.1.2.4.2  snj <li>must be compiled in by defining <code>AUTOKEY</code> during the compilation. 
   1502  1.1.1.2.4.2  snj </ul>
   1503  1.1.1.2.4.2  snj 
   1504  1.1.1.2.4.2  snj   <p>Generate a trusted certificate.  By default, the program generates
   1505  1.1.1.2.4.2  snj a non-trusted certificate. 
   1506  1.1.1.2.4.2  snj <div class="node">
   1507  1.1.1.2.4.2  snj <p><hr>
   1508  1.1.1.2.4.2  snj <a name="ntp_002dkeygen-mv_002dparams"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-mv_002dkeys">ntp-keygen mv-keys</a>,
   1509  1.1.1.2.4.2  snj Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-trusted_002dcert">ntp-keygen trusted-cert</a>,
   1510  1.1.1.2.4.2  snj Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
   1511  1.1.1.2.4.2  snj <br>
   1512  1.1.1.2.4.2  snj </div>
   1513  1.1.1.2.4.2  snj 
   1514  1.1.1.2.4.2  snj <h4 class="subsection">mv-params option (-V)</h4>
   1515  1.1.1.2.4.2  snj 
   1516  1.1.1.2.4.2  snj <p><a name="index-ntp_002dkeygen_002dmv_002dparams-21"></a>
   1517  1.1.1.2.4.2  snj This is the ``generate &lt;num&gt; mv parameters'' option. 
   1518  1.1.1.2.4.2  snj This option takes a number argument <span class="file">num</span>.
   1519  1.1.1.2.4.2  snj 
   1520  1.1.1.2.4.2  snj <p class="noindent">This option has some usage constraints.  It:
   1521  1.1.1.2.4.2  snj      <ul>
   1522  1.1.1.2.4.2  snj <li>must be compiled in by defining <code>AUTOKEY</code> during the compilation. 
   1523  1.1.1.2.4.2  snj </ul>
   1524  1.1.1.2.4.2  snj 
   1525  1.1.1.2.4.2  snj   <p>Generate parameters and keys for the Mu-Varadharajan (MV)
   1526  1.1.1.2.4.2  snj identification scheme. 
   1527  1.1.1.2.4.2  snj <div class="node">
   1528  1.1.1.2.4.2  snj <p><hr>
   1529  1.1.1.2.4.2  snj <a name="ntp_002dkeygen-mv_002dkeys"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-config">ntp-keygen config</a>,
   1530  1.1.1.2.4.2  snj Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-mv_002dparams">ntp-keygen mv-params</a>,
   1531  1.1.1.2.4.2  snj Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
   1532  1.1.1.2.4.2  snj <br>
   1533  1.1.1.2.4.2  snj </div>
   1534  1.1.1.2.4.2  snj 
   1535  1.1.1.2.4.2  snj <h4 class="subsection">mv-keys option (-v)</h4>
   1536  1.1.1.2.4.2  snj 
   1537  1.1.1.2.4.2  snj <p><a name="index-ntp_002dkeygen_002dmv_002dkeys-22"></a>
   1538  1.1.1.2.4.2  snj This is the ``update &lt;num&gt; mv keys'' option. 
   1539  1.1.1.2.4.2  snj This option takes a number argument <span class="file">num</span>.
   1540  1.1.1.2.4.2  snj 
   1541  1.1.1.2.4.2  snj <p class="noindent">This option has some usage constraints.  It:
   1542  1.1.1.2.4.2  snj      <ul>
   1543  1.1.1.2.4.2  snj <li>must be compiled in by defining <code>AUTOKEY</code> during the compilation. 
   1544  1.1.1.2.4.2  snj </ul>
   1545  1.1.1.2.4.2  snj 
   1546  1.1.1.2.4.2  snj   <p>This option has no <span class="samp">doc</span> documentation.
   1547  1.1.1.2.4.2  snj 
   1548  1.1.1.2.4.2  snj <div class="node">
   1549  1.1.1.2.4.2  snj <p><hr>
   1550  1.1.1.2.4.2  snj <a name="ntp_002dkeygen-config"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-exit-status">ntp-keygen exit status</a>,
   1551  1.1.1.2.4.2  snj Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-mv_002dkeys">ntp-keygen mv-keys</a>,
   1552  1.1.1.2.4.2  snj Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
   1553  1.1.1.2.4.2  snj <br>
   1554  1.1.1.2.4.2  snj </div>
   1555  1.1.1.2.4.2  snj 
   1556  1.1.1.2.4.2  snj <h4 class="subsection">presetting/configuring ntp-keygen</h4>
   1557  1.1.1.2.4.2  snj 
   1558  1.1.1.2.4.2  snj <p>Any option that is not marked as <i>not presettable</i> may be preset by
   1559  1.1.1.2.4.2  snj loading values from configuration ("rc" or "ini") files, and values from environment variables named <code>NTP-KEYGEN</code> and <code>NTP-KEYGEN_&lt;OPTION_NAME&gt;</code>.  <code>&lt;OPTION_NAME&gt;</code> must be one of
   1560  1.1.1.2.4.2  snj the options listed above in upper case and segmented with underscores. 
   1561  1.1.1.2.4.2  snj The <code>NTP-KEYGEN</code> variable will be tokenized and parsed like
   1562  1.1.1.2.4.2  snj the command line.  The remaining variables are tested for existence and their
   1563  1.1.1.2.4.2  snj values are treated like option arguments.
   1564  1.1.1.2.4.2  snj 
   1565  1.1.1.2.4.2  snj <p class="noindent"><code>libopts</code> will search in 2 places for configuration files:
   1566  1.1.1.2.4.2  snj      <ul>
   1567  1.1.1.2.4.2  snj <li>$HOME
   1568  1.1.1.2.4.2  snj <li>$PWD
   1569  1.1.1.2.4.2  snj </ul>
   1570  1.1.1.2.4.2  snj   The environment variables <code>HOME</code>, and <code>PWD</code>
   1571  1.1.1.2.4.2  snj are expanded and replaced when <span class="file">ntp-keygen</span> runs. 
   1572  1.1.1.2.4.2  snj For any of these that are plain files, they are simply processed. 
   1573  1.1.1.2.4.2  snj For any that are directories, then a file named <span class="file">.ntprc</span> is searched for
   1574  1.1.1.2.4.2  snj within that directory and processed.
   1575  1.1.1.2.4.2  snj 
   1576  1.1.1.2.4.2  snj   <p>Configuration files may be in a wide variety of formats. 
   1577  1.1.1.2.4.2  snj The basic format is an option name followed by a value (argument) on the
   1578  1.1.1.2.4.2  snj same line.  Values may be separated from the option name with a colon,
   1579  1.1.1.2.4.2  snj equal sign or simply white space.  Values may be continued across multiple
   1580  1.1.1.2.4.2  snj lines by escaping the newline with a backslash.
   1581  1.1.1.2.4.2  snj 
   1582  1.1.1.2.4.2  snj   <p>Multiple programs may also share the same initialization file. 
   1583  1.1.1.2.4.2  snj Common options are collected at the top, followed by program specific
   1584  1.1.1.2.4.2  snj segments.  The segments are separated by lines like:
   1585  1.1.1.2.4.2  snj <pre class="example">    [NTP-KEYGEN]
   1586  1.1.1.2.4.2  snj </pre>
   1587  1.1.1.2.4.2  snj   <p class="noindent">or by
   1588  1.1.1.2.4.2  snj <pre class="example">    &lt;?program ntp-keygen&gt;
   1589  1.1.1.2.4.2  snj </pre>
   1590  1.1.1.2.4.2  snj   <p class="noindent">Do not mix these styles within one configuration file.
   1591  1.1.1.2.4.2  snj 
   1592  1.1.1.2.4.2  snj   <p>Compound values and carefully constructed string values may also be
   1593  1.1.1.2.4.2  snj specified using XML syntax:
   1594  1.1.1.2.4.2  snj <pre class="example">    &lt;option-name&gt;
   1595  1.1.1.2.4.2  snj        &lt;sub-opt&gt;...&amp;lt;...&amp;gt;...&lt;/sub-opt&gt;
   1596  1.1.1.2.4.2  snj     &lt;/option-name&gt;
   1597  1.1.1.2.4.2  snj </pre>
   1598  1.1.1.2.4.2  snj   <p class="noindent">yielding an <code>option-name.sub-opt</code> string value of
   1599  1.1.1.2.4.2  snj <pre class="example">    "...&lt;...&gt;..."
   1600  1.1.1.2.4.2  snj </pre>
   1601  1.1.1.2.4.2  snj   <p><code>AutoOpts</code> does not track suboptions.  You simply note that it is a
   1602  1.1.1.2.4.2  snj hierarchicly valued option.  <code>AutoOpts</code> does provide a means for searching
   1603  1.1.1.2.4.2  snj the associated name/value pair list (see: optionFindValue).
   1604  1.1.1.2.4.2  snj 
   1605  1.1.1.2.4.2  snj   <p>The command line options relating to configuration and/or usage help are:
   1606  1.1.1.2.4.2  snj 
   1607  1.1.1.2.4.2  snj <h5 class="subsubheading">version (-)</h5>
   1608  1.1.1.2.4.2  snj 
   1609  1.1.1.2.4.2  snj <p>Print the program version to standard out, optionally with licensing
   1610  1.1.1.2.4.2  snj information, then exit 0.  The optional argument specifies how much licensing
   1611  1.1.1.2.4.2  snj detail to provide.  The default is to print just the version.  The licensing infomation may be selected with an option argument. 
   1612  1.1.1.2.4.2  snj Only the first letter of the argument is examined:
   1613  1.1.1.2.4.2  snj 
   1614  1.1.1.2.4.2  snj      <dl>
   1615  1.1.1.2.4.2  snj <dt><span class="samp">version</span><dd>Only print the version.  This is the default. 
   1616  1.1.1.2.4.2  snj <br><dt><span class="samp">copyright</span><dd>Name the copyright usage licensing terms. 
   1617  1.1.1.2.4.2  snj <br><dt><span class="samp">verbose</span><dd>Print the full copyright usage licensing terms. 
   1618  1.1.1.2.4.2  snj </dl>
   1619  1.1.1.2.4.2  snj 
   1620  1.1.1.2.4.2  snj <div class="node">
   1621  1.1.1.2.4.2  snj <p><hr>
   1622  1.1.1.2.4.2  snj <a name="ntp_002dkeygen-exit-status"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-Usage">ntp-keygen Usage</a>,
   1623  1.1.1.2.4.2  snj Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-config">ntp-keygen config</a>,
   1624  1.1.1.2.4.2  snj Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
   1625  1.1.1.2.4.2  snj <br>
   1626  1.1.1.2.4.2  snj </div>
   1627  1.1.1.2.4.2  snj 
   1628  1.1.1.2.4.2  snj <h4 class="subsection">ntp-keygen exit status</h4>
   1629  1.1.1.2.4.2  snj 
   1630  1.1.1.2.4.2  snj <p>One of the following exit values will be returned:
   1631  1.1.1.2.4.2  snj      <dl>
   1632  1.1.1.2.4.2  snj <dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution. 
   1633  1.1.1.2.4.2  snj <br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid. 
   1634  1.1.1.2.4.2  snj <br><dt><span class="samp">66 (EX_NOINPUT)</span><dd>A specified configuration file could not be loaded. 
   1635  1.1.1.2.4.2  snj <br><dt><span class="samp">70 (EX_SOFTWARE)</span><dd>libopts had an internal operational error.  Please report
   1636  1.1.1.2.4.2  snj it to autogen-users (a] lists.sourceforge.net.  Thank you. 
   1637  1.1.1.2.4.2  snj </dl>
   1638  1.1.1.2.4.2  snj   <div class="node">
   1639  1.1.1.2.4.2  snj <p><hr>
   1640  1.1.1.2.4.2  snj <a name="ntp_002dkeygen-Usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-Notes">ntp-keygen Notes</a>,
   1641  1.1.1.2.4.2  snj Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-exit-status">ntp-keygen exit status</a>,
   1642  1.1.1.2.4.2  snj Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
   1643  1.1.1.2.4.2  snj <br>
   1644  1.1.1.2.4.2  snj </div>
   1645  1.1.1.2.4.2  snj 
   1646  1.1.1.2.4.2  snj <h4 class="subsection">ntp-keygen Usage</h4>
   1647  1.1.1.2.4.2  snj 
   1648  1.1.1.2.4.2  snj <div class="node">
   1649  1.1.1.2.4.2  snj <p><hr>
   1650  1.1.1.2.4.2  snj <a name="ntp_002dkeygen-Notes"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-Bugs">ntp-keygen Bugs</a>,
   1651  1.1.1.2.4.2  snj Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-Usage">ntp-keygen Usage</a>,
   1652  1.1.1.2.4.2  snj Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
   1653  1.1.1.2.4.2  snj <br>
   1654  1.1.1.2.4.2  snj </div>
   1655  1.1.1.2.4.2  snj 
   1656  1.1.1.2.4.2  snj <h4 class="subsection">ntp-keygen Notes</h4>
   1657  1.1.1.2.4.2  snj 
   1658  1.1.1.2.4.2  snj <div class="node">
   1659  1.1.1.2.4.2  snj <p><hr>
   1660  1.1.1.2.4.2  snj <a name="ntp_002dkeygen-Bugs"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-Notes">ntp-keygen Notes</a>,
   1661  1.1.1.2.4.2  snj Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
   1662  1.1.1.2.4.2  snj <br>
   1663  1.1.1.2.4.2  snj </div>
   1664  1.1.1.2.4.2  snj 
   1665  1.1.1.2.4.2  snj <h4 class="subsection">ntp-keygen Bugs</h4>
   1666  1.1.1.2.4.2  snj 
   1667  1.1.1.2.4.2  snj <div class="node">
   1668  1.1.1.2.4.2  snj <p><hr>
   1669  1.1.1.2.4.2  snj <a name="Random-Seed-File"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Cryptographic-Data-Files">Cryptographic Data Files</a>,
   1670  1.1.1.2.4.2  snj Previous:&nbsp;<a rel="previous" accesskey="p" href="#Running-the-Program">Running the Program</a>,
   1671  1.1.1.2.4.2  snj Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
   1672  1.1.1.2.4.2  snj <br>
   1673  1.1.1.2.4.2  snj </div>
   1674  1.1.1.2.4.2  snj 
   1675  1.1.1.2.4.2  snj <!-- node-name,  next,  previous,  up -->
   1676  1.1.1.2.4.2  snj <h3 class="section">Random Seed File</h3>
   1677  1.1.1.2.4.2  snj 
   1678  1.1.1.2.4.2  snj <p>All cryptographically sound key generation schemes must have means to
   1679  1.1.1.2.4.2  snj randomize the entropy seed used to initialize the internal
   1680  1.1.1.2.4.2  snj pseudo-random number generator used by the OpenSSL library routines. 
   1681  1.1.1.2.4.2  snj If a site supports ssh, it is very likely that means to do this are
   1682  1.1.1.2.4.2  snj already available. 
   1683  1.1.1.2.4.2  snj The entropy seed used by the OpenSSL library is contained in a file,
   1684  1.1.1.2.4.2  snj usually called <code>.rnd</code>, which must be available when
   1685  1.1.1.2.4.2  snj starting the <code>ntp-keygen</code> program or <code>ntpd</code> daemon.
   1686  1.1.1.2.4.2  snj 
   1687  1.1.1.2.4.2  snj   <p>The OpenSSL library looks for the file using the path specified by the
   1688  1.1.1.2.4.2  snj <code>RANDFILE</code> environment variable in the user home directory, whether root
   1689  1.1.1.2.4.2  snj or some other user. 
   1690  1.1.1.2.4.2  snj If the <code>RANDFILE</code> environment variable is not
   1691  1.1.1.2.4.2  snj present, the library looks for the <code>.rnd</code> file in the user home
   1692  1.1.1.2.4.2  snj directory. 
   1693  1.1.1.2.4.2  snj Since both the <code>ntp-keygen</code> program and <code>ntpd</code> daemon must run
   1694  1.1.1.2.4.2  snj as root, the logical place to put this file is in <code>/.rnd</code> or
   1695  1.1.1.2.4.2  snj <code>/root/.rnd</code>. 
   1696  1.1.1.2.4.2  snj If the file is not available or cannot be written, the program exits
   1697  1.1.1.2.4.2  snj with a message to the system log.
   1698  1.1.1.2.4.2  snj 
   1699  1.1.1.2.4.2  snj <div class="node">
   1700  1.1.1.2.4.2  snj <p><hr>
   1701  1.1.1.2.4.2  snj <a name="Cryptographic-Data-Files"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#Random-Seed-File">Random Seed File</a>,
   1702  1.1.1.2.4.2  snj Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
   1703  1.1.1.2.4.2  snj <br>
   1704  1.1.1.2.4.2  snj </div>
   1705  1.1.1.2.4.2  snj 
   1706  1.1.1.2.4.2  snj <!-- node-name,  next,  previous,  up -->
   1707  1.1.1.2.4.2  snj <h3 class="section">Cryptographic Data Files</h3>
   1708  1.1.1.2.4.2  snj 
   1709  1.1.1.2.4.2  snj <p>File and link names are in the <code>form ntpkey_key_name.fstamp</code>,
   1710  1.1.1.2.4.2  snj where <code>key</code> is the key or parameter type,
   1711  1.1.1.2.4.2  snj <code>name</code> is the host or group name and
   1712  1.1.1.2.4.2  snj <code>fstamp</code> is the filestamp (NTP seconds) when the file was created). 
   1713  1.1.1.2.4.2  snj By convention, key names in generated file names include both upper and
   1714  1.1.1.2.4.2  snj lower case characters, while key names in generated link names include
   1715  1.1.1.2.4.2  snj only lower case characters. The filestamp is not used in generated link
   1716  1.1.1.2.4.2  snj names.
   1717  1.1.1.2.4.2  snj 
   1718  1.1.1.2.4.2  snj   <p>The key name is a string defining the cryptographic key type. 
   1719  1.1.1.2.4.2  snj Key types include public/private keys host and sign, certificate cert
   1720  1.1.1.2.4.2  snj and several challenge/response key types. 
   1721  1.1.1.2.4.2  snj By convention, client files used for
   1722  1.1.1.2.4.2  snj challenges have a par subtype, as in the IFF challenge IFFpar, while
   1723  1.1.1.2.4.2  snj server files for responses have a key subtype, as in the GQ response
   1724  1.1.1.2.4.2  snj GQkey.
   1725  1.1.1.2.4.2  snj 
   1726  1.1.1.2.4.2  snj   <p>All files begin with two nonencrypted lines. The first line contains
   1727  1.1.1.2.4.2  snj the file name in the format <code>ntpkey_key_host.fstamp</code>. 
   1728  1.1.1.2.4.2  snj The second line contains the datestamp in conventional Unix date format. 
   1729  1.1.1.2.4.2  snj Lines beginning with <code>#</code> are ignored.
   1730  1.1.1.2.4.2  snj 
   1731  1.1.1.2.4.2  snj   <p>The remainder of the file contains cryptographic data encoded first
   1732  1.1.1.2.4.2  snj using ASN.1 rules, then encrypted using the DES-CBC algorithm with
   1733  1.1.1.2.4.2  snj given password and finally written in PEM-encoded printable ASCII text
   1734  1.1.1.2.4.2  snj preceded and followed by MIME content identifier lines.
   1735  1.1.1.2.4.2  snj 
   1736  1.1.1.2.4.2  snj   <p>The format of the symmetric keys file, ordinarily named <code>ntp.keys</code>,
   1737  1.1.1.2.4.2  snj is somewhat different than the other files in the interest of backward
   1738  1.1.1.2.4.2  snj compatibility. 
   1739  1.1.1.2.4.2  snj Ordinarily, the file is generated by this program, but
   1740  1.1.1.2.4.2  snj it can be constructed and edited using an ordinary text editor.
   1741  1.1.1.2.4.2  snj 
   1742  1.1.1.2.4.2  snj <pre class="example">    # ntpkey_MD5key_hms.local.3564038757
   1743  1.1.1.2.4.2  snj     # Sun Dec  9 02:45:57 2012
   1744  1.1.1.2.4.2  snj     
   1745  1.1.1.2.4.2  snj      1 MD5 "]!ghT%O;3)WJ,/Nc:&gt;I  # MD5 key
   1746  1.1.1.2.4.2  snj      2 MD5 lu+H^tF46BKR-6~pV_5  # MD5 key
   1747  1.1.1.2.4.2  snj      3 MD5 :lnoVsE%Yz*avh%EtNC  # MD5 key
   1748  1.1.1.2.4.2  snj      4 MD5 |fdZrf0sF~^V  # MD5 key
   1749  1.1.1.2.4.2  snj      5 MD5 IyAG&gt;O"y"LmCRS!*bHC  # MD5 key
   1750  1.1.1.2.4.2  snj      6 MD5 "&gt;e\A  # MD5 key
   1751  1.1.1.2.4.2  snj      7 MD5 c9x=M'CfLxax9v)PV-si  # MD5 key
   1752  1.1.1.2.4.2  snj      8 MD5 E|=jvFVov?Bn|Ev=&amp;aK\  # MD5 key
   1753  1.1.1.2.4.2  snj      9 MD5 T!c4UT&amp;`(m$+m+B6,`Q0  # MD5 key
   1754  1.1.1.2.4.2  snj     10 MD5 JVF/1=)=IFbHbJQz..Cd  # MD5 key
   1755  1.1.1.2.4.2  snj     11 SHA1 6dea311109529e436c2b4fccae9bc753c16d1b48  # SHA1 key
   1756  1.1.1.2.4.2  snj     12 SHA1 7076f373d86c4848c59ff8046e49cb7d614ec394  # SHA1 key
   1757  1.1.1.2.4.2  snj     13 SHA1 5f48b1b60591eb01b7cf1d33b7774f08d20262d3  # SHA1 key
   1758  1.1.1.2.4.2  snj     14 SHA1 eed5ab9d9497319ec60cf3781d52607e76720178  # SHA1 key
   1759  1.1.1.2.4.2  snj     15 SHA1 f283562611a04c964da8126296f5f8e58c3f85de  # SHA1 key
   1760  1.1.1.2.4.2  snj     16 SHA1 1930da171297dd63549af50b29449de17dcf341f  # SHA1 key
   1761  1.1.1.2.4.2  snj     17 SHA1 fee892110358cd4382322b889869e750db8e8a8f  # SHA1 key
   1762  1.1.1.2.4.2  snj     18 SHA1 b5520c9fadd7ad3fd8bfa061c8821b65d029bb37  # SHA1 key
   1763  1.1.1.2.4.2  snj     19 SHA1 8c74fb440ec80f453ec6aaa62b9baed0ab723b92  # SHA1 key
   1764  1.1.1.2.4.2  snj     20 SHA1 6bc05f734306a189326000970c19b3910f403795  # SHA1 key
   1765  1.1.1.2.4.2  snj </pre>
   1766  1.1.1.2.4.2  snj   <p>Figure 1. Typical Symmetric Key File
   1767  1.1.1.2.4.2  snj 
   1768  1.1.1.2.4.2  snj   <p>Figure 1 shows a typical symmetric keys file used by the reference
   1769  1.1.1.2.4.2  snj implementation. 
   1770  1.1.1.2.4.2  snj Each line of the file contains three fields, first an
   1771  1.1.1.2.4.2  snj integer between 1 and 65534, inclusive, representing the key identifier
   1772  1.1.1.2.4.2  snj used in the server and peer configuration commands. 
   1773  1.1.1.2.4.2  snj Next is the key type for the message digest algorithm,
   1774  1.1.1.2.4.2  snj which in the absence of the
   1775  1.1.1.2.4.2  snj OpenSSL library must be MD5 to designate the MD5 message digest
   1776  1.1.1.2.4.2  snj algorithm. 
   1777  1.1.1.2.4.2  snj If the OpenSSL library is installed, the key type can be any
   1778  1.1.1.2.4.2  snj message digest algorithm supported by that library. 
   1779  1.1.1.2.4.2  snj However, if
   1780  1.1.1.2.4.2  snj compatibility with FIPS 140-2 is required, the key type must be either
   1781  1.1.1.2.4.2  snj SHA or SHA1. 
   1782  1.1.1.2.4.2  snj The key type can be changed using an ASCII text editor.
   1783  1.1.1.2.4.2  snj 
   1784  1.1.1.2.4.2  snj   <p>An MD5 key consists of a printable ASCII string less than or equal to
   1785  1.1.1.2.4.2  snj 16 characters and terminated by whitespace or a # character. 
   1786  1.1.1.2.4.2  snj An OpenSSL
   1787  1.1.1.2.4.2  snj key consists of a hex-encoded ASCII string of 40 characters, which is
   1788  1.1.1.2.4.2  snj truncated as necessary.
   1789  1.1.1.2.4.2  snj 
   1790  1.1.1.2.4.2  snj   <p>Note that the keys used by the <code>ntpq</code> and <code>ntpdc</code> programs are
   1791  1.1.1.2.4.2  snj checked against passwords requested by the programs and entered by hand,
   1792  1.1.1.2.4.2  snj so it
   1793  1.1.1.2.4.2  snj is generally appropriate to specify these keys in human readable ASCII
   1794  1.1.1.2.4.2  snj format.
   1795  1.1.1.2.4.2  snj 
   1796  1.1.1.2.4.2  snj   <p>The <code>ntp-keygen</code> program generates a MD5 symmetric keys file
   1797  1.1.1.2.4.2  snj <code>ntpkey_MD5key_hostname.filestamp</code>. 
   1798  1.1.1.2.4.2  snj Since the file contains private
   1799  1.1.1.2.4.2  snj shared keys, it should be visible only to root and distributed by
   1800  1.1.1.2.4.2  snj secure means to other subnet hosts. 
   1801  1.1.1.2.4.2  snj The NTP daemon loads the file <code>ntp.keys</code>, so <code>ntp-keygen</code>
   1802  1.1.1.2.4.2  snj installs a soft link from this name to the generated file. 
   1803  1.1.1.2.4.2  snj Subsequently, similar soft links must be installed by
   1804  1.1.1.2.4.2  snj manual or automated means on the other subnet hosts. 
   1805  1.1.1.2.4.2  snj While this file is
   1806  1.1.1.2.4.2  snj not used with the Autokey Version 2 protocol, it is needed to
   1807  1.1.1.2.4.2  snj authenticate some remote configuration commands used by the <code>ntpq</code> and
   1808  1.1.1.2.4.2  snj <code>ntpdc</code> utilities.
   1809  1.1.1.2.4.2  snj 
   1810  1.1.1.2.4.2  snj </body></html>
   1811  1.1.1.2.4.2  snj 
   1812