draft-ietf-ntp-using-nts-for-ntp-26.txt   draft-ietf-ntp-using-nts-for-ntp-27.txt 
NTP Working Group D. Franke NTP Working Group D. Franke
Internet-Draft Akamai Internet-Draft Akamai
Intended status: Standards Track D. Sibold Intended status: Standards Track D. Sibold
Expires: September 23, 2020 K. Teichel Expires: September 25, 2020 K. Teichel
PTB PTB
M. Dansarie M. Dansarie
R. Sundblad R. Sundblad
Netnod Netnod
March 22, 2020 March 24, 2020
Network Time Security for the Network Time Protocol Network Time Security for the Network Time Protocol
draft-ietf-ntp-using-nts-for-ntp-26 draft-ietf-ntp-using-nts-for-ntp-27
Abstract Abstract
This memo specifies Network Time Security (NTS), a mechanism for This memo specifies Network Time Security (NTS), a mechanism for
using Transport Layer Security (TLS) and Authenticated Encryption using Transport Layer Security (TLS) and Authenticated Encryption
with Associated Data (AEAD) to provide cryptographic security for the with Associated Data (AEAD) to provide cryptographic security for the
client-server mode of the Network Time Protocol (NTP). client-server mode of the Network Time Protocol (NTP).
NTS is structured as a suite of two loosely coupled sub-protocols. NTS is structured as a suite of two loosely coupled sub-protocols.
The first (NTS-KE) handles initial authentication and key The first (NTS-KE) handles initial authentication and key
skipping to change at page 1, line 46 skipping to change at page 1, line 46
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on September 23, 2020. This Internet-Draft will expire on September 25, 2020.
Copyright Notice Copyright Notice
Copyright (c) 2020 IETF Trust and the persons identified as the Copyright (c) 2020 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 37 skipping to change at page 2, line 37
4. The NTS Key Establishment Protocol . . . . . . . . . . . . . 8 4. The NTS Key Establishment Protocol . . . . . . . . . . . . . 8
4.1. NTS-KE Record Types . . . . . . . . . . . . . . . . . . . 10 4.1. NTS-KE Record Types . . . . . . . . . . . . . . . . . . . 10
4.1.1. End of Message . . . . . . . . . . . . . . . . . . . 11 4.1.1. End of Message . . . . . . . . . . . . . . . . . . . 11
4.1.2. NTS Next Protocol Negotiation . . . . . . . . . . . . 11 4.1.2. NTS Next Protocol Negotiation . . . . . . . . . . . . 11
4.1.3. Error . . . . . . . . . . . . . . . . . . . . . . . . 11 4.1.3. Error . . . . . . . . . . . . . . . . . . . . . . . . 11
4.1.4. Warning . . . . . . . . . . . . . . . . . . . . . . . 12 4.1.4. Warning . . . . . . . . . . . . . . . . . . . . . . . 12
4.1.5. AEAD Algorithm Negotiation . . . . . . . . . . . . . 12 4.1.5. AEAD Algorithm Negotiation . . . . . . . . . . . . . 12
4.1.6. New Cookie for NTPv4 . . . . . . . . . . . . . . . . 13 4.1.6. New Cookie for NTPv4 . . . . . . . . . . . . . . . . 13
4.1.7. NTPv4 Server Negotiation . . . . . . . . . . . . . . 13 4.1.7. NTPv4 Server Negotiation . . . . . . . . . . . . . . 13
4.1.8. NTPv4 Port Negotiation . . . . . . . . . . . . . . . 14 4.1.8. NTPv4 Port Negotiation . . . . . . . . . . . . . . . 14
4.2. Key Extraction (generally) . . . . . . . . . . . . . . . 14 4.2. Retry Intervals . . . . . . . . . . . . . . . . . . . . . 14
4.3. Key Extraction (generally) . . . . . . . . . . . . . . . 15
5. NTS Extension Fields for NTPv4 . . . . . . . . . . . . . . . 15 5. NTS Extension Fields for NTPv4 . . . . . . . . . . . . . . . 15
5.1. Key Extraction (for NTPv4) . . . . . . . . . . . . . . . 15 5.1. Key Extraction (for NTPv4) . . . . . . . . . . . . . . . 15
5.2. Packet Structure Overview . . . . . . . . . . . . . . . . 15 5.2. Packet Structure Overview . . . . . . . . . . . . . . . . 16
5.3. The Unique Identifier Extension Field . . . . . . . . . . 16 5.3. The Unique Identifier Extension Field . . . . . . . . . . 16
5.4. The NTS Cookie Extension Field . . . . . . . . . . . . . 16 5.4. The NTS Cookie Extension Field . . . . . . . . . . . . . 17
5.5. The NTS Cookie Placeholder Extension Field . . . . . . . 17 5.5. The NTS Cookie Placeholder Extension Field . . . . . . . 17
5.6. The NTS Authenticator and Encrypted Extension Fields 5.6. The NTS Authenticator and Encrypted Extension Fields
Extension Field . . . . . . . . . . . . . . . . . . . . . 17 Extension Field . . . . . . . . . . . . . . . . . . . . . 17
5.7. Protocol Details . . . . . . . . . . . . . . . . . . . . 19 5.7. Protocol Details . . . . . . . . . . . . . . . . . . . . 20
6. Suggested Format for NTS Cookies . . . . . . . . . . . . . . 23 6. Suggested Format for NTS Cookies . . . . . . . . . . . . . . 24
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 25 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 25
7.1. Service Name and Transport Protocol Port Number Registry 25 7.1. Service Name and Transport Protocol Port Number Registry 25
7.2. TLS Application-Layer Protocol Negotiation (ALPN) 7.2. TLS Application-Layer Protocol Negotiation (ALPN)
Protocol IDs Registry . . . . . . . . . . . . . . . . . . 25 Protocol IDs Registry . . . . . . . . . . . . . . . . . . 26
7.3. TLS Exporter Labels Registry . . . . . . . . . . . . . . 26 7.3. TLS Exporter Labels Registry . . . . . . . . . . . . . . 26
7.4. NTP Kiss-o'-Death Codes Registry . . . . . . . . . . . . 26 7.4. NTP Kiss-o'-Death Codes Registry . . . . . . . . . . . . 26
7.5. NTP Extension Field Types Registry . . . . . . . . . . . 26 7.5. NTP Extension Field Types Registry . . . . . . . . . . . 26
7.6. Network Time Security Key Establishment Record Types 7.6. Network Time Security Key Establishment Record Types
Registry . . . . . . . . . . . . . . . . . . . . . . . . 27 Registry . . . . . . . . . . . . . . . . . . . . . . . . 27
7.7. Network Time Security Next Protocols Registry . . . . . . 28 7.7. Network Time Security Next Protocols Registry . . . . . . 28
7.8. Network Time Security Error and Warning Codes Registries 29 7.8. Network Time Security Error and Warning Codes Registries 29
8. Implementation Status - RFC EDITOR: REMOVE BEFORE PUBLICATION 30 8. Implementation Status - RFC EDITOR: REMOVE BEFORE PUBLICATION 30
8.1. Implementation 1 . . . . . . . . . . . . . . . . . . . . 30 8.1. Implementation 1 . . . . . . . . . . . . . . . . . . . . 30
8.1.1. Coverage . . . . . . . . . . . . . . . . . . . . . . 30 8.1.1. Coverage . . . . . . . . . . . . . . . . . . . . . . 30
skipping to change at page 3, line 44 skipping to change at page 3, line 46
8.5.3. Contact Information . . . . . . . . . . . . . . . . . 33 8.5.3. Contact Information . . . . . . . . . . . . . . . . . 33
8.5.4. Last Update . . . . . . . . . . . . . . . . . . . . . 33 8.5.4. Last Update . . . . . . . . . . . . . . . . . . . . . 33
8.6. Implementation 6 . . . . . . . . . . . . . . . . . . . . 33 8.6. Implementation 6 . . . . . . . . . . . . . . . . . . . . 33
8.6.1. Coverage . . . . . . . . . . . . . . . . . . . . . . 34 8.6.1. Coverage . . . . . . . . . . . . . . . . . . . . . . 34
8.6.2. Licensing . . . . . . . . . . . . . . . . . . . . . . 34 8.6.2. Licensing . . . . . . . . . . . . . . . . . . . . . . 34
8.6.3. Contact Information . . . . . . . . . . . . . . . . . 34 8.6.3. Contact Information . . . . . . . . . . . . . . . . . 34
8.6.4. Last Update . . . . . . . . . . . . . . . . . . . . . 34 8.6.4. Last Update . . . . . . . . . . . . . . . . . . . . . 34
8.7. Interoperability . . . . . . . . . . . . . . . . . . . . 34 8.7. Interoperability . . . . . . . . . . . . . . . . . . . . 34
9. Security Considerations . . . . . . . . . . . . . . . . . . . 34 9. Security Considerations . . . . . . . . . . . . . . . . . . . 34
9.1. Protected Modes . . . . . . . . . . . . . . . . . . . . . 34 9.1. Protected Modes . . . . . . . . . . . . . . . . . . . . . 34
9.2. Key Compromise . . . . . . . . . . . . . . . . . . . . . 35 9.2. Cookie Encryption Key Compromise . . . . . . . . . . . . 35
9.3. Sensitivity to DDoS Attacks . . . . . . . . . . . . . . . 35 9.3. Sensitivity to DDoS Attacks . . . . . . . . . . . . . . . 35
9.4. Avoiding DDoS Amplification . . . . . . . . . . . . . . . 35 9.4. Avoiding DDoS Amplification . . . . . . . . . . . . . . . 35
9.5. Initial Verification of Server Certificates . . . . . . . 36 9.5. Initial Verification of Server Certificates . . . . . . . 36
9.6. Delay Attacks . . . . . . . . . . . . . . . . . . . . . . 37 9.6. Delay Attacks . . . . . . . . . . . . . . . . . . . . . . 37
9.7. NTS Stripping . . . . . . . . . . . . . . . . . . . . . . 38 9.7. NTS Stripping . . . . . . . . . . . . . . . . . . . . . . 38
10. Privacy Considerations . . . . . . . . . . . . . . . . . . . 38 10. Privacy Considerations . . . . . . . . . . . . . . . . . . . 38
10.1. Unlinkability . . . . . . . . . . . . . . . . . . . . . 38 10.1. Unlinkability . . . . . . . . . . . . . . . . . . . . . 38
10.2. Confidentiality . . . . . . . . . . . . . . . . . . . . 39 10.2. Confidentiality . . . . . . . . . . . . . . . . . . . . 39
11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 39 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 39
12. References . . . . . . . . . . . . . . . . . . . . . . . . . 39 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 39
skipping to change at page 6, line 7 skipping to change at page 6, line 7
securing client-server mode because the server can implement them securing client-server mode because the server can implement them
without retaining per-client state. All state is kept by the without retaining per-client state. All state is kept by the
client and provided to the server in the form of an encrypted client and provided to the server in the form of an encrypted
cookie supplied with each request. On the other hand, the NTS cookie supplied with each request. On the other hand, the NTS
Extension Fields are suitable *only* for client-server mode Extension Fields are suitable *only* for client-server mode
because only the client, and not the server, is protected from because only the client, and not the server, is protected from
replay. replay.
The "NTS Key Establishment" protocol (NTS-KE) is a mechanism for The "NTS Key Establishment" protocol (NTS-KE) is a mechanism for
establishing key material for use with the NTS Extension Fields establishing key material for use with the NTS Extension Fields
for NTPv4. It uses TLS to exchange keys, provide the client with for NTPv4. It uses TLS to establish keys, provide the client with
an initial supply of cookies, and negotiate some additional an initial supply of cookies, and negotiate some additional
protocol options. After this exchange, the TLS channel is closed protocol options. After this, the TLS channel is closed with no
with no per-client state remaining on the server side. per-client state remaining on the server side.
The typical protocol flow is as follows: The client connects to an The typical protocol flow is as follows: The client connects to an
NTS-KE server on the NTS TCP port and the two parties perform a TLS NTS-KE server on the NTS TCP port and the two parties perform a TLS
handshake. Via the TLS channel, the parties negotiate some handshake. Via the TLS channel, the parties negotiate some
additional protocol parameters and the server sends the client a additional protocol parameters and the server sends the client a
supply of cookies along with an address of an NTP server for which supply of cookies along with an address of an NTP server for which
the cookies are valid. The parties use TLS key export [RFC5705] to the cookies are valid. The parties use TLS key export [RFC5705] to
extract key material which will be used in the next phase of the extract key material which will be used in the next phase of the
protocol. This negotiation takes only a single round trip, after protocol. This negotiation takes only a single round trip, after
which the server closes the connection and discards all associated which the server closes the connection and discards all associated
state. At this point the NTS-KE phase of the protocol is complete. state. At this point the NTS-KE phase of the protocol is complete.
Ideally, the client never needs to connect to the NTS-KE server Ideally, the client never needs to connect to the NTS-KE server
again. again.
Time synchronization proceeds with the indicated NTP server over the Time synchronization proceeds with the indicated NTP server over the
NTP UDP port. The client sends the server an NTP client packet which NTP UDP port. The client sends the server an NTP client packet which
includes several extension fields. Included among these fields are a includes several extension fields. Included among these fields are a
cookie (previously provided by the key exchange server) and an cookie (previously provided by the key establishment server) and an
authentication tag, computed using key material extracted from the authentication tag, computed using key material extracted from the
NTS-KE handshake. The NTP server uses the cookie to recover this key NTS-KE handshake. The NTP server uses the cookie to recover this key
material and send back an authenticated response. The response material and send back an authenticated response. The response
includes a fresh, encrypted cookie which the client then sends back includes a fresh, encrypted cookie which the client then sends back
in the clear in a subsequent request. (This constant refreshing of in the clear in a subsequent request. (This constant refreshing of
cookies is necessary in order to achieve NTS's unlinkability goal.) cookies is necessary in order to achieve NTS's unlinkability goal.)
Figure 1 provides an overview of the high-level interaction between Figure 1 provides an overview of the high-level interaction between
the client, the NTS-KE server, and the NTP server. Note that the the client, the NTS-KE server, and the NTP server. Note that the
cookies' data format and the exchange of secrets between NTS-KE and cookies' data format and the exchange of secrets between NTS-KE and
skipping to change at page 8, line 14 skipping to change at page 8, line 14
Implementations MUST NOT negotiate TLS versions earlier than 1.3 Implementations MUST NOT negotiate TLS versions earlier than 1.3
[RFC8446] and MAY refuse to negotiate any TLS version which has been [RFC8446] and MAY refuse to negotiate any TLS version which has been
superseded by a later supported version. superseded by a later supported version.
Use of the Application-Layer Protocol Negotiation Extension [RFC7301] Use of the Application-Layer Protocol Negotiation Extension [RFC7301]
is integral to NTS and support for it is REQUIRED for is integral to NTS and support for it is REQUIRED for
interoperability. interoperability.
Implementations MUST follow the rules in RFC 5280 [RFC5280] and RFC Implementations MUST follow the rules in RFC 5280 [RFC5280] and RFC
6125 [RFC6125] for the representation and verification of application 6125 [RFC6125] for the representation and verification of the
service identity. Use of the DNS-ID identifier type [RFC6125] is application's service identity. When NTS-KE service discovery (out
RECOMMENDED. Section 9.5 of this memo discusses particular of scope for this document) produces one or more host names, use of
considerations for certificate verification in the context of NTS. the DNS-ID identifier type [RFC6125] is RECOMMENDED; specifications
for service discovery mechanisms can provide additional guidance for
certificate validation based on the results of discovery.
Section 9.5 of this memo discusses particular considerations for
certificate verification in the context of NTS.
4. The NTS Key Establishment Protocol 4. The NTS Key Establishment Protocol
The NTS key establishment protocol is conducted via TCP port The NTS key establishment protocol is conducted via TCP port
[[TBD1]]. The two endpoints carry out a TLS handshake in conformance [[TBD1]]. The two endpoints carry out a TLS handshake in conformance
with Section 3, with the client offering (via an ALPN [RFC7301] with Section 3, with the client offering (via an ALPN [RFC7301]
extension), and the server accepting, an application-layer protocol extension), and the server accepting, an application-layer protocol
of "ntske/1". Immediately following a successful handshake, the of "ntske/1". Immediately following a successful handshake, the
client SHALL send a single request as Application Data encapsulated client SHALL send a single request as Application Data encapsulated
in the TLS-protected channel. Then, the server SHALL send a single in the TLS-protected channel. Then, the server SHALL send a single
skipping to change at page 10, line 5 skipping to change at page 10, line 5
record, the critical bit is `b[0] >> 7` while the record type is record, the critical bit is `b[0] >> 7` while the record type is
`((b[0] & 0x7f) << 8) + b[1]`. `((b[0] & 0x7f) << 8) + b[1]`.
Note that, although the Type-Length-Body format of an NTS-KE record Note that, although the Type-Length-Body format of an NTS-KE record
is similar to that of an NTP extension field, the semantics of the is similar to that of an NTP extension field, the semantics of the
length field differ. While the length subfield of an NTP extension length field differ. While the length subfield of an NTP extension
field gives the length of the entire extension field including the field gives the length of the entire extension field including the
type and length subfields, the length field of an NTS-KE record gives type and length subfields, the length field of an NTS-KE record gives
just the length of the body. just the length of the body.
Figure 3 provides a schematic overview of the key exchange. It Figure 3 provides a schematic overview of the key establishment. It
displays the protocol steps to be performed by the NTS client and displays the protocol steps to be performed by the NTS client and
server and record types to be exchanged. server and record types to be exchanged.
+---------------------------------------+ +---------------------------------------+
| - Verify client request message. | | - Verify client request message. |
| - Extract TLS key material. | | - Extract TLS key material. |
| - Generate KE response message. | | - Generate KE response message. |
| - Include Record Types: | | - Include Record Types: |
| o NTS Next Protocol Negotiation | | o NTS Next Protocol Negotiation |
| o AEAD Algorithm Negotiation | | o AEAD Algorithm Negotiation |
skipping to change at page 10, line 43 skipping to change at page 10, line 43
| | | |
+-----------+----------------------+ +------+-----------------+ +-----------+----------------------+ +------+-----------------+
|- Generate KE request message. | |- Verify server response| |- Generate KE request message. | |- Verify server response|
| - Include Record Types: | | message. | | - Include Record Types: | | message. |
| o NTS Next Protocol Negotiation | |- Extract cookie(s). | | o NTS Next Protocol Negotiation | |- Extract cookie(s). |
| o AEAD Algorithm Negotiation | | | | o AEAD Algorithm Negotiation | | |
| o <NTP Server Negotiation> | | | | o <NTP Server Negotiation> | | |
| o End of Message | | | | o End of Message | | |
+----------------------------------+ +------------------------+ +----------------------------------+ +------------------------+
Figure 3: NTS Key Exchange Messages Figure 3: NTS Key Establishment Messages
4.1. NTS-KE Record Types 4.1. NTS-KE Record Types
The following NTS-KE Record Types are defined: The following NTS-KE Record Types are defined:
4.1.1. End of Message 4.1.1. End of Message
The End of Message record has a Record Type number of 0 and a zero- The End of Message record has a Record Type number of 0 and a zero-
length body. It MUST occur exactly once as the final record of every length body. It MUST occur exactly once as the final record of every
NTS-KE request and response. The Critical Bit MUST be set. NTS-KE request and response. The Critical Bit MUST be set.
skipping to change at page 11, line 39 skipping to change at page 11, line 39
4.1.3. Error 4.1.3. Error
The Error record has a Record Type number of 2. Its body is exactly The Error record has a Record Type number of 2. Its body is exactly
two octets long, consisting of an unsigned 16-bit integer in network two octets long, consisting of an unsigned 16-bit integer in network
byte order, denoting an error code. The Critical Bit MUST be set. byte order, denoting an error code. The Critical Bit MUST be set.
Clients MUST NOT include Error records in their request. If clients Clients MUST NOT include Error records in their request. If clients
receive a server response which includes an Error record, they MUST receive a server response which includes an Error record, they MUST
discard any key material negotiated during the initial TLS exchange discard any key material negotiated during the initial TLS exchange
and MUST NOT proceed to the Next Protocol. and MUST NOT proceed to the Next Protocol. Requirements for retry
intervals are described in Section 4.2.
The following error codes are defined: The following error codes are defined:
Error code 0 means "Unrecognized Critical Record". The server Error code 0 means "Unrecognized Critical Record". The server
MUST respond with this error code if the request included a record MUST respond with this error code if the request included a record
which the server did not understand and which had its Critical Bit which the server did not understand and which had its Critical Bit
set. The client SHOULD NOT retry its request without set. The client SHOULD NOT retry its request without
modification. modification.
Error code 1 means "Bad Request". The server MUST respond with Error code 1 means "Bad Request". The server MUST respond with
this error if the request is not complete and syntactically well- this error if the request is not complete and syntactically well-
formed, or, upon the expiration of an implementation-defined formed, or, upon the expiration of an implementation-defined
timeout, it has not yet received such a request. timeout, it has not yet received such a request. The client
SHOULD NOT retry its request without modification.
Error code 2 means "Internal Server Error". The server MUST Error code 2 means "Internal Server Error". The server MUST
respond with this error if it is unable to respond properly due to respond with this error if it is unable to respond properly due to
an internal condition. an internal condition. The client MAY retry its request.
4.1.4. Warning 4.1.4. Warning
The Warning record has a Record Type number of 3. Its body is The Warning record has a Record Type number of 3. Its body is
exactly two octets long, consisting of an unsigned 16-bit integer in exactly two octets long, consisting of an unsigned 16-bit integer in
network byte order, denoting a warning code. The Critical Bit MUST network byte order, denoting a warning code. The Critical Bit MUST
be set. be set.
Clients MUST NOT include Warning records in their request. If Clients MUST NOT include Warning records in their request. If
clients receive a server response which includes a Warning record, clients receive a server response which includes a Warning record,
skipping to change at page 14, line 32 skipping to change at page 14, line 34
When this record is sent by the client in conjunction with a NTPv4 When this record is sent by the client in conjunction with a NTPv4
Server Negotiation record, it indicates that the client wishes to Server Negotiation record, it indicates that the client wishes to
associate with the NTP server at the specified port. The NTS-KE associate with the NTP server at the specified port. The NTS-KE
server MAY incorporate this request when deciding what NTPv4 Server server MAY incorporate this request when deciding what NTPv4 Server
Negotiation and NTPv4 Port Negotiation records to respond with, but Negotiation and NTPv4 Port Negotiation records to respond with, but
honoring the client's preference is OPTIONAL. honoring the client's preference is OPTIONAL.
Servers MAY set the Critical Bit on records of this type; clients Servers MAY set the Critical Bit on records of this type; clients
SHOULD NOT. SHOULD NOT.
4.2. Key Extraction (generally) 4.2. Retry Intervals
A mechanism for not unnecessarily overloading the NTS-KE server is
REQUIRED when retrying the key establishment process due to protocol,
communication, or other errors. The exact workings of this will be
dependent on the application and operational experience gathered over
time. Until such experience is available, this memo provides the
following suggestion.
Clients SHOULD use exponential backoff, with an initial and minimum
retry interval of 10 seconds, a maximum retry interval of 5 days, and
a base of 1.5. Thus, the minimum interval in seconds, t, for the nth
retry is calculated with
t = min(10 * 1.5^(n-1), 432000).
Clients MUST NOT reset the retry interval until they have performed a
successful key establishment with the NTS-KE server, followed by a
successful use of the negotiated next protocol with the keys and data
established during that transaction.
4.3. Key Extraction (generally)
Following a successful run of the NTS-KE protocol, key material SHALL Following a successful run of the NTS-KE protocol, key material SHALL
be extracted using the HMAC-based Extract-and-Expand Key Derivation be extracted using the HMAC-based Extract-and-Expand Key Derivation
Function (HKDF) [RFC5869] in accordance with RFC 8446, Section 7.5 Function (HKDF) [RFC5869] in accordance with RFC 8446, Section 7.5
[RFC8446]. Inputs to the exporter function are to be constructed in [RFC8446]. Inputs to the exporter function are to be constructed in
a manner specific to the negotiated Next Protocol. However, all a manner specific to the negotiated Next Protocol. However, all
protocols which utilize NTS-KE MUST conform to the following two protocols which utilize NTS-KE MUST conform to the following two
rules: rules:
The disambiguating label string [RFC5705] MUST be "EXPORTER- The disambiguating label string [RFC5705] MUST be "EXPORTER-
skipping to change at page 19, line 51 skipping to change at page 20, line 21
A client sending an NTS-protected request SHALL include the following A client sending an NTS-protected request SHALL include the following
extension fields as displayed in Figure 5: extension fields as displayed in Figure 5:
Exactly one Unique Identifier extension field which MUST be Exactly one Unique Identifier extension field which MUST be
authenticated, MUST NOT be encrypted, and whose contents MUST be authenticated, MUST NOT be encrypted, and whose contents MUST be
the output of a cryptographically secure random number generator. the output of a cryptographically secure random number generator.
[RFC4086] [RFC4086]
Exactly one NTS Cookie extension field which MUST be authenticated Exactly one NTS Cookie extension field which MUST be authenticated
and MUST NOT be encrypted. The cookie MUST be one which has been and MUST NOT be encrypted. The cookie MUST be one which has been
previously provided to the client, either from the key exchange previously provided to the client, either from the key
server during the NTS-KE handshake or from the NTP server in establishment server during the NTS-KE handshake or from the NTP
response to a previous NTS-protected NTP request. server in response to a previous NTS-protected NTP request.
Exactly one NTS Authenticator and Encrypted Extension Fields Exactly one NTS Authenticator and Encrypted Extension Fields
extension field, generated using an AEAD Algorithm and C2S key extension field, generated using an AEAD Algorithm and C2S key
established through NTS-KE. established through NTS-KE.
To protect the client's privacy, the client SHOULD avoid reusing a To protect the client's privacy, the client SHOULD avoid reusing a
cookie. If the client does not have any cookies that it has not cookie. If the client does not have any cookies that it has not
already sent, it SHOULD initiate a re-run of the NTS-KE protocol. already sent, it SHOULD initiate a re-run of the NTS-KE protocol.
The client MAY reuse cookies in order to prioritize resilience over The client MAY reuse cookies in order to prioritize resilience over
unlinkability. Which of the two that should be prioritized in any unlinkability. Which of the two that should be prioritized in any
skipping to change at page 23, line 21 skipping to change at page 23, line 30
5905, Section 7.4 [RFC5905]) with kiss code "NTSN", meaning "NTS NAK" 5905, Section 7.4 [RFC5905]) with kiss code "NTSN", meaning "NTS NAK"
(NTS negative-acknowledgment). It MUST NOT include any NTS Cookie or (NTS negative-acknowledgment). It MUST NOT include any NTS Cookie or
NTS Authenticator and Encrypted Extension Fields extension fields. NTS Authenticator and Encrypted Extension Fields extension fields.
If the NTP server has previously responded with authentic NTS- If the NTP server has previously responded with authentic NTS-
protected NTP packets, the client MUST verify that any KoD packets protected NTP packets, the client MUST verify that any KoD packets
received from the server contain the Unique Identifier extension received from the server contain the Unique Identifier extension
field and that the Unique Identifier matches that of an outstanding field and that the Unique Identifier matches that of an outstanding
request. If this check fails, the packet MUST be discarded without request. If this check fails, the packet MUST be discarded without
further processing. If this check passes, the client MUST comply further processing. If this check passes, the client MUST comply
with RFC 5905, Section 7.4 [RFC5905] where required. A client MAY with RFC 5905, Section 7.4 [RFC5905] where required.
automatically re-run the NTS-KE protocol upon forced disassociation
from an NTP server. In that case, it MUST avoid quickly looping A client MAY automatically re-run the NTS-KE protocol upon forced
between the NTS-KE and NTP servers by rate limiting the retries disassociation from an NTP server. In that case, it MUST avoid
using, for example, exponential retry intervals. A reasonable quickly looping between the NTS-KE and NTP servers by rate limiting
maximum retry interval could be 7 days, depending on the application. the retries. Requirements for retry intervals in NTS-KE are
described in Section 4.2.
Upon reception of the NTS NAK kiss code, the client SHOULD wait until Upon reception of the NTS NAK kiss code, the client SHOULD wait until
the next poll for a valid NTS-protected response and if none is the next poll for a valid NTS-protected response and if none is
received, initiate a fresh NTS-KE handshake to try to renegotiate new received, initiate a fresh NTS-KE handshake to try to renegotiate new
cookies, AEAD keys, and parameters. If the NTS-KE handshake cookies, AEAD keys, and parameters. If the NTS-KE handshake
succeeds, the client MUST discard all old cookies and parameters and succeeds, the client MUST discard all old cookies and parameters and
use the new ones instead. As long as the NTS-KE handshake has not use the new ones instead. As long as the NTS-KE handshake has not
succeeded, the client SHOULD continue polling the NTP server using succeeded, the client SHOULD continue polling the NTP server using
the cookies and parameters it has. the cookies and parameters it has.
skipping to change at page 25, line 30 skipping to change at page 25, line 40
and Transport Protocol Port Number Registry [RFC6335]: and Transport Protocol Port Number Registry [RFC6335]:
Service Name: ntske Service Name: ntske
Transport Protocol: tcp Transport Protocol: tcp
Assignee: IESG <iesg@ietf.org> Assignee: IESG <iesg@ietf.org>
Contact: IETF Chair <chair@ietf.org> Contact: IETF Chair <chair@ietf.org>
Description: Network Time Security Key Exchange Description: Network Time Security Key Establishment
Reference: [[this memo]] Reference: [[this memo]]
Port Number: [[TBD1]], selected by IANA from the User Port range Port Number: [[TBD1]], selected by IANA from the User Port range
[[RFC EDITOR: Replace all instances of [[TBD1]] in this document with [[RFC EDITOR: Replace all instances of [[TBD1]] in this document with
the IANA port assignment.]] the IANA port assignment.]]
7.2. TLS Application-Layer Protocol Negotiation (ALPN) Protocol IDs 7.2. TLS Application-Layer Protocol Negotiation (ALPN) Protocol IDs
Registry Registry
skipping to change at page 26, line 14 skipping to change at page 26, line 28
7.3. TLS Exporter Labels Registry 7.3. TLS Exporter Labels Registry
IANA is requested to allocate the following entry in the TLS Exporter IANA is requested to allocate the following entry in the TLS Exporter
Labels Registry [RFC5705]: Labels Registry [RFC5705]:
+-------------------+---------+-------------+----------------+------+ +-------------------+---------+-------------+----------------+------+
| Value | DTLS-OK | Recommended | Reference | Note | | Value | DTLS-OK | Recommended | Reference | Note |
+-------------------+---------+-------------+----------------+------+ +-------------------+---------+-------------+----------------+------+
| EXPORTER-network- | Y | Y | [[this memo]], | | | EXPORTER-network- | Y | Y | [[this memo]], | |
| time-security | | | Section 4.2 | | | time-security | | | Section 4.3 | |
+-------------------+---------+-------------+----------------+------+ +-------------------+---------+-------------+----------------+------+
7.4. NTP Kiss-o'-Death Codes Registry 7.4. NTP Kiss-o'-Death Codes Registry
IANA is requested to allocate the following entry in the registry of IANA is requested to allocate the following entry in the registry of
NTP Kiss-o'-Death Codes [RFC5905]: NTP Kiss-o'-Death Codes [RFC5905]:
+------+---------------------------------------+--------------------+ +------+---------------------------------------+--------------------+
| Code | Meaning | Reference | | Code | Meaning | Reference |
+------+---------------------------------------+--------------------+ +------+---------------------------------------+--------------------+
skipping to change at page 35, line 5 skipping to change at page 35, line 5
9.1. Protected Modes 9.1. Protected Modes
NTP provides many different operating modes in order to support NTP provides many different operating modes in order to support
different network topologies and to adapt to various requirements. different network topologies and to adapt to various requirements.
This memo only specifies NTS for NTP modes 3 (client) and 4 (server) This memo only specifies NTS for NTP modes 3 (client) and 4 (server)
(see Section 1.2). The best current practice for authenticating the (see Section 1.2). The best current practice for authenticating the
other NTP modes is using the symmetric message authentication code other NTP modes is using the symmetric message authentication code
feature as described in RFC 5905 [RFC5905] and RFC 8573 [RFC8573]. feature as described in RFC 5905 [RFC5905] and RFC 8573 [RFC8573].
9.2. Key Compromise 9.2. Cookie Encryption Key Compromise
If the suggested format for NTS cookies in Section 6 of this draft is If the suggested format for NTS cookies in Section 6 of this draft is
used, an attacker who has gained access to the secret cookie used, an attacker who has gained access to the secret cookie
encryption key `K` can impersonate the NTP server, including encryption key `K` can impersonate the NTP server, including
generating new cookies. NTP and NTS-KE server operators SHOULD generating new cookies. NTP and NTS-KE server operators SHOULD
remove compromised keys as soon as the compromise is discovered. remove compromised keys as soon as the compromise is discovered.
This will cause the NTP servers to respond with NTS NAK, thus forcing This will cause the NTP servers to respond with NTS NAK, thus forcing
key renegotiation. Note that this measure does not protect against key renegotiation. Note that this measure does not protect against
MITM attacks where the attacker has access to a compromised cookie MITM attacks where the attacker has access to a compromised cookie
encryption key. If another cookie scheme is used, there are likely encryption key. If another cookie scheme is used, there are likely
skipping to change at page 38, line 44 skipping to change at page 38, line 44
recognizable data in the sense outlined above. recognizable data in the sense outlined above.
NTS's unlinkability objective is merely to not leak any additional NTS's unlinkability objective is merely to not leak any additional
data that could be used to link a device's network address. NTS does data that could be used to link a device's network address. NTS does
not rectify legacy linkability issues that are already present in not rectify legacy linkability issues that are already present in
NTP. Thus, a client that requires unlinkability must also minimize NTP. Thus, a client that requires unlinkability must also minimize
information transmitted in a client query (mode 3) packet as information transmitted in a client query (mode 3) packet as
described in the draft [I-D.ietf-ntp-data-minimization]. described in the draft [I-D.ietf-ntp-data-minimization].
The unlinkability objective only holds for time synchronization The unlinkability objective only holds for time synchronization
traffic, as opposed to key exchange traffic. This implies that it traffic, as opposed to key establishment traffic. This implies that
cannot be guaranteed for devices that function not only as time it cannot be guaranteed for devices that function not only as time
clients, but also as time servers (because the latter can be clients, but also as time servers (because the latter can be
externally triggered to send linkable data, such as the TLS externally triggered to send linkable data, such as the TLS
certificate). certificate).
It should also be noted that it could be possible to link devices It should also be noted that it could be possible to link devices
that operate as time servers from their time synchronization traffic, that operate as time servers from their time synchronization traffic,
using information exposed in (mode 4) server response packets (e.g. using information exposed in (mode 4) server response packets (e.g.
reference ID, reference time, stratum, poll). Also, devices that reference ID, reference time, stratum, poll). Also, devices that
respond to NTP control queries could be linked using the information respond to NTP control queries could be linked using the information
skipping to change at page 42, line 38 skipping to change at page 42, line 38
<https://www.rfc-editor.org/info/rfc8573>. <https://www.rfc-editor.org/info/rfc8573>.
[Shpiner] Shpiner, A., Revah, Y., and T. Mizrahi, "Multi-path Time [Shpiner] Shpiner, A., Revah, Y., and T. Mizrahi, "Multi-path Time
Protocols", in Proceedings of IEEE International Symposium Protocols", in Proceedings of IEEE International Symposium
on Precision Clock Synchronization for Measurement, on Precision Clock Synchronization for Measurement,
Control and Communication (ISPCS), Control and Communication (ISPCS),
DOI 10.1109/ISPCS.2013.6644754, September 2013. DOI 10.1109/ISPCS.2013.6644754, September 2013.
Appendix A. Terms and Abbreviations Appendix A. Terms and Abbreviations
AEAD Authenticated Encryption with Associated Data [RFC5116] AEAD Authenticated Encryption with Associated Data [RFC5116]
ALPN Application-Layer Protocol Negotiation [RFC7301] ALPN Application-Layer Protocol Negotiation [RFC7301]
C2S Client-to-server C2S Client-to-server
DoS Denial-of-Service DoS Denial-of-Service
DDoS Distributed Denial-of-Service DDoS Distributed Denial-of-Service
EF Extension Field [RFC5905] EF Extension Field [RFC5905]
HKDF Hashed Message Authentication Code-based Key Derivation HKDF Hashed Message Authentication Code-based Key Derivation
Function [RFC5869] Function [RFC5869]
KoD Kiss-o'-Death [RFC5905] KoD Kiss-o'-Death [RFC5905]
NTP Network Time Protocol [RFC5905] NTP Network Time Protocol [RFC5905]
NTS Network Time Security NTS Network Time Security
NTS NAK NTS negative-acknowledgment NTS NAK NTS negative-acknowledgment
NTS-KE Network Time Security Key Exchange NTS-KE Network Time Security Key Establishment
S2C Server-to-client S2C Server-to-client
TLS Transport Layer Security [RFC8446] TLS Transport Layer Security [RFC8446]
Authors' Addresses Authors' Addresses
Daniel Fox Franke Daniel Fox Franke
Akamai Technologies Akamai Technologies
145 Broadway 145 Broadway
Cambridge, MA 02142 Cambridge, MA 02142
United States United States
Email: dafranke@akamai.com Email: dafranke@akamai.com
 End of changes. 39 change blocks. 
52 lines changed or deleted 82 lines changed or added

This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/