summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/util/ntp-keygen.html
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ntp/util/ntp-keygen.html')
-rw-r--r--contrib/ntp/util/ntp-keygen.html1047
1 files changed, 604 insertions, 443 deletions
diff --git a/contrib/ntp/util/ntp-keygen.html b/contrib/ntp/util/ntp-keygen.html
index b4fc629..854d055 100644
--- a/contrib/ntp/util/ntp-keygen.html
+++ b/contrib/ntp/util/ntp-keygen.html
@@ -70,7 +70,7 @@ All other files are in PEM-encoded
printable ASCII format so they can be embedded as MIME attachments in
mail to other sites.
- <p>This document applies to version 4.2.8p10 of <code>ntp-keygen</code>.
+ <p>This document applies to version 4.2.8p11 of <code>ntp-keygen</code>.
<div class="node">
<p><hr>
@@ -217,26 +217,29 @@ Autokey Public-Key Authentication page.
<p>This program generates cryptographic data files used by the NTPv4
authentication and identification schemes.
-It generates MD5 key files used in symmetric key cryptography.
-In addition, if the OpenSSL software library has been installed,
-it generates keys, certificate and identity files used in public key
-cryptography.
+It can generate message digest keys used in symmetric key cryptography and,
+if the OpenSSL software library has been installed, it can generate host keys,
+signing keys, certificates, and identity keys and parameters used in Autokey
+public key cryptography.
These files are used for cookie encryption,
-digital signature and challenge/response identification algorithms
+digital signature, and challenge/response identification algorithms
compatible with the Internet standard security infrastructure.
- <p>All files are in PEM-encoded printable ASCII format,
-so they can be embedded as MIME attachments in mail to other sites
+ <p>The message digest symmetric keys file is generated in a format
+compatible with NTPv3.
+All other files are in PEM-encoded printable ASCII format,
+so they can be embedded as MIME attachments in email to other sites
and certificate authorities.
By default, files are not encrypted.
- <p>When used to generate message digest keys, the program produces a file
-containing ten pseudo-random printable ASCII strings suitable for the
-MD5 message digest algorithm included in the distribution.
+ <p>When used to generate message digest symmetric keys, the program
+produces a file containing ten pseudo-random printable ASCII strings
+suitable for the MD5 message digest algorithm included in the
+distribution.
If the OpenSSL library is installed, it produces an additional ten
-hex-encoded random bit strings suitable for the SHA1 and other message
-digest algorithms.
-The message digest keys file must be distributed and stored
+hex-encoded random bit strings suitable for SHA1, AES-128-CMAC, and
+other message digest algorithms.
+The message digest symmetric keys file must be distributed and stored
using secure means beyond the scope of NTP itself.
Besides the keys used for ordinary NTP associations, additional keys
can be defined as passwords for the
@@ -256,223 +259,133 @@ other than Autokey.
<p>Some files used by this program are encrypted using a private password.
The
<code>-p</code>
-option specifies the password for local encrypted files and the
+option specifies the read password for local encrypted files and the
<code>-q</code>
-option the password for encrypted files sent to remote sites.
+option the write password for encrypted files sent to remote sites.
If no password is specified, the host name returned by the Unix
-<code>gethostname()</code>
-function, normally the DNS name of the host is used.
+<code>hostname(1)</code>
+command, normally the DNS name of the host, is used as the the default read
+password, for convenience.
+The
+<code>ntp-keygen</code>
+program prompts for the password if it reads an encrypted file
+and the password is missing or incorrect.
+If an encrypted file is read successfully and
+no write password is specified, the read password is used
+as the write password by default.
<p>The
-<kbd>pw</kbd>
+<code>pw</code>
option of the
-<kbd>crypto</kbd>
+<code>crypto</code>
+<code>ntpd(1ntpdmdoc)</code>
configuration command specifies the read
password for previously encrypted local files.
-This must match the local password used by this program.
+This must match the local read password used by this program.
If not specified, the host name is used.
-Thus, if files are generated by this program without password,
+Thus, if files are generated by this program without an explicit password,
they can be read back by
-<kbd>ntpd</kbd>
-without password but only on the same host.
+<code>ntpd(1ntpdmdoc)</code>
+without specifying an explicit password but only on the same host.
+If the write password used for encryption is specified as the host name,
+these files can be read by that host with no explicit password.
<p>Normally, encrypted files for each host are generated by that host and
used only by that host, although exceptions exist as noted later on
this page.
The symmetric keys file, normally called
-<kbd>ntp.keys</kbd>,
+<span class="file">ntp.keys</span>,
is usually installed in
<span class="file">/etc</span>.
Other files and links are usually installed in
<span class="file">/usr/local/etc</span>,
which is normally in a shared filesystem in
NFS-mounted networks and cannot be changed by shared clients.
-The location of the keys directory can be changed by the
-<kbd>keysdir</kbd>
-configuration command in such cases.
-Normally, this is in
-<span class="file">/etc</span>.
+In these cases, NFS clients can specify the files in another
+directory such as
+<span class="file">/etc</span>
+using the
+<code>keysdir</code>
+<code>ntpd(1ntpdmdoc)</code>
+configuration file command.
<p>This program directs commentary and error messages to the standard
error stream
-<kbd>stderr</kbd>
+<span class="file">stderr</span>
and remote files to the standard output stream
-<kbd>stdout</kbd>
+<span class="file">stdout</span>
where they can be piped to other applications or redirected to files.
The names used for generated files and links all begin with the
string
-<kbd>ntpkey</kbd>
+<span class="file">ntpkey*</span>
and include the file type, generating host and filestamp,
as described in the
-Cryptographic Data Files
+<a href="#Cryptographic-Data-Files">Cryptographic Data Files</a>
section below.
<h5 class="subsubsection">Running the Program</h5>
-<p>To test and gain experience with Autokey concepts, log in as root and
-change to the keys directory, usually
-<span class="file">/usr/local/etc</span>
-When run for the first time, or if all files with names beginning with
-<kbd>ntpkey</kbd>
-have been removed, use the
-<code>ntp-keygen</code>
-command without arguments to generate a
-default RSA host key and matching RSA-MD5 certificate with expiration
-date one year hence.
-If run again without options, the program uses the
-existing keys and parameters and generates only a new certificate with
-new expiration date one year hence.
-
- <p>Run the command on as many hosts as necessary.
-Designate one of them as the trusted host (TH) using
-<code>ntp-keygen</code>
-with the
-<code>-T</code>
-option and configure it to synchronize from reliable Internet servers.
-Then configure the other hosts to synchronize to the TH directly or
-indirectly.
-A certificate trail is created when Autokey asks the immediately
-ascendant host towards the TH to sign its certificate, which is then
-provided to the immediately descendant host on request.
-All group hosts should have acyclic certificate trails ending on the TH.
-
- <p>The host key is used to encrypt the cookie when required and so must be
-RSA type.
-By default, the host key is also the sign key used to encrypt
-signatures.
-A different sign key can be assigned using the
-<code>-S</code>
-option and this can be either RSA or DSA type.
-By default, the signature
-message digest type is MD5, but any combination of sign key type and
-message digest type supported by the OpenSSL library can be specified
-using the
-<code>-c</code>
-option.
-The rules say cryptographic media should be generated with proventic
-filestamps, which means the host should already be synchronized before
-this program is run.
-This of course creates a chicken-and-egg problem
-when the host is started for the first time.
-Accordingly, the host time
-should be set by some other means, such as eyeball-and-wristwatch, at
-least so that the certificate lifetime is within the current year.
-After that and when the host is synchronized to a proventic source, the
-certificate should be re-generated.
-
- <p>Additional information on trusted groups and identity schemes is on the
-Autokey Public-Key Authentication
-page.
-
- <p>The
-<code>ntpd(1ntpdmdoc)</code>
-configuration command
-<code>crypto</code> <code>pw</code> <kbd>password</kbd>
-specifies the read password for previously encrypted files.
-The daemon expires on the spot if the password is missing
-or incorrect.
-For convenience, if a file has been previously encrypted,
-the default read password is the name of the host running
-the program.
-If the previous write password is specified as the host name,
-these files can be read by that host with no explicit password.
-
- <p>File names begin with the prefix
-<code>ntpkey_</code>
-and end with the postfix
-<kbd>_hostname.filestamp</kbd>,
-where
-<kbd>hostname</kbd>
-is the owner name, usually the string returned
-by the Unix gethostname() routine, and
-<kbd>filestamp</kbd>
-is the NTP seconds when the file was generated, in decimal digits.
-This both guarantees uniqueness and simplifies maintenance
-procedures, since all files can be quickly removed
-by a
-<code>rm</code> <code>ntpkey*</code>
-command or all files generated
-at a specific time can be removed by a
-<code>rm</code>
-<kbd>*filestamp</kbd>
-command.
-To further reduce the risk of misconfiguration,
-the first two lines of a file contain the file name
-and generation date and time as comments.
-
- <p>All files are installed by default in the keys directory
-<span class="file">/usr/local/etc</span>,
-which is normally in a shared filesystem
-in NFS-mounted networks.
-The actual location of the keys directory
-and each file can be overridden by configuration commands,
-but this is not recommended.
-Normally, the files for each host are generated by that host
-and used only by that host, although exceptions exist
-as noted later on this page.
-
- <p>Normally, files containing private values,
-including the host key, sign key and identification parameters,
-are permitted root read/write-only;
-while others containing public values are permitted world readable.
-Alternatively, files containing private values can be encrypted
-and these files permitted world readable,
-which simplifies maintenance in shared file systems.
-Since uniqueness is insured by the hostname and
-file name extensions, the files for a NFS server and
-dependent clients can all be installed in the same shared directory.
-
- <p>The recommended practice is to keep the file name extensions
-when installing a file and to install a soft link
-from the generic names specified elsewhere on this page
-to the generated files.
-This allows new file generations to be activated simply
-by changing the link.
-If a link is present, ntpd follows it to the file name
-to extract the filestamp.
-If a link is not present,
-<code>ntpd(1ntpdmdoc)</code>
-extracts the filestamp from the file itself.
-This allows clients to verify that the file and generation times
-are always current.
-The
-<code>ntp-keygen</code>
-program uses the same timestamp extension for all files generated
-at one time, so each generation is distinct and can be readily
-recognized in monitoring data.
-
-<h5 class="subsubsection">Running the program</h5>
-
<p>The safest way to run the
<code>ntp-keygen</code>
program is logged in directly as root.
-The recommended procedure is change to the keys directory,
-usually
+The recommended procedure is change to the
+<kbd>keys</kbd>
+directory, usually
<span class="file">/usr/local/etc</span>,
-then run the program.
-When run for the first time,
-or if all
-<code>ntpkey</code>
-files have been removed,
-the program generates a RSA host key file and matching RSA-MD5 certificate file,
+then run the program.
+
+ <p>To test and gain experience with Autokey concepts, log in as root and
+change to the
+<kbd>keys</kbd>
+directory, usually
+<span class="file">/usr/local/etc</span>.
+When run for the first time, or if all files with names beginning with
+<span class="file">ntpkey*</span>
+have been removed, use the
+<code>ntp-keygen</code>
+command without arguments to generate a default
+<code>RSA</code>
+host key and matching
+<code>RSA-MD5</code>
+certificate file with expiration date one year hence,
which is all that is necessary in many cases.
The program also generates soft links from the generic names
to the respective files.
-If run again, the program uses the same host key file,
-but generates a new certificate file and link.
+If run again without options, the program uses the
+existing keys and parameters and generates a new certificate file with
+new expiration date one year hence, and soft link.
- <p>The host key is used to encrypt the cookie when required and so must be RSA type.
+ <p>The host key is used to encrypt the cookie when required and so must be
+<code>RSA</code>
+type.
By default, the host key is also the sign key used to encrypt signatures.
When necessary, a different sign key can be specified and this can be
-either RSA or DSA type.
-By default, the message digest type is MD5, but any combination
+either
+<code>RSA</code>
+or
+<code>DSA</code>
+type.
+By default, the message digest type is
+<code>MD5</code>,
+but any combination
of sign key type and message digest type supported by the OpenSSL library
-can be specified, including those using the MD2, MD5, SHA, SHA1, MDC2
-and RIPE160 message digest algorithms.
+can be specified, including those using the
+<code>AES128CMAC</code>, <code>MD2</code>, <code>MD5</code>, <code>MDC2</code>, <code>SHA</code>, <code>SHA1</code>
+and
+<code>RIPE160</code>
+message digest algorithms.
However, the scheme specified in the certificate must be compatible
with the sign key.
-Certificates using any digest algorithm are compatible with RSA sign keys;
-however, only SHA and SHA1 certificates are compatible with DSA sign keys.
+Certificates using any digest algorithm are compatible with
+<code>RSA</code>
+sign keys;
+however, only
+<code>SHA</code>
+and
+<code>SHA1</code>
+certificates are compatible with
+<code>DSA</code>
+sign keys.
<p>Private/public key files and certificates are compatible with
other OpenSSL applications and very likely other libraries as well.
@@ -483,19 +396,19 @@ However, the identification parameter files, although encoded
as the other files, are probably not compatible with anything other than Autokey.
<p>Running the program as other than root and using the Unix
-<code>su</code>
+<code>su(1)</code>
command
to assume root may not work properly, since by default the OpenSSL library
looks for the random seed file
-<code>.rnd</code>
+<span class="file">.rnd</span>
in the user home directory.
However, there should be only one
-<code>.rnd</code>,
+<span class="file">.rnd</span>,
most conveniently
in the root directory, so it is convenient to define the
-<code>$RANDFILE</code>
+.Ev RANDFILE
environment variable used by the OpenSSL library as the path to
-<code>/.rnd</code>.
+<span class="file">.rnd</span>.
<p>Installing the keys as root might not work in NFS-mounted
shared file systems, as NFS clients may not be able to write
@@ -505,7 +418,8 @@ directory such as
<span class="file">/etc</span>
using the
<code>keysdir</code>
-command.
+<code>ntpd(1ntpdmdoc)</code>
+configuration file command.
There is no need for one client to read the keys and certificates
of other clients or servers, as these data are obtained automatically
by the Autokey protocol.
@@ -538,8 +452,11 @@ while others containing public values are permitted world readable.
Alternatively, files containing private values can be encrypted
and these files permitted world readable,
which simplifies maintenance in shared file systems.
-Since uniqueness is insured by the hostname and
-file name extensions, the files for a NFS server and
+Since uniqueness is insured by the
+<kbd>hostname</kbd>
+and
+<kbd>filestamp</kbd>
+file name extensions, the files for an NTP server and
dependent clients can all be installed in the same shared directory.
<p>The recommended practice is to keep the file name extensions
@@ -548,109 +465,113 @@ from the generic names specified elsewhere on this page
to the generated files.
This allows new file generations to be activated simply
by changing the link.
-If a link is present, ntpd follows it to the file name
-to extract the filestamp.
+If a link is present,
+<code>ntpd(1ntpdmdoc)</code>
+follows it to the file name to extract the
+<kbd>filestamp</kbd>.
If a link is not present,
<code>ntpd(1ntpdmdoc)</code>
-extracts the filestamp from the file itself.
+extracts the
+<kbd>filestamp</kbd>
+from the file itself.
This allows clients to verify that the file and generation times
are always current.
The
<code>ntp-keygen</code>
-program uses the same timestamp extension for all files generated
+program uses the same
+<kbd>filestamp</kbd>
+extension for all files generated
at one time, so each generation is distinct and can be readily
recognized in monitoring data.
-<h5 class="subsubsection">Running the program</h5>
-
-<p>The safest way to run the
+ <p>Run the command on as many hosts as necessary.
+Designate one of them as the trusted host (TH) using
<code>ntp-keygen</code>
-program is logged in directly as root.
-The recommended procedure is change to the keys directory,
-usually
-<span class="file">/usr/local/etc</span>,
-then run the program.
-When run for the first time,
-or if all
-<code>ntpkey</code>
-files have been removed,
-the program generates a RSA host key file and matching RSA-MD5 certificate file,
-which is all that is necessary in many cases.
-The program also generates soft links from the generic names
-to the respective files.
-If run again, the program uses the same host key file,
-but generates a new certificate file and link.
+with the
+<code>-T</code>
+option and configure it to synchronize from reliable Internet servers.
+Then configure the other hosts to synchronize to the TH directly or
+indirectly.
+A certificate trail is created when Autokey asks the immediately
+ascendant host towards the TH to sign its certificate, which is then
+provided to the immediately descendant host on request.
+All group hosts should have acyclic certificate trails ending on the TH.
- <p>The host key is used to encrypt the cookie when required and so must be RSA type.
-By default, the host key is also the sign key used to encrypt signatures.
-When necessary, a different sign key can be specified and this can be
-either RSA or DSA type.
-By default, the message digest type is MD5, but any combination
-of sign key type and message digest type supported by the OpenSSL library
-can be specified, including those using the MD2, MD5, SHA, SHA1, MDC2
-and RIPE160 message digest algorithms.
-However, the scheme specified in the certificate must be compatible
-with the sign key.
-Certificates using any digest algorithm are compatible with RSA sign keys;
-however, only SHA and SHA1 certificates are compatible with DSA sign keys.
+ <p>The host key is used to encrypt the cookie when required and so must be
+RSA type.
+By default, the host key is also the sign key used to encrypt
+signatures.
+A different sign key can be assigned using the
+<code>-S</code>
+option and this can be either
+<code>RSA</code>
+or
+<code>DSA</code>
+type.
+By default, the signature
+message digest type is
+<code>MD5</code>,
+but any combination of sign key type and
+message digest type supported by the OpenSSL library can be specified
+using the
+<code>-c</code>
+option.
- <p>Private/public key files and certificates are compatible with
-other OpenSSL applications and very likely other libraries as well.
-Certificates or certificate requests derived from them should be compatible
-with extant industry practice, although some users might find
-the interpretation of X509v3 extension fields somewhat liberal.
-However, the identification parameter files, although encoded
-as the other files, are probably not compatible with anything other than Autokey.
+ <p>The rules say cryptographic media should be generated with proventic
+filestamps, which means the host should already be synchronized before
+this program is run.
+This of course creates a chicken-and-egg problem
+when the host is started for the first time.
+Accordingly, the host time
+should be set by some other means, such as eyeball-and-wristwatch, at
+least so that the certificate lifetime is within the current year.
+After that and when the host is synchronized to a proventic source, the
+certificate should be re-generated.
- <p>Running the program as other than root and using the Unix
-<code>su</code>
-command
-to assume root may not work properly, since by default the OpenSSL library
-looks for the random seed file
-<code>.rnd</code>
-in the user home directory.
-However, there should be only one
-<code>.rnd</code>,
-most conveniently
-in the root directory, so it is convenient to define the
-<code>$RANDFILE</code>
-environment variable used by the OpenSSL library as the path to
-<code>/.rnd</code>.
+ <p>Additional information on trusted groups and identity schemes is on the
+Autokey Public-Key Authentication
+page.
- <p>Installing the keys as root might not work in NFS-mounted
-shared file systems, as NFS clients may not be able to write
-to the shared keys directory, even as root.
-In this case, NFS clients can specify the files in another
-directory such as
-<span class="file">/etc</span>
-using the
-<code>keysdir</code>
+ <p>File names begin with the prefix
+<span class="file">ntpkey</span>_
+and end with the suffix
+<span class="file">_</span><kbd>hostname</kbd>. <kbd>filestamp</kbd>,
+where
+<kbd>hostname</kbd>
+is the owner name, usually the string returned
+by the Unix
+<code>hostname(1)</code>
+command, and
+<kbd>filestamp</kbd>
+is the NTP seconds when the file was generated, in decimal digits.
+This both guarantees uniqueness and simplifies maintenance
+procedures, since all files can be quickly removed
+by a
+<code>rm</code> <span class="file">ntpkey*</span>
+command or all files generated
+at a specific time can be removed by a
+<code>rm</code> <span class="file">*</span><kbd>filestamp</kbd>
command.
-There is no need for one client to read the keys and certificates
-of other clients or servers, as these data are obtained automatically
-by the Autokey protocol.
+To further reduce the risk of misconfiguration,
+the first two lines of a file contain the file name
+and generation date and time as comments.
- <p>Ordinarily, cryptographic files are generated by the host that uses them,
-but it is possible for a trusted agent (TA) to generate these files
-for other hosts; however, in such cases files should always be encrypted.
-The subject name and trusted name default to the hostname
-of the host generating the files, but can be changed by command line options.
-It is convenient to designate the owner name and trusted name
-as the subject and issuer fields, respectively, of the certificate.
-The owner name is also used for the host and sign key files,
-while the trusted name is used for the identity files.
-seconds.
-seconds.
+<h5 class="subsubsection">Trusted Hosts and Groups</h5>
- <p>s Trusted Hosts and Groups
-Each cryptographic configuration involves selection of a signature scheme
+<p>Each cryptographic configuration involves selection of a signature scheme
and identification scheme, called a cryptotype,
as explained in the
<a href="#Authentication-Options">Authentication Options</a>
section of
<code>ntp.conf(5)</code>.
-The default cryptotype uses RSA encryption, MD5 message digest
-and TC identification.
+The default cryptotype uses
+<code>RSA</code>
+encryption,
+<code>MD5</code>
+message digest
+and
+<code>TC</code>
+identification.
First, configure a NTP subnet including one or more low-stratum
trusted hosts from which all other hosts derive synchronization
directly or indirectly.
@@ -668,7 +589,7 @@ section of
<p>On each trusted host as root, change to the keys directory.
To insure a fresh fileset, remove all
-<code>ntpkey</code>
+<span class="file">ntpkey</span>
files.
Then run
<code>ntp-keygen</code>
@@ -693,7 +614,9 @@ is either
<code>RSA</code>
or
<code>DSA</code>.
-The most often need to do this is when a DSA-signed certificate is used.
+The most frequent need to do this is when a
+<code>DSA</code>-signed
+certificate is used.
If it is necessary to use a different certificate scheme than the default,
run
<code>ntp-keygen</code>
@@ -702,17 +625,17 @@ with the
option and selected
<kbd>scheme</kbd>
as needed.
-f
+If
<code>ntp-keygen</code>
is run again without these options, it generates a new certificate
-using the same scheme and sign key.
+using the same scheme and sign key, and soft link.
<p>After setting up the environment it is advisable to update certificates
from time to time, if only to extend the validity interval.
Simply run
<code>ntp-keygen</code>
with the same flags as before to generate new certificates
-using existing keys.
+using existing keys, and soft links.
However, if the host or sign key is changed,
<code>ntpd(1ntpdmdoc)</code>
should be restarted.
@@ -725,13 +648,15 @@ at which time the protocol is restarted.
<h5 class="subsubsection">Identity Schemes</h5>
<p>As mentioned on the Autonomous Authentication page,
-the default TC identity scheme is vulnerable to a middleman attack.
+the default
+<code>TC</code>
+identity scheme is vulnerable to a middleman attack.
However, there are more secure identity schemes available,
-including PC, IFF, GQ and MV described on the
-"Identification Schemes"
-page
-(maybe available at
-<code>http://www.eecis.udel.edu/%7emills/keygen.html</code>).
+including
+<code>PC</code>, <code>IFF</code>, <code>GQ</code>
+and
+<code>MV</code>
+schemes described below.
These schemes are based on a TA, one or more trusted hosts
and some number of nontrusted hosts.
Trusted hosts prove identity using values provided by the TA,
@@ -756,12 +681,15 @@ On trusted host alice run
<code>-P</code>
<code>-p</code> <kbd>password</kbd>
to generate the host key file
-<span class="file">ntpkey_RSAkey_</span><kbd>alice.filestamp</kbd>
+<span class="file">ntpkey</span>_ <code>RSA</code> <span class="file">key_alice.</span> <kbd>filestamp</kbd>
and trusted private certificate file
-<span class="file">ntpkey_RSA-MD5_cert_</span><kbd>alice.filestamp</kbd>.
+<span class="file">ntpkey</span>_ <code>RSA-MD5</code> <code>_</code> <span class="file">cert_alice.</span> <kbd>filestamp</kbd>,
+and soft links.
Copy both files to all group hosts;
they replace the files which would be generated in other schemes.
-On each host bob install a soft link from the generic name
+On each host
+<kbd>bob</kbd>
+install a soft link from the generic name
<span class="file">ntpkey_host_</span><kbd>bob</kbd>
to the host key file and soft link
<span class="file">ntpkey_cert_</span><kbd>bob</kbd>
@@ -770,26 +698,34 @@ Note the generic links are on bob, but point to files generated
by trusted host alice.
In this scheme it is not possible to refresh
either the keys or certificates without copying them
-to all other hosts in the group.
+to all other hosts in the group, and recreating the soft links.
- <p>For the IFF scheme proceed as in the TC scheme to generate keys
+ <p>For the
+<code>IFF</code>
+scheme proceed as in the
+<code>TC</code>
+scheme to generate keys
and certificates for all group hosts, then for every trusted host in the group,
-generate the IFF parameter file.
+generate the
+<code>IFF</code>
+parameter file.
On trusted host alice run
<code>ntp-keygen</code>
<code>-T</code>
<code>-I</code>
<code>-p</code> <kbd>password</kbd>
to produce her parameter file
-<span class="file">ntpkey_IFFpar_</span><kbd>alice.filestamp</kbd>,
+<span class="file">ntpkey_IFFpar_alice.</span><kbd>filestamp</kbd>,
which includes both server and client keys.
Copy this file to all group hosts that operate as both servers
and clients and install a soft link from the generic
-<span class="file">ntpkey_iff_</span><kbd>alice</kbd>
+<span class="file">ntpkey_iff_alice</span>
to this file.
If there are no hosts restricted to operate only as clients,
there is nothing further to do.
-As the IFF scheme is independent
+As the
+<code>IFF</code>
+scheme is independent
of keys and certificates, these files can be refreshed as needed.
<p>If a rogue client has the parameter file, it could masquerade
@@ -799,37 +735,53 @@ from the parameter file and distributed to all restricted clients.
After generating the parameter file, on alice run
<code>ntp-keygen</code>
<code>-e</code>
-and pipe the output to a file or mail program.
-Copy or mail this file to all restricted clients.
+and pipe the output to a file or email program.
+Copy or email this file to all restricted clients.
On these clients install a soft link from the generic
-<span class="file">ntpkey_iff_</span><kbd>alice</kbd>
+<span class="file">ntpkey_iff_alice</span>
to this file.
To further protect the integrity of the keys,
each file can be encrypted with a secret password.
- <p>For the GQ scheme proceed as in the TC scheme to generate keys
+ <p>For the
+<code>GQ</code>
+scheme proceed as in the
+<code>TC</code>
+scheme to generate keys
and certificates for all group hosts, then for every trusted host
-in the group, generate the IFF parameter file.
+in the group, generate the
+<code>IFF</code>
+parameter file.
On trusted host alice run
<code>ntp-keygen</code>
<code>-T</code>
<code>-G</code>
<code>-p</code> <kbd>password</kbd>
to produce her parameter file
-<span class="file">ntpkey_GQpar_</span><kbd>alice.filestamp</kbd>,
+<span class="file">ntpkey_GQpar_alice.</span><kbd>filestamp</kbd>,
which includes both server and client keys.
Copy this file to all group hosts and install a soft link
from the generic
-<span class="file">ntpkey_gq_</span><kbd>alice</kbd>
+<span class="file">ntpkey_gq_alice</span>
to this file.
-In addition, on each host bob install a soft link
+In addition, on each host
+<kbd>bob</kbd>
+install a soft link
from generic
<span class="file">ntpkey_gq_</span><kbd>bob</kbd>
to this file.
-As the GQ scheme updates the GQ parameters file and certificate
+As the
+<code>GQ</code>
+scheme updates the
+<code>GQ</code>
+parameters file and certificate
at the same time, keys and certificates can be regenerated as needed.
- <p>For the MV scheme, proceed as in the TC scheme to generate keys
+ <p>For the
+<code>MV</code>
+scheme, proceed as in the
+<code>TC</code>
+scheme to generate keys
and certificates for all group hosts.
For illustration assume trish is the TA, alice one of several trusted hosts
and bob one of her clients.
@@ -841,9 +793,9 @@ where
<kbd>n</kbd>
is the number of revokable keys (typically 5) to produce
the parameter file
-<span class="file">ntpkeys_MVpar_</span><kbd>trish.filestamp</kbd>
+<span class="file">ntpkeys_MVpar_trish.</span><kbd>filestamp</kbd>
and client key files
-<span class="file">ntpkeys_MVkeyd_</span><kbd>trish.filestamp</kbd>
+<span class="file">ntpkeys_MVkey</span><kbd>d</kbd> <kbd>_</kbd> <span class="file">trish.</span> <kbd>filestamp</kbd>
where
<kbd>d</kbd>
is the key number (0 &lt;
@@ -852,66 +804,199 @@ is the key number (0 &lt;
<kbd>n</kbd>).
Copy the parameter file to alice and install a soft link
from the generic
-<span class="file">ntpkey_mv_</span><kbd>alice</kbd>
+<span class="file">ntpkey_mv_alice</span>
to this file.
Copy one of the client key files to alice for later distribution
to her clients.
-It doesn't matter which client key file goes to alice,
+It does not matter which client key file goes to alice,
since they all work the same way.
-Alice copies the client key file to all of her cliens.
+Alice copies the client key file to all of her clients.
On client bob install a soft link from generic
-<span class="file">ntpkey_mvkey_</span><kbd>bob</kbd>
+<span class="file">ntpkey_mvkey_bob</span>
to the client key file.
-As the MV scheme is independent of keys and certificates,
+As the
+<code>MV</code>
+scheme is independent of keys and certificates,
these files can be refreshed as needed.
<h5 class="subsubsection">Command Line Options</h5>
<dl>
-<dt><code>-c</code> <kbd>scheme</kbd><dd>Select certificate message digest/signature encryption scheme.
+<dt><code>-b</code> <code>--imbits</code>= <kbd>modulus</kbd><dd>Set the number of bits in the identity modulus for generating identity keys to
+<kbd>modulus</kbd>
+bits.
+The number of bits in the identity modulus defaults to 256, but can be set to
+values from 256 to 2048 (32 to 256 octets).
+Use the larger moduli with caution, as this can consume considerable computing
+resources and increases the size of authenticated packets.
+<br><dt><code>-c</code> <code>--certificate</code>= <kbd>scheme</kbd><dd>Select certificate signature encryption/message digest scheme.
The
<kbd>scheme</kbd>
can be one of the following:
-. Cm RSA-MD2 , RSA-MD5 , RSA-SHA , RSA-SHA1 , RSA-MDC2 , RSA-RIPEMD160 , DSA-SHA ,
+<code>RSA-MD2</code>, <code>RSA-MD5</code>, <code>RSA-MDC2</code>, <code>RSA-SHA</code>, <code>RSA-SHA1</code>, <code>RSA-RIPEMD160</code>, <code>DSA-SHA</code>,
or
<code>DSA-SHA1</code>.
-Note that RSA schemes must be used with a RSA sign key and DSA
-schemes must be used with a DSA sign key.
+Note that
+<code>RSA</code>
+schemes must be used with an
+<code>RSA</code>
+sign key and
+<code>DSA</code>
+schemes must be used with a
+<code>DSA</code>
+sign key.
The default without this option is
<code>RSA-MD5</code>.
-<br><dt><code>-d</code><dd>Enable debugging.
+If compatibility with FIPS 140-2 is required, either the
+<code>DSA-SHA</code>
+or
+<code>DSA-SHA1</code>
+scheme must be used.
+<br><dt><code>-C</code> <code>--cipher</code>= <kbd>cipher</kbd><dd>Select the OpenSSL cipher to encrypt the files containing private keys.
+The default without this option is three-key triple DES in CBC mode,
+<code>des-ede3-cbc</code>.
+The
+<code>openssl</code> <code>-h</code>
+command provided with OpenSSL displays available ciphers.
+<br><dt><code>-d</code> <code>--debug-level</code><dd>Increase debugging verbosity level.
This option displays the cryptographic data produced in eye-friendly billboards.
-<br><dt><code>-e</code><dd>Write the IFF client keys to the standard output.
-This is intended for automatic key distribution by mail.
-<br><dt><code>-G</code><dd>Generate parameters and keys for the GQ identification scheme,
-obsoleting any that may exist.
-<br><dt><code>-g</code><dd>Generate keys for the GQ identification scheme
-using the existing GQ parameters.
-If the GQ parameters do not yet exist, create them first.
-<br><dt><code>-H</code><dd>Generate new host keys, obsoleting any that may exist.
-<br><dt><code>-I</code><dd>Generate parameters for the IFF identification scheme,
-obsoleting any that may exist.
-<br><dt><code>-i</code> <kbd>name</kbd><dd>Set the suject name to
-<kbd>name</kbd>.
-This is used as the subject field in certificates
-and in the file name for host and sign keys.
-<br><dt><code>-M</code><dd>Generate MD5 keys, obsoleting any that may exist.
-<br><dt><code>-P</code><dd>Generate a private certificate.
+<br><dt><code>-D</code> <code>--set-debug-level</code>= <kbd>level</kbd><dd>Set the debugging verbosity to
+<kbd>level</kbd>.
+This option displays the cryptographic data produced in eye-friendly billboards.
+<br><dt><code>-e</code> <code>--id-key</code><dd>Write the
+<code>IFF</code>
+or
+<code>GQ</code>
+public parameters from the
+<kbd>IFFkey</kbd> <kbd>or</kbd> <kbd>GQkey</kbd>
+client keys file previously specified
+as unencrypted data to the standard output stream
+<span class="file">stdout</span>.
+This is intended for automatic key distribution by email.
+<br><dt><code>-G</code> <code>--gq-params</code><dd>Generate a new encrypted
+<code>GQ</code>
+parameters and key file for the Guillou-Quisquater (GQ) identity scheme.
+This option is mutually exclusive with the
+<code>-I</code>
+and
+<code>-V</code>
+options.
+<br><dt><code>-H</code> <code>--host-key</code><dd>Generate a new encrypted
+<code>RSA</code>
+public/private host key file.
+<br><dt><code>-I</code> <code>--iffkey</code><dd>Generate a new encrypted
+<code>IFF</code>
+key file for the Schnorr (IFF) identity scheme.
+This option is mutually exclusive with the
+<code>-G</code>
+and
+Fl V
+options.
+<br><dt><code>-i</code> <code>--ident</code>= <kbd>group</kbd><dd>Set the optional Autokey group name to
+<kbd>group</kbd>.
+This is used in the identity scheme parameter file names of
+<code>IFF</code>, <code>GQ</code>,
+and
+<code>MV</code>
+client parameters files.
+In that role, the default is the host name if no group is provided.
+The group name, if specified using
+<code>-i</code>
+or
+<code>-s</code>
+following an
+@
+character, is also used in certificate subject and issuer names in the form
+<kbd>host</kbd> <kbd>@</kbd> <kbd>group</kbd>
+and should match the group specified via
+<code>crypto</code> <code>ident</code>
+or
+<code>server</code> <code>ident</code>
+in the ntpd configuration file.
+<br><dt><code>-l</code> <code>--lifetime</code>= <kbd>days</kbd><dd>Set the lifetime for certificate expiration to
+<kbd>days</kbd>.
+The default lifetime is one year (365 days).
+<br><dt><code>-m</code> <code>--modulus</code>= <kbd>bits</kbd><dd>Set the number of bits in the prime modulus for generating files to
+<kbd>bits</kbd>.
+The modulus defaults to 512, but can be set from 256 to 2048 (32 to 256 octets).
+Use the larger moduli with caution, as this can consume considerable computing
+resources and increases the size of authenticated packets.
+<br><dt><code>-M</code> <code>--md5key</code><dd>Generate a new symmetric keys file containing 10
+<code>MD5</code>
+keys, and if OpenSSL is available, 10
+<code>SHA</code>
+keys.
+An
+<code>MD5</code>
+key is a string of 20 random printable ASCII characters, while a
+<code>SHA</code>
+key is a string of 40 random hex digits.
+The file can be edited using a text editor to change the key type or key content.
+This option is mutually exclusive with all other options.
+<br><dt><code>-p</code> <code>--password</code>= <kbd>passwd</kbd><dd>Set the password for reading and writing encrypted files to
+<kbd>passwd</kbd>.
+These include the host, sign and identify key files.
+By default, the password is the string returned by the Unix
+<code>hostname</code>
+command.
+<br><dt><code>-P</code> <code>--pvt-cert</code><dd>Generate a new private certificate used by the
+<code>PC</code>
+identity scheme.
By default, the program generates public certificates.
-<br><dt><code>-p</code> <kbd>password</kbd><dd>Encrypt generated files containing private data with
-<kbd>password</kbd>
-and the DES-CBC algorithm.
-<br><dt><code>-q</code><dd>Set the password for reading files to password.
-<br><dt><code>-S</code> <code>[RSA | DSA]</code><dd>Generate a new sign key of the designated type,
-obsoleting any that may exist.
-By default, the program uses the host key as the sign key.
-<br><dt><code>-s</code> <kbd>name</kbd><dd>Set the issuer name to
-<kbd>name</kbd>.
-This is used for the issuer field in certificates
-and in the file name for identity files.
-<br><dt><code>-T</code><dd>Generate a trusted certificate.
+Note: the PC identity scheme is not recommended for new installations.
+<br><dt><code>-q</code> <code>--export-passwd</code>= <kbd>passwd</kbd><dd>Set the password for writing encrypted
+<code>IFF</code>, <code>GQ</code> <code>and</code> <code>MV</code>
+identity files redirected to
+<span class="file">stdout</span>
+to
+<kbd>passwd</kbd>.
+In effect, these files are decrypted with the
+<code>-p</code>
+password, then encrypted with the
+<code>-q</code>
+password.
+By default, the password is the string returned by the Unix
+<code>hostname</code>
+command.
+<br><dt><code>-s</code> <code>--subject-key</code>= <code>[host]</code> <code>[@ </code><kbd>group</kbd><code>]</code><dd>Specify the Autokey host name, where
+<kbd>host</kbd>
+is the optional host name and
+<kbd>group</kbd>
+is the optional group name.
+The host name, and if provided, group name are used in
+<kbd>host</kbd> <kbd>@</kbd> <kbd>group</kbd>
+form as certificate subject and issuer.
+Specifying
+<code>-s</code> <code>-@</code> <kbd>group</kbd>
+is allowed, and results in leaving the host name unchanged, as with
+<code>-i</code> <kbd>group</kbd>.
+The group name, or if no group is provided, the host name are also used in the
+file names of
+<code>IFF</code>, <code>GQ</code>,
+and
+<code>MV</code>
+identity scheme client parameter files.
+If
+<kbd>host</kbd>
+is not specified, the default host name is the string returned by the Unix
+<code>hostname</code>
+command.
+<br><dt><code>-S</code> <code>--sign-key</code>= <code>[RSA | DSA]</code><dd>Generate a new encrypted public/private sign key file of the specified type.
+By default, the sign key is the host key and has the same type.
+If compatibility with FIPS 140-2 is required, the sign key type must be
+<code>DSA</code>.
+<br><dt><code>-T</code> <code>--trusted-cert</code><dd>Generate a trusted certificate.
By default, the program generates a non-trusted certificate.
-<br><dt><code>-V</code> <kbd>nkeys</kbd><dd>Generate parameters and keys for the Mu-Varadharajan (MV) identification scheme.
+<br><dt><code>-V</code> <code>--mv-params</code> <kbd>nkeys</kbd><dd>Generate
+<kbd>nkeys</kbd>
+encrypted server keys and parameters for the Mu-Varadharajan (MV)
+identity scheme.
+This option is mutually exclusive with the
+<code>-I</code>
+and
+<code>-G</code>
+options.
+Note: support for this option should be considered a work in progress.
</dl>
<h5 class="subsubsection">Random Seed File</h5>
@@ -937,7 +1022,7 @@ but are outside the scope of this page.
<p>The entropy seed used by the OpenSSL library is contained in a file,
usually called
-<code>.rnd</code>,
+<span class="file">.rnd</span>,
which must be available when starting the NTP daemon
or the
<code>ntp-keygen</code>
@@ -960,47 +1045,122 @@ If the
.Ev RANDFILE
environment variable is not present,
the library will look for the
-<code>.rnd</code>
+<span class="file">.rnd</span>
file in the user home directory.
+Since both the
+<code>ntp-keygen</code>
+program and
+<code>ntpd(1ntpdmdoc)</code>
+daemon must run as root, the logical place to put this file is in
+<span class="file">/.rnd</span>
+or
+<span class="file">/root/.rnd</span>.
If the file is not available or cannot be written,
the daemon exits with a message to the system log and the program
exits with a suitable error message.
<h5 class="subsubsection">Cryptographic Data Files</h5>
-<p>All other file formats begin with two lines.
-The first contains the file name, including the generated host name
-and filestamp.
-The second contains the datestamp in conventional Unix date format.
-Lines beginning with # are considered comments and ignored by the
+<p>All file formats begin with two nonencrypted lines.
+The first line contains the file name, including the generated host name
+and filestamp, in the format
+<span class="file">ntpkey_</span><kbd>key</kbd> <kbd>_</kbd> <kbd>name</kbd>. <kbd>filestamp</kbd>,
+where
+<kbd>key</kbd>
+is the key or parameter type,
+<kbd>name</kbd>
+is the host or group name and
+<kbd>filestamp</kbd>
+is the filestamp (NTP seconds) when the file was created.
+By convention,
+<kbd>key</kbd>
+names in generated file names include both upper and lower case
+characters, while
+<kbd>key</kbd>
+names in generated link names include only lower case characters.
+The filestamp is not used in generated link names.
+The second line contains the datestamp in conventional Unix
+<span class="file">date</span>
+format.
+Lines beginning with
+#
+are considered comments and ignored by the
<code>ntp-keygen</code>
program and
<code>ntpd(1ntpdmdoc)</code>
-daemon.
-Cryptographic values are encoded first using ASN.1 rules,
-then encrypted if necessary, and finally written PEM-encoded
-printable ASCII format preceded and followed by MIME content identifier lines.
-
- <p>The format of the symmetric keys file is somewhat different
-than the other files in the interest of backward compatibility.
-Since DES-CBC is deprecated in NTPv4, the only key format of interest
-is MD5 alphanumeric strings.
-Following hte heard the keys are
-entered one per line in the format
+daemon.
+
+ <p>The remainder of the file contains cryptographic data, encoded first using ASN.1
+rules, then encrypted if necessary, and finally written in PEM-encoded
+printable ASCII text, preceded and followed by MIME content identifier lines.
+
+ <p>The format of the symmetric keys file, ordinarily named
+<span class="file">ntp.keys</span>,
+is somewhat different than the other files in the interest of backward compatibility.
+Ordinarily, the file is generated by this program, but it can be constructed
+and edited using an ordinary text editor.
+<pre class="verbatim">
+# ntpkey_MD5key_bk.ntp.org.3595864945
+# Thu Dec 12 19:22:25 2013
+
+1 MD5 L";Nw&lt;\`.I&lt;f4U0)247"i # MD5 key
+2 MD5 &amp;>l0%XXK9O'51VwV&lt;xq~ # MD5 key
+3 MD5 lb4zLW~d^!K:]RsD'qb6 # MD5 key
+4 MD5 Yue:tL[+vR)M\`n~bY,'? # MD5 key
+5 MD5 B;fx'Kgr/&amp;4ZTbL6=RxA # MD5 key
+6 MD5 4eYwa\`o@}3i@@@@V@@..R9!l # MD5 key
+7 MD5 \`A.([h+;wTQ|xfi%Sn_! # MD5 key
+8 MD5 45:V,r4]l6y^JH6"Sh?F # MD5 key
+9 MD5 3-5vcn*6l29DS?Xdsg)* # MD5 key
+10 MD5 2late4Me # MD5 key
+11 SHA1 a27872d3030a9025b8446c751b4551a7629af65c # SHA1 key
+12 SHA1 21bc3b4865dbb9e920902abdccb3e04ff97a5e74 # SHA1 key
+13 SHA1 2b7736fe24fef5ba85ae11594132ab5d6f6daba9 # SHA1 key
+14 SHA a5332809c8878dd3a5b918819108a111509aeceb # SHA key
+15 MD2 2fe16c88c760ff2f16d4267e36c1aa6c926e6964 # MD2 key
+16 MD4 b2691811dc19cfc0e2f9bcacd74213f29812183d # MD4 key
+17 MD5 e4d6735b8bdad58ec5ffcb087300a17f7fef1f7c # MD5 key
+18 MDC2 a8d5e2315c025bf3a79174c87fbd10477de2eabc # MDC2 key
+19 RIPEMD160 77ca332cafb30e3cafb174dcd5b80ded7ba9b3d2 # RIPEMD160 key
+20 AES128CMAC f92ff73eee86c1e7dc638d6489a04e4e555af878 # AES128CMAC key
+</pre>
+<pre class="example"> Figure 1. Typical Symmetric Key File
+</pre>
+ <p>Figure 1 shows a typical symmetric keys file used by the reference
+implementation.
+Following the header the keys are entered one per line in the format
<pre class="example"> <kbd>keyno</kbd> <kbd>type</kbd> <kbd>key</kbd>
</pre>
<p>where
<kbd>keyno</kbd>
-is a positive integer in the range 1-65,535,
+is a positive integer in the range 1-65534;
<kbd>type</kbd>
-is the string MD5 defining the key format and
+is the key type for the message digest algorithm, which in the absence of the
+OpenSSL library must be
+<code>MD5</code>
+to designate the MD5 message digest algorithm;
+if the OpenSSL library is installed, the key type can be any
+message digest algorithm supported by that library;
+however, if compatibility with FIPS 140-2 is required,
+the key type must be either
+<code>SHA</code>
+or
+<code>SHA1</code>;
<kbd>key</kbd>
is the key itself,
-which is a printable ASCII string 16 characters or less in length.
-Each character is chosen from the 93 printable characters
-in the range 0x21 through 0x7f excluding space and the
+which is a printable ASCII string 20 characters or less in length:
+each character is chosen from the 93 printable characters
+in the range 0x21 through 0x7e (
+!
+through
+~
+) excluding space and the
+#
+character, and terminated by whitespace or a
#
-character.
+character.
+An OpenSSL key consists of a hex-encoded ASCII string of 40 characters, which
+is truncated as necessary.
<p>Note that the keys used by the
<code>ntpq(1ntpqmdoc)</code>
@@ -1013,8 +1173,8 @@ in human readable ASCII format.
<p>The
<code>ntp-keygen</code>
-program generates a MD5 symmetric keys file
-<span class="file">ntpkey_MD5key_</span><kbd>hostname.filestamp</kbd>.
+program generates a symmetric keys file
+<span class="file">ntpkey_MD5key_</span><kbd>hostname</kbd>. <kbd>filestamp</kbd>.
Since the file contains private shared keys,
it should be visible only to root and distributed by secure means
to other subnet hosts.
@@ -1048,13 +1208,13 @@ This software is released under the NTP license, &lt;http://ntp.org/license&gt;.
<li><a accesskey="8" href="#ntp_002dkeygen-iffkey">ntp-keygen iffkey</a>: iffkey option (-I)
<li><a accesskey="9" href="#ntp_002dkeygen-ident">ntp-keygen ident</a>: ident option (-i)
<li><a href="#ntp_002dkeygen-lifetime">ntp-keygen lifetime</a>: lifetime option (-l)
-<li><a href="#ntp_002dkeygen-md5key">ntp-keygen md5key</a>: md5key option (-M)
<li><a href="#ntp_002dkeygen-modulus">ntp-keygen modulus</a>: modulus option (-m)
+<li><a href="#ntp_002dkeygen-md5key">ntp-keygen md5key</a>: md5key option (-M)
<li><a href="#ntp_002dkeygen-pvt_002dcert">ntp-keygen pvt-cert</a>: pvt-cert option (-P)
<li><a href="#ntp_002dkeygen-password">ntp-keygen password</a>: password option (-p)
<li><a href="#ntp_002dkeygen-export_002dpasswd">ntp-keygen export-passwd</a>: export-passwd option (-q)
-<li><a href="#ntp_002dkeygen-sign_002dkey">ntp-keygen sign-key</a>: sign-key option (-S)
<li><a href="#ntp_002dkeygen-subject_002dname">ntp-keygen subject-name</a>: subject-name option (-s)
+<li><a href="#ntp_002dkeygen-sign_002dkey">ntp-keygen sign-key</a>: sign-key option (-S)
<li><a href="#ntp_002dkeygen-trusted_002dcert">ntp-keygen trusted-cert</a>: trusted-cert option (-T)
<li><a href="#ntp_002dkeygen-mv_002dparams">ntp-keygen mv-params</a>: mv-params option (-V)
<li><a href="#ntp_002dkeygen-mv_002dkeys">ntp-keygen mv-keys</a>: mv-keys option (-v)
@@ -1085,7 +1245,7 @@ the usage text by passing it through a pager program.
used to select the program, defaulting to <span class="file">more</span>. Both will exit
with a status code of 0.
-<pre class="example">ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p10-beta
+<pre class="example">ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p10
Usage: ntp-keygen [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
Flg Arg Option-Name Description
-b Num imbits identity modulus bits
@@ -1103,15 +1263,15 @@ Usage: ntp-keygen [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&g
-I no iffkey generate IFF parameters
-i Str ident set Autokey group name
-l Num lifetime set certificate lifetime
- -M no md5key generate MD5 keys
- -m Num modulus modulus
+ -m Num modulus prime modulus
- it must be in the range:
256 to 2048
+ -M no md5key generate symmetric keys
-P no pvt-cert generate PC private certificate
-p Str password local private password
-q Str export-passwd export IFF or GQ group keys with password
- -S Str sign-key generate sign key (RSA or DSA)
-s Str subject-name set host and optionally group name
+ -S Str sign-key generate sign key (RSA or DSA)
-T no trusted-cert trusted certificate (TC scheme)
-V Num mv-params generate &lt;num&gt; MV parameters
-v Num mv-keys update &lt;num&gt; MV keys
@@ -1174,10 +1334,10 @@ This option takes a string argument <span class="file">scheme</span>.
</ul>
<p>scheme is one of
-RSA-MD2, RSA-MD5, RSA-SHA, RSA-SHA1, RSA-MDC2, RSA-RIPEMD160,
+RSA-MD2, RSA-MD5, RSA-MDC2, RSA-SHA, RSA-SHA1, RSA-RIPEMD160,
DSA-SHA, or DSA-SHA1.
- <p>Select the certificate message digest/signature encryption scheme.
+ <p>Select the certificate signature encryption/message digest scheme.
Note that RSA schemes must be used with a RSA sign key and DSA
schemes must be used with a DSA sign key. The default without
this option is RSA-MD5.
@@ -1202,9 +1362,9 @@ This option takes a string argument <span class="file">cipher</span>.
<p>Select the cipher which is used to encrypt the files containing
private keys. The default is three-key triple DES in CBC mode,
-equivalent to "<code>-C des-ede3-cbc". The openssl tool lists ciphers
-available in "openssl -h" output.
-</code><div class="node">
+equivalent to "<code>-C des-ede3-cbc</code>". The openssl tool lists ciphers
+available in "<code>openssl -h</code>" output.
+<div class="node">
<p><hr>
<a name="ntp_002dkeygen-id_002dkey"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-gq_002dparams">ntp-keygen gq-params</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-cipher">ntp-keygen cipher</a>,
@@ -1222,8 +1382,9 @@ This is the &ldquo;write iff or gq identity keys&rdquo; option.
<li>must be compiled in by defining <code>AUTOKEY</code> during the compilation.
</ul>
- <p>Write the IFF or GQ client keys to the standard output. This is
-intended for automatic key distribution by mail.
+ <p>Write the public parameters from the IFF or GQ client keys to
+the standard output.
+This is intended for automatic key distribution by email.
<div class="node">
<p><hr>
<a name="ntp_002dkeygen-gq_002dparams"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-host_002dkey">ntp-keygen host-key</a>,
@@ -1306,14 +1467,14 @@ This option takes a string argument <span class="file">group</span>.
the file name of IFF, GQ, and MV client parameters files. In
that role, the default is the host name if this option is not
provided. The group name, if specified using <code>-i/--ident</code> or
-using <code>-s/--subject-name</code> following an '<code>}' character,
-is also a part of the self-signed host certificate's subject and
-issuer names in the form host
- <p>'crypto ident' or 'server ident' configuration in
-ntpd's configuration file.
-</code><div class="node">
+using <code>-s/--subject-name</code> following an '<code>@</code>' character,
+is also a part of the self-signed host certificate subject and
+issuer names in the form <code>host@group</code> and should match the
+'<code>crypto ident</code>' or '<code>server ident</code>' configuration in the
+<code>ntpd</code> configuration file.
+<div class="node">
<p><hr>
-<a name="ntp_002dkeygen-lifetime"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-md5key">ntp-keygen md5key</a>,
+<a name="ntp_002dkeygen-lifetime"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-modulus">ntp-keygen modulus</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-ident">ntp-keygen ident</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
<br>
@@ -1322,7 +1483,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen
<h4 class="subsection">lifetime option (-l)</h4>
<p><a name="index-ntp_002dkeygen_002dlifetime-12"></a>
-This is the ``set certificate lifetime'' option.
+This is the &ldquo;set certificate lifetime&rdquo; option.
This option takes a number argument <span class="file">lifetime</span>.
<p class="noindent">This option has some usage constraints. It:
@@ -1333,29 +1494,16 @@ This option takes a number argument <span class="file">lifetime</span>.
<p>Set the certificate expiration to lifetime days from now.
<div class="node">
<p><hr>
-<a name="ntp_002dkeygen-md5key"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-modulus">ntp-keygen modulus</a>,
+<a name="ntp_002dkeygen-modulus"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-md5key">ntp-keygen md5key</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-lifetime">ntp-keygen lifetime</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
<br>
</div>
-<h4 class="subsection">md5key option (-M)</h4>
-
-<p><a name="index-ntp_002dkeygen_002dmd5key-13"></a>
-This is the ``generate md5 keys'' option.
-Generate MD5 keys, obsoleting any that may exist.
-<div class="node">
-<p><hr>
-<a name="ntp_002dkeygen-modulus"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-pvt_002dcert">ntp-keygen pvt-cert</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-md5key">ntp-keygen md5key</a>,
-Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
-<br>
-</div>
-
<h4 class="subsection">modulus option (-m)</h4>
-<p><a name="index-ntp_002dkeygen_002dmodulus-14"></a>
-This is the ``modulus'' option.
+<p><a name="index-ntp_002dkeygen_002dmodulus-13"></a>
+This is the &ldquo;prime modulus&rdquo; option.
This option takes a number argument <span class="file">modulus</span>.
<p class="noindent">This option has some usage constraints. It:
@@ -1366,16 +1514,29 @@ This option takes a number argument <span class="file">modulus</span>.
<p>The number of bits in the prime modulus. The default is 512.
<div class="node">
<p><hr>
-<a name="ntp_002dkeygen-pvt_002dcert"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-password">ntp-keygen password</a>,
+<a name="ntp_002dkeygen-md5key"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-pvt_002dcert">ntp-keygen pvt-cert</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-modulus">ntp-keygen modulus</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
<br>
</div>
+<h4 class="subsection">md5key option (-M)</h4>
+
+<p><a name="index-ntp_002dkeygen_002dmd5key-14"></a>
+This is the &ldquo;generate symmetric keys&rdquo; option.
+Generate symmetric keys, obsoleting any that may exist.
+<div class="node">
+<p><hr>
+<a name="ntp_002dkeygen-pvt_002dcert"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-password">ntp-keygen password</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-md5key">ntp-keygen md5key</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
+<br>
+</div>
+
<h4 class="subsection">pvt-cert option (-P)</h4>
<p><a name="index-ntp_002dkeygen_002dpvt_002dcert-15"></a>
-This is the ``generate pc private certificate'' option.
+This is the &ldquo;generate pc private certificate&rdquo; option.
<p class="noindent">This option has some usage constraints. It:
<ul>
@@ -1395,7 +1556,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen
<h4 class="subsection">password option (-p)</h4>
<p><a name="index-ntp_002dkeygen_002dpassword-16"></a>
-This is the ``local private password'' option.
+This is the &ldquo;local private password&rdquo; option.
This option takes a string argument <span class="file">passwd</span>.
<p class="noindent">This option has some usage constraints. It:
@@ -1410,7 +1571,7 @@ configuration command. The default password is the local
hostname.
<div class="node">
<p><hr>
-<a name="ntp_002dkeygen-export_002dpasswd"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-sign_002dkey">ntp-keygen sign-key</a>,
+<a name="ntp_002dkeygen-export_002dpasswd"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-subject_002dname">ntp-keygen subject-name</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-password">ntp-keygen password</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
<br>
@@ -1419,7 +1580,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen
<h4 class="subsection">export-passwd option (-q)</h4>
<p><a name="index-ntp_002dkeygen_002dexport_002dpasswd-17"></a>
-This is the ``export iff or gq group keys with password'' option.
+This is the &ldquo;export iff or gq group keys with password&rdquo; option.
This option takes a string argument <span class="file">passwd</span>.
<p class="noindent">This option has some usage constraints. It:
@@ -1431,62 +1592,62 @@ This option takes a string argument <span class="file">passwd</span>.
encrypted with the DES-CBC algorithm and the specified password.
The same password must be specified to the remote ntpd via the
"crypto pw password" configuration command. See also the option
---id-key (-e) for unencrypted exports.
+&ndash;id-key (-e) for unencrypted exports.
<div class="node">
<p><hr>
-<a name="ntp_002dkeygen-sign_002dkey"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-subject_002dname">ntp-keygen subject-name</a>,
+<a name="ntp_002dkeygen-subject_002dname"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-sign_002dkey">ntp-keygen sign-key</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-export_002dpasswd">ntp-keygen export-passwd</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
<br>
</div>
-<h4 class="subsection">sign-key option (-S)</h4>
+<h4 class="subsection">subject-name option (-s)</h4>
-<p><a name="index-ntp_002dkeygen_002dsign_002dkey-18"></a>
-This is the ``generate sign key (rsa or dsa)'' option.
-This option takes a string argument <span class="file">sign</span>.
+<p><a name="index-ntp_002dkeygen_002dsubject_002dname-18"></a>
+This is the &ldquo;set host and optionally group name&rdquo; option.
+This option takes a string argument <span class="file">host@group</span>.
<p class="noindent">This option has some usage constraints. It:
<ul>
<li>must be compiled in by defining <code>AUTOKEY</code> during the compilation.
</ul>
- <p>Generate a new sign key of the designated type, obsoleting any
-that may exist. By default, the program uses the host key as the
-sign key.
+ <p>Set the Autokey host name, and optionally, group name specified
+following an '<code>@</code>' character. The host name is used in the file
+name of generated host and signing certificates, without the
+group name. The host name, and if provided, group name are used
+in <code>host@group</code> form for the host certificate subject and issuer
+fields. Specifying '<code>-s @group</code>' is allowed, and results in
+leaving the host name unchanged while appending <code>@group</code> to the
+subject and issuer fields, as with <code>-i group</code>. The group name, or
+if not provided, the host name are also used in the file names
+of IFF, GQ, and MV client parameter files.
<div class="node">
<p><hr>
-<a name="ntp_002dkeygen-subject_002dname"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-trusted_002dcert">ntp-keygen trusted-cert</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-sign_002dkey">ntp-keygen sign-key</a>,
+<a name="ntp_002dkeygen-sign_002dkey"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-trusted_002dcert">ntp-keygen trusted-cert</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-subject_002dname">ntp-keygen subject-name</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
<br>
</div>
-<h4 class="subsection">subject-name option (-s)</h4>
+<h4 class="subsection">sign-key option (-S)</h4>
-<p><a name="index-ntp_002dkeygen_002dsubject_002dname-19"></a>
-This is the ``set host and optionally group name'' option.
-This option takes a string argument <span class="file">host@group</span>.
+<p><a name="index-ntp_002dkeygen_002dsign_002dkey-19"></a>
+This is the &ldquo;generate sign key (rsa or dsa)&rdquo; option.
+This option takes a string argument <span class="file">sign</span>.
<p class="noindent">This option has some usage constraints. It:
<ul>
<li>must be compiled in by defining <code>AUTOKEY</code> during the compilation.
</ul>
- <p>Set the Autokey host name, and optionally, group name specified
-following an '<code>}' character. The host name is used in the file
-name of generated host and signing certificates, without the
-group name. The host name, and if provided, group name are used
-in host
- <p>fields. Specifying '-s
- <p>leaving the host name unchanged while appending
- <p>subject and issuer fields, as with -i group. The group name, or
-if not provided, the host name are also used in the file names
-of IFF, GQ, and MV client parameter files.
-</code><div class="node">
+ <p>Generate a new sign key of the designated type, obsoleting any
+that may exist. By default, the program uses the host key as the
+sign key.
+<div class="node">
<p><hr>
<a name="ntp_002dkeygen-trusted_002dcert"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-mv_002dparams">ntp-keygen mv-params</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-subject_002dname">ntp-keygen subject-name</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-sign_002dkey">ntp-keygen sign-key</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
<br>
</div>
@@ -1494,7 +1655,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen
<h4 class="subsection">trusted-cert option (-T)</h4>
<p><a name="index-ntp_002dkeygen_002dtrusted_002dcert-20"></a>
-This is the ``trusted certificate (tc scheme)'' option.
+This is the &ldquo;trusted certificate (tc scheme)&rdquo; option.
<p class="noindent">This option has some usage constraints. It:
<ul>
@@ -1514,7 +1675,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen
<h4 class="subsection">mv-params option (-V)</h4>
<p><a name="index-ntp_002dkeygen_002dmv_002dparams-21"></a>
-This is the ``generate &lt;num&gt; mv parameters'' option.
+This is the &ldquo;generate &lt;num&gt; mv parameters&rdquo; option.
This option takes a number argument <span class="file">num</span>.
<p class="noindent">This option has some usage constraints. It:
@@ -1535,7 +1696,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen
<h4 class="subsection">mv-keys option (-v)</h4>
<p><a name="index-ntp_002dkeygen_002dmv_002dkeys-22"></a>
-This is the ``update &lt;num&gt; mv keys'' option.
+This is the &ldquo;update &lt;num&gt; mv keys&rdquo; option.
This option takes a number argument <span class="file">num</span>.
<p class="noindent">This option has some usage constraints. It:
OpenPOWER on IntegriCloud