From b2aabca0028389651cbbde27f2fa5a196b8cb705 Mon Sep 17 00:00:00 2001 From: Harlan Stenn Date: Tue, 24 Jul 2018 09:16:25 +0000 Subject: [PATCH] Symmetric key range is 1-65535. Update docs. bk: 5b56ee69RULFM8VkCwz7mzfzet_L5Q --- html/authentic.html | 6 +++--- ntpd/invoke-ntp.conf.texi | 10 +++++----- ntpd/ntp.conf.5man | 10 +++++----- ntpd/ntp.conf.5mdoc | 10 +++++----- ntpd/ntp.conf.def | 8 ++++---- ntpd/ntp.conf.html | 8 ++++---- ntpd/ntp.conf.man.in | 10 +++++----- ntpd/ntp.conf.mdoc.in | 10 +++++----- 8 files changed, 36 insertions(+), 36 deletions(-) diff --git a/html/authentic.html b/html/authentic.html index 06bb67bc7..ae7c63911 100644 --- a/html/authentic.html +++ b/html/authentic.html @@ -20,7 +20,7 @@ color: #FF0000; giffrom Alice's Adventures in Wonderland, Lewis Carroll

Our resident cryptographer; now you see him, now you don't.

Last update: - 5-Feb-2016 09:13 + 24-Jul-2018 09:12 UTC


Related Links

@@ -45,10 +45,10 @@ required.

Authentication is configured separately for each association using the key or autokey option of the server configuration command, as described in the Server Options page. The ntp-keygen page describes the files required for the various authentication schemes. Further details are in the briefings, papers and reports at the NTP project page linked from www.ntp.org.

By default, the client sends non-authenticated packets and the server responds with non-authenticated packets. If the client sends authenticated packets, the server responds with authenticated packets if correct, or a crypto-NAK packet if not. In the case of unsolicited packets which might consume significant resources, such as broadcast or symmetric mode packets, authentication is required, unless overridden by a disable auth command. In the current climate of targeted broadcast or "letterbomb" attacks, defeating this requirement would be decidedly dangerous. In any case, the notrust flag, described on the Access Control Options page, can be used to disable access to all but correctly authenticated clients.

Symmetric Key Cryptography

-

The original NTPv3 specification (RFC-1305), as well as the current NTPv4 specification (RFC-5905), allows any one of possibly 65,534 message digest keys (excluding zero), each distinguished by a 32-bit key ID, to authenticate an association. The servers and clients involved must agree on the key ID, key type and key to authenticate NTP packets.

+

The original NTPv3 specification (RFC-1305), as well as the current NTPv4 specification (RFC-5905), allows any one of possibly 65,535 message digest keys (excluding zero), each distinguished by a 32-bit key ID, to authenticate an association. The servers and clients involved must agree on the key ID, key type and key to authenticate NTP packets.

The message digest is a cryptographic hash computed by an algorithm such as MD5, SHA, or AES-128 CMAC. When authentication is specified, a message authentication code (MAC) is appended to the NTP packet header. The MAC consists of a 32-bit key identifier (key ID) followed by a 128- or 160-bit message digest. The algorithm computes the digest as the hash of a 128- or 160- bit message digest key concatenated with the NTP packet header fields with the exception of the MAC. On transmit, the message digest is computed and inserted in the MAC. On receive, the message digest is computed and compared with the MAC. The packet is accepted only if the two MACs are identical. If a discrepancy is found by the client, the client ignores the packet, but raises an alarm. If this happens at the server, the server returns a special message called a crypto-NAK. Since the crypto-NAK is protected by the loopback test, an intruder cannot disrupt the protocol by sending a bogus crypto-NAK.

Keys and related information are specified in a keys file, which must be distributed and stored using secure means beyond the scope of the NTP protocol itself. Besides the keys used for ordinary NTP associations, additional keys can be used as passwords for the ntpq and ntpdc utility programs. Ordinarily, the ntp.keys file is generated by the ntp-keygen program, but it can be constructed and edited using an ordinary text editor.

-

Each line of the keys file consists of three or four fields: a key ID in the range 1 to 65,534, inclusive, a key type, a message digest key consisting of a printable ASCII string less than 40 characters or a 40-character hex digit string, and an optional comma-separated list of IPs that are allowed to serve time. If the OpenSSL library is installed, the key type can be any message digest algorithm supported by the library. If the OpenSSL library is not installed, the only permitted key type is MD5.

+

Each line of the keys file consists of three or four fields: a key ID in the range 1 to 65,535, inclusive, a key type, a message digest key consisting of a printable ASCII string less than 40 characters or a 40-character hex digit string, and an optional comma-separated list of IPs that are allowed to serve time. If the OpenSSL library is installed, the key type can be any message digest algorithm supported by the library. If the OpenSSL library is not installed, the only permitted key type is MD5.

Figure 1. Typical Symmetric Key File diff --git a/ntpd/invoke-ntp.conf.texi b/ntpd/invoke-ntp.conf.texi index 4c9cd4a52..cf6435e27 100644 --- a/ntpd/invoke-ntp.conf.texi +++ b/ntpd/invoke-ntp.conf.texi @@ -6,7 +6,7 @@ # # EDIT THIS FILE WITH CAUTION (invoke-ntp.conf.texi) # -# It has been AutoGen-ed July 24, 2018 at 07:23:47 AM by AutoGen 5.18.5 +# It has been AutoGen-ed July 24, 2018 at 09:13:24 AM by AutoGen 5.18.5 # From the definitions ntp.conf.def # and the template file agtexi-file.tpl @end ignore @@ -543,7 +543,7 @@ and reports at the NTP project page linked from @code{http://www.ntp.org/}. @subsubsection Symmetric-Key Cryptography The original RFC-1305 specification allows any one of possibly -65,534 keys, each distinguished by a 32-bit key identifier, to +65,535 keys, each distinguished by a 32-bit key identifier, to authenticate an association. The servers and clients involved must agree on the key and key identifier to @@ -827,7 +827,7 @@ The @kbd{key} argument is the key identifier for a trusted key, where the value can be in the -range 1 to 65,534, inclusive. +range 1 to 65,535, inclusive. @item @code{crypto} @code{[@code{cert} @kbd{file}]} @code{[@code{leap} @kbd{file}]} @code{[@code{randfile} @kbd{file}]} @code{[@code{host} @kbd{file}]} @code{[@code{sign} @kbd{file}]} @code{[@code{gq} @kbd{file}]} @code{[@code{gqpar} @kbd{file}]} @code{[@code{iffpar} @kbd{file}]} @code{[@code{mvpar} @kbd{file}]} @code{[@code{pw} @kbd{password}]} This command requires the OpenSSL library. It activates public key @@ -920,7 +920,7 @@ The @kbd{key} argument is a key identifier for the trusted key, where the value can be in the range 1 to -65,534, inclusive. +65,535, inclusive. @item @code{revoke} @kbd{logsec} Specifies the interval between re-randomization of certain cryptographic values used by the Autokey scheme, as a power of 2 in @@ -947,7 +947,7 @@ servers. The @kbd{key} arguments are 32-bit unsigned -integers with values from 1 to 65,534. +integers with values from 1 to 65,535. @end table @subsubsection Error Codes The following error codes are reported via the NTP control diff --git a/ntpd/ntp.conf.5man b/ntpd/ntp.conf.5man index 0a4b75cb1..49fe428f3 100644 --- a/ntpd/ntp.conf.5man +++ b/ntpd/ntp.conf.5man @@ -14,7 +14,7 @@ .\" .\" EDIT THIS FILE WITH CAUTION (in-mem file) .\" -.\" It has been AutoGen-ed July 24, 2018 at 07:23:50 AM by AutoGen 5.18.5 +.\" It has been AutoGen-ed July 24, 2018 at 09:13:25 AM by AutoGen 5.18.5 .\" From the definitions ntp.conf.def .\" and the template file agman-cmd.tpl .SH NAME @@ -611,7 +611,7 @@ and reports at the NTP project page linked from \f[C]http://www.ntp.org/\f[]. .SS Symmetric-Key Cryptography The original RFC-1305 specification allows any one of possibly -65,534 keys, each distinguished by a 32-bit key identifier, to +65,535 keys, each distinguished by a 32-bit key identifier, to authenticate an association. The servers and clients involved must agree on the key and key identifier to @@ -932,7 +932,7 @@ The \f\*[I-Font]key\f[] argument is the key identifier for a trusted key, where the value can be in the -range 1 to 65,534, inclusive. +range 1 to 65,535, inclusive. .TP 7 .NOP \f\*[B-Font]crypto\f[] [\f\*[B-Font]cert\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]leap\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]randfile\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]host\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]sign\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gq\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gqpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]iffpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]mvpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]pw\f[] \f\*[I-Font]password\f[]] This command requires the OpenSSL library. @@ -1038,7 +1038,7 @@ The \f\*[I-Font]key\f[] argument is a key identifier for the trusted key, where the value can be in the range 1 to -65,534, inclusive. +65,535, inclusive. .TP 7 .NOP \f\*[B-Font]revoke\f[] \f\*[I-Font]logsec\f[] Specifies the interval between re-randomization of certain @@ -1067,7 +1067,7 @@ servers. The \f\*[I-Font]key\f[] arguments are 32-bit unsigned -integers with values from 1 to 65,534. +integers with values from 1 to 65,535. .PP .SS Error Codes The following error codes are reported via the NTP control diff --git a/ntpd/ntp.conf.5mdoc b/ntpd/ntp.conf.5mdoc index 78f29a36f..e3182aa51 100644 --- a/ntpd/ntp.conf.5mdoc +++ b/ntpd/ntp.conf.5mdoc @@ -3,7 +3,7 @@ .Os .\" EDIT THIS FILE WITH CAUTION (ntp.mdoc) .\" -.\" It has been AutoGen-ed July 24, 2018 at 07:23:43 AM by AutoGen 5.18.5 +.\" It has been AutoGen-ed July 24, 2018 at 09:13:21 AM by AutoGen 5.18.5 .\" From the definitions ntp.conf.def .\" and the template file agmdoc-cmd.tpl .Sh NAME @@ -583,7 +583,7 @@ and reports at the NTP project page linked from .Li http://www.ntp.org/ . .Ss Symmetric\-Key Cryptography The original RFC\-1305 specification allows any one of possibly -65,534 keys, each distinguished by a 32\-bit key identifier, to +65,535 keys, each distinguished by a 32\-bit key identifier, to authenticate an association. The servers and clients involved must agree on the key and key identifier to @@ -877,7 +877,7 @@ The .Ar key argument is the key identifier for a trusted key, where the value can be in the -range 1 to 65,534, inclusive. +range 1 to 65,535, inclusive. .It Xo Ic crypto .Op Cm cert Ar file .Op Cm leap Ar file @@ -981,7 +981,7 @@ The .Ar key argument is a key identifier for the trusted key, where the value can be in the range 1 to -65,534, inclusive. +65,535, inclusive. .It Ic revoke Ar logsec Specifies the interval between re\-randomization of certain cryptographic values used by the Autokey scheme, as a power of 2 in @@ -1008,7 +1008,7 @@ servers. The .Ar key arguments are 32\-bit unsigned -integers with values from 1 to 65,534. +integers with values from 1 to 65,535. .El .Ss Error Codes The following error codes are reported via the NTP control diff --git a/ntpd/ntp.conf.def b/ntpd/ntp.conf.def index b780708e9..9684fb120 100644 --- a/ntpd/ntp.conf.def +++ b/ntpd/ntp.conf.def @@ -585,7 +585,7 @@ and reports at the NTP project page linked from .Li http://www.ntp.org/ . .Ss Symmetric-Key Cryptography The original RFC-1305 specification allows any one of possibly -65,534 keys, each distinguished by a 32-bit key identifier, to +65,535 keys, each distinguished by a 32-bit key identifier, to authenticate an association. The servers and clients involved must agree on the key and key identifier to @@ -879,7 +879,7 @@ The .Ar key argument is the key identifier for a trusted key, where the value can be in the -range 1 to 65,534, inclusive. +range 1 to 65,535, inclusive. .It Xo Ic crypto .Op Cm cert Ar file .Op Cm leap Ar file @@ -983,7 +983,7 @@ The .Ar key argument is a key identifier for the trusted key, where the value can be in the range 1 to -65,534, inclusive. +65,535, inclusive. .It Ic revoke Ar logsec Specifies the interval between re-randomization of certain cryptographic values used by the Autokey scheme, as a power of 2 in @@ -1010,7 +1010,7 @@ servers. The .Ar key arguments are 32-bit unsigned -integers with values from 1 to 65,534. +integers with values from 1 to 65,535. .El .Ss Error Codes The following error codes are reported via the NTP control diff --git a/ntpd/ntp.conf.html b/ntpd/ntp.conf.html index a5345f175..132659199 100644 --- a/ntpd/ntp.conf.html +++ b/ntpd/ntp.conf.html @@ -584,7 +584,7 @@ and reports at the NTP project page linked from
Symmetric-Key Cryptography

The original RFC-1305 specification allows any one of possibly -65,534 keys, each distinguished by a 32-bit key identifier, to +65,535 keys, each distinguished by a 32-bit key identifier, to authenticate an association. The servers and clients involved must agree on the key and key identifier to @@ -876,7 +876,7 @@ The key argument is the key identifier for a trusted key, where the value can be in the -range 1 to 65,534, inclusive. +range 1 to 65,535, inclusive.

crypto [cert file] [leap file] [randfile file] [host file] [sign file] [gq file] [gqpar file] [iffpar file] [mvpar file] [pw password]
This command requires the OpenSSL library. It activates public key cryptography, selects the message digest and signature @@ -956,7 +956,7 @@ The key argument is a key identifier for the trusted key, where the value can be in the range 1 to -65,534, inclusive. +65,535, inclusive.
revoke logsec
Specifies the interval between re-randomization of certain cryptographic values used by the Autokey scheme, as a power of 2 in seconds. @@ -981,7 +981,7 @@ servers. The key arguments are 32-bit unsigned -integers with values from 1 to 65,534. +integers with values from 1 to 65,535.
Error Codes
diff --git a/ntpd/ntp.conf.man.in b/ntpd/ntp.conf.man.in index e4d46819e..06489bf23 100644 --- a/ntpd/ntp.conf.man.in +++ b/ntpd/ntp.conf.man.in @@ -14,7 +14,7 @@ .\" .\" EDIT THIS FILE WITH CAUTION (in-mem file) .\" -.\" It has been AutoGen-ed July 24, 2018 at 07:23:50 AM by AutoGen 5.18.5 +.\" It has been AutoGen-ed July 24, 2018 at 09:13:25 AM by AutoGen 5.18.5 .\" From the definitions ntp.conf.def .\" and the template file agman-cmd.tpl .SH NAME @@ -611,7 +611,7 @@ and reports at the NTP project page linked from \f[C]http://www.ntp.org/\f[]. .SS Symmetric-Key Cryptography The original RFC-1305 specification allows any one of possibly -65,534 keys, each distinguished by a 32-bit key identifier, to +65,535 keys, each distinguished by a 32-bit key identifier, to authenticate an association. The servers and clients involved must agree on the key and key identifier to @@ -932,7 +932,7 @@ The \f\*[I-Font]key\f[] argument is the key identifier for a trusted key, where the value can be in the -range 1 to 65,534, inclusive. +range 1 to 65,535, inclusive. .TP 7 .NOP \f\*[B-Font]crypto\f[] [\f\*[B-Font]cert\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]leap\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]randfile\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]host\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]sign\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gq\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gqpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]iffpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]mvpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]pw\f[] \f\*[I-Font]password\f[]] This command requires the OpenSSL library. @@ -1038,7 +1038,7 @@ The \f\*[I-Font]key\f[] argument is a key identifier for the trusted key, where the value can be in the range 1 to -65,534, inclusive. +65,535, inclusive. .TP 7 .NOP \f\*[B-Font]revoke\f[] \f\*[I-Font]logsec\f[] Specifies the interval between re-randomization of certain @@ -1067,7 +1067,7 @@ servers. The \f\*[I-Font]key\f[] arguments are 32-bit unsigned -integers with values from 1 to 65,534. +integers with values from 1 to 65,535. .PP .SS Error Codes The following error codes are reported via the NTP control diff --git a/ntpd/ntp.conf.mdoc.in b/ntpd/ntp.conf.mdoc.in index 639daec44..2e7ec3f52 100644 --- a/ntpd/ntp.conf.mdoc.in +++ b/ntpd/ntp.conf.mdoc.in @@ -3,7 +3,7 @@ .Os .\" EDIT THIS FILE WITH CAUTION (ntp.mdoc) .\" -.\" It has been AutoGen-ed July 24, 2018 at 07:23:43 AM by AutoGen 5.18.5 +.\" It has been AutoGen-ed July 24, 2018 at 09:13:21 AM by AutoGen 5.18.5 .\" From the definitions ntp.conf.def .\" and the template file agmdoc-cmd.tpl .Sh NAME @@ -583,7 +583,7 @@ and reports at the NTP project page linked from .Li http://www.ntp.org/ . .Ss Symmetric\-Key Cryptography The original RFC\-1305 specification allows any one of possibly -65,534 keys, each distinguished by a 32\-bit key identifier, to +65,535 keys, each distinguished by a 32\-bit key identifier, to authenticate an association. The servers and clients involved must agree on the key and key identifier to @@ -877,7 +877,7 @@ The .Ar key argument is the key identifier for a trusted key, where the value can be in the -range 1 to 65,534, inclusive. +range 1 to 65,535, inclusive. .It Xo Ic crypto .Op Cm cert Ar file .Op Cm leap Ar file @@ -981,7 +981,7 @@ The .Ar key argument is a key identifier for the trusted key, where the value can be in the range 1 to -65,534, inclusive. +65,535, inclusive. .It Ic revoke Ar logsec Specifies the interval between re\-randomization of certain cryptographic values used by the Autokey scheme, as a power of 2 in @@ -1008,7 +1008,7 @@ servers. The .Ar key arguments are 32\-bit unsigned -integers with values from 1 to 65,534. +integers with values from 1 to 65,535. .El .Ss Error Codes The following error codes are reported via the NTP control -- 2.47.3