draft-ietf-ntp-using-nts-for-ntp-11.txt   draft-ietf-ntp-using-nts-for-ntp-12.txt 
NTP Working Group D. Franke NTP Working Group D. Franke
Internet-Draft Internet-Draft
Intended status: Standards Track D. Sibold Intended status: Standards Track D. Sibold
Expires: September 6, 2018 K. Teichel Expires: January 2, 2019 K. Teichel
PTB PTB
March 05, 2018 July 01, 2018
Network Time Security for the Network Time Protocol Network Time Security for the Network Time Protocol
draft-ietf-ntp-using-nts-for-ntp-11 draft-ietf-ntp-using-nts-for-ntp-12
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
Network Time Protocol. Network Time Protocol.
Status of This Memo Status of This Memo
skipping to change at page 1, line 35 skipping to change at page 1, line 35
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 6, 2018. This Internet-Draft will expire on January 2, 2019.
Copyright Notice Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the Copyright (c) 2018 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 15 skipping to change at page 2, line 15
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Objectives . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Objectives . . . . . . . . . . . . . . . . . . . . . . . 3
1.2. Protocol overview . . . . . . . . . . . . . . . . . . . . 4 1.2. Protocol overview . . . . . . . . . . . . . . . . . . . . 4
2. Requirements Language . . . . . . . . . . . . . . . . . . . . 5 2. Requirements Language . . . . . . . . . . . . . . . . . . . . 5
3. TLS profile for Network Time Security . . . . . . . . . . . . 5 3. TLS profile for Network Time Security . . . . . . . . . . . . 5
4. The NTS Key Establishment protocol . . . . . . . . . . . . . 6 4. The NTS Key Establishment protocol . . . . . . . . . . . . . 6
4.1. NTS-KE record types . . . . . . . . . . . . . . . . . . . 8 4.1. NTS-KE Record Types . . . . . . . . . . . . . . . . . . . 8
4.1.1. End of Message . . . . . . . . . . . . . . . . . . . 8 4.1.1. End of Message . . . . . . . . . . . . . . . . . . . 8
4.1.2. NTS Next Protocol Negotiation . . . . . . . . . . . . 9 4.1.2. NTS Next Protocol Negotiation . . . . . . . . . . . . 9
4.1.3. Error . . . . . . . . . . . . . . . . . . . . . . . . 9 4.1.3. Error . . . . . . . . . . . . . . . . . . . . . . . . 9
4.1.4. Warning . . . . . . . . . . . . . . . . . . . . . . . 10 4.1.4. Warning . . . . . . . . . . . . . . . . . . . . . . . 10
4.1.5. AEAD Algorithm Negotiation . . . . . . . . . . . . . 10 4.1.5. AEAD Algorithm Negotiation . . . . . . . . . . . . . 10
4.1.6. New Cookie for NTPv4 . . . . . . . . . . . . . . . . 11 4.1.6. New Cookie for NTPv4 . . . . . . . . . . . . . . . . 11
4.2. Key Extraction (generally) . . . . . . . . . . . . . . . 11 4.2. Key Extraction (generally) . . . . . . . . . . . . . . . 11
5. NTS Extension Fields for NTPv4 . . . . . . . . . . . . . . . 11 5. NTS Extension Fields for NTPv4 . . . . . . . . . . . . . . . 11
5.1. Key Extraction (for NTPv4) . . . . . . . . . . . . . . . 11 5.1. Key Extraction (for NTPv4) . . . . . . . . . . . . . . . 11
5.2. Packet structure overview . . . . . . . . . . . . . . . . 12 5.2. Packet structure overview . . . . . . . . . . . . . . . . 12
5.3. The Unique Identifier extension field . . . . . . . . . . 12 5.3. The Unique Identifier extension field . . . . . . . . . . 12
5.4. The NTS Cookie extension field . . . . . . . . . . . . . 13 5.4. The NTS Cookie extension field . . . . . . . . . . . . . 13
5.5. The NTS Cookie Placeholder extension field . . . . . . . 13 5.5. The NTS Cookie Placeholder extension field . . . . . . . 13
5.6. The NTS Authenticator and Encrypted Extension Fields 5.6. The NTS Authenticator and Encrypted Extension Fields
extension field . . . . . . . . . . . . . . . . . . . . . 13 extension field . . . . . . . . . . . . . . . . . . . . . 13
6. Protocol details . . . . . . . . . . . . . . . . . . . . . . 14 6. Protocol details . . . . . . . . . . . . . . . . . . . . . . 15
7. Suggested format for NTS cookies . . . . . . . . . . . . . . 17 7. Suggested format for NTS cookies . . . . . . . . . . . . . . 18
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 19 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 20
9. Security considerations . . . . . . . . . . . . . . . . . . . 23 9. Implementation Status . . . . . . . . . . . . . . . . . . . . 24
9.1. Avoiding DDoS amplification . . . . . . . . . . . . . . . 23 9.1. Implementation PoC 1 . . . . . . . . . . . . . . . . . . 24
9.2. Initial verification of server certificates . . . . . . . 23 9.1.1. Coverage . . . . . . . . . . . . . . . . . . . . . . 24
9.3. Usage of NTP pools . . . . . . . . . . . . . . . . . . . 24 9.1.2. Licensing . . . . . . . . . . . . . . . . . . . . . . 24
9.4. Delay attacks . . . . . . . . . . . . . . . . . . . . . . 25 9.1.3. Contact Information . . . . . . . . . . . . . . . . . 25
9.5. Random number generation . . . . . . . . . . . . . . . . 25 9.1.4. Last Update . . . . . . . . . . . . . . . . . . . . . 25
10. Privacy Considerations . . . . . . . . . . . . . . . . . . . 25 9.2. Implementation PoC 2 . . . . . . . . . . . . . . . . . . 25
10.1. Unlinkability . . . . . . . . . . . . . . . . . . . . . 25 9.2.1. Coverage . . . . . . . . . . . . . . . . . . . . . . 25
10.2. Confidentiality . . . . . . . . . . . . . . . . . . . . 26 9.2.2. Licensing . . . . . . . . . . . . . . . . . . . . . . 25
11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 26 9.2.3. Contact Information . . . . . . . . . . . . . . . . . 25
12. References . . . . . . . . . . . . . . . . . . . . . . . . . 27 9.2.4. Last Update . . . . . . . . . . . . . . . . . . . . . 25
12.1. Normative References . . . . . . . . . . . . . . . . . . 27 9.3. Interoperability . . . . . . . . . . . . . . . . . . . . 25
12.2. Informative References . . . . . . . . . . . . . . . . . 28 10. Security considerations . . . . . . . . . . . . . . . . . . . 26
Appendix A. Terms and Abbreviations . . . . . . . . . . . . . . 29 10.1. Avoiding DDoS amplification . . . . . . . . . . . . . . 26
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 29 10.2. Initial verification of server certificates . . . . . . 26
10.3. Usage of NTP pools . . . . . . . . . . . . . . . . . . . 27
10.4. Delay attacks . . . . . . . . . . . . . . . . . . . . . 27
10.5. Random number generation . . . . . . . . . . . . . . . . 28
11. Privacy Considerations . . . . . . . . . . . . . . . . . . . 28
11.1. Unlinkability . . . . . . . . . . . . . . . . . . . . . 28
11.2. Confidentiality . . . . . . . . . . . . . . . . . . . . 29
12. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 29
13. References . . . . . . . . . . . . . . . . . . . . . . . . . 29
13.1. Normative References . . . . . . . . . . . . . . . . . . 29
13.2. Informative References . . . . . . . . . . . . . . . . . 31
Appendix A. Terms and Abbreviations . . . . . . . . . . . . . . 32
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 32
1. Introduction 1. Introduction
This memo specifies Network Time Security (NTS), a cryptographic This memo specifies Network Time Security (NTS), a cryptographic
security mechanism for network time synchronization. A complete security mechanism for network time synchronization. A complete
specification is provided for application of NTS to the client-server specification is provided for application of NTS to the client-server
mode of the Network Time Protocol (NTP) [RFC5905]. mode of the Network Time Protocol (NTP) [RFC5905].
1.1. Objectives 1.1. Objectives
The objectives of NTS are as follows: The objectives of NTS are as follows:
o Identity: Through the use of the X.509 PKI, implementations may o Identity: Through the use of the X.509 PKI, implementations may
cryptographically establish the identity of the parties they are cryptographically establish the identity of the parties they are
communicating with communicating with.
o Authentication: Implementations may cryptographically verify that o Authentication: Implementations may cryptographically verify that
any time synchronization packets are authentic, i.e., that they any time synchronization packets are authentic, i.e., that they
were produced by an identified party and have not been modified in were produced by an identified party and have not been modified in
transit. transit.
o Confidentiality: Although basic time synchronization data is o Confidentiality: Although basic time synchronization data is
considered non-confidential and sent in the clear, NTS includes considered non-confidential and sent in the clear, NTS includes
support for encrypting NTP extension fields. support for encrypting NTP extension fields.
skipping to change at page 3, line 42 skipping to change at page 4, line 5
o Request-response consistency: Client implementations may verify o Request-response consistency: Client implementations may verify
that a time synchronization packet received from a server was sent that a time synchronization packet received from a server was sent
in response to a particular request from the client. in response to a particular request from the client.
o Unlinkability: For mobile clients, NTS will not leak any o Unlinkability: For mobile clients, NTS will not leak any
information additional to NTP which would permit a passive information additional to NTP which would permit a passive
adversary to determine that two packets sent over different adversary to determine that two packets sent over different
networks came from the same client. networks came from the same client.
o Non-amplification: implementations (especially server o Non-amplification: Implementations (especially server
implementations) may avoid acting as DDoS amplifiers by never implementations) may avoid acting as DDoS amplifiers by never
responding to a request with a packet larger than the request responding to a request with a packet larger than the request
packet. packet.
o Scalability: Server implementations may serve large numbers of o Scalability: Server implementations may serve large numbers of
clients without having to retain any client-specific state. clients without having to retain any client-specific state.
1.2. Protocol overview 1.2. Protocol overview
The Network Time Protocol includes many different operating modes to The Network Time Protocol includes many different operating modes to
skipping to change at page 4, line 34 skipping to change at page 4, line 42
client-server mode: any scheme which provides replay protection client-server mode: any scheme which provides replay protection
inherently involves maintaining some state to keep track of what inherently involves maintaining some state to keep track of what
messages have already been seen. messages have already been seen.
This memo specifies NTS exclusively for the client-server mode of This memo specifies NTS exclusively for the client-server mode of
NTP. To this end, NTS is structured as a suite of two protocols: NTP. To this end, NTS is structured as a suite of two protocols:
The "NTS Extension Fields for NTPv4" are a collection of NTP The "NTS Extension Fields for NTPv4" are a collection of NTP
extension fields for cryptographically securing NTPv4 using extension fields for cryptographically securing NTPv4 using
previously-established key material. They are suitable for previously-established key material. They are suitable for
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, but on the other hand are without retaining per-client state, but on the other hand are
suitable *only* for client/server mode because only the client, suitable *only* for client-server mode because only the client,
and not the server, is protected from replay. and not the server, is protected from replay.
The "NTS Key Establishment" protocol (NTS-KE) is 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 and negotiate some for NTPv4. It uses TLS to exchange keys and negotiate some
additional protocol options, but then quickly closes the TLS additional protocol options, but then quickly closes the TLS
channel and permits the server to discard all associated state. channel and permits the server to discard all associated state.
The typical protocol flow is as follows. The client connects to the The typical protocol flow is as follows. The client connects to the
server on the NTS TCP port and the two parties perform a TLS 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. The parties use TLS key export [RFC5705] to supply of cookies. The parties use TLS key export [RFC5705] to
skipping to change at page 5, line 13 skipping to change at page 5, line 21
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.
Time synchronization proceeds over the NTP UDP port. The client Time synchronization proceeds over the NTP UDP port. The client
sends the server an NTP client packet which includes several sends the server an NTP client packet which includes several
extension fields. Included among these fields are a cookie extension fields. Included among these fields are a cookie
(previously provided by the server), and an authentication tag, (previously provided by the server), and an authentication tag,
computed using key material extracted from the NTS-KE handshake. The computed using key material extracted from the NTS-KE handshake. The
server uses the cookie to recover this key material (previously server uses the cookie to recover this key material (previously
discarded to avoid maintaining state) and send back an authenticated discarded to avoid maintaining state) and sends back an authenticated
response. The response includes a fresh, encrypted cookie which the response. The response includes a fresh, encrypted cookie which the
client then sends back in the clear with its next request. (This client then sends back in the clear with its next request. (This
constant refreshing of cookies is necessary in order to achieve NTS's constant refreshing of cookies is necessary in order to achieve NTS's
unlinkability goal.) unlinkability goal.)
2. Requirements Language 2. Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119]. document are to be interpreted as described in RFC 2119 [RFC2119].
skipping to change at page 5, line 44 skipping to change at page 6, line 4
Implementations MUST NOT negotiate TLS versions earlier than 1.2. Implementations MUST NOT negotiate TLS versions earlier than 1.2.
Implementations willing to negotiate more than one possible version Implementations willing to negotiate more than one possible version
of TLS SHOULD NOT respond to handshake failures by retrying with a of TLS SHOULD NOT respond to handshake failures by retrying with a
downgraded protocol version. If they do, they MUST implement downgraded protocol version. If they do, they MUST implement
[RFC7507]. [RFC7507].
TLS clients MUST NOT offer, and TLS servers MUST NOT select, RC4 TLS clients MUST NOT offer, and TLS servers MUST NOT select, RC4
cipher suites. [RFC7465] cipher suites. [RFC7465]
TLS 1.2 clients SHOULD offer, and TLS servers SHOULD accept, the TLS
TLS clients SHOULD offer, and TLS servers SHOULD accept, the TLS
Renegotiation Indication Extension [RFC5746]. Regardless, they MUST Renegotiation Indication Extension [RFC5746]. Regardless, they MUST
NOT initiate or permit insecure renegotiation. (*) NOT initiate or permit insecure renegotiation.
TLS 1.2 clients SHOULD offer, and TLS 1.2 servers SHOULD accept, the
TLS Session Hash and Extended Master Secret Extension [RFC7627].
TLS clients SHOULD offer, and TLS servers SHOULD accept, the TLS
Session Hash and Extended Master Secret Extension [RFC7627]. (*)
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.
(*): Note that TLS 1.3 or beyond may render the indicated
recommendations inapplicable.
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
response followed by a TLS "Close notify" alert and then discard the response followed by a TLS "Close notify" alert and then discard the
channel state. channel state.
The client's request and the server's response each SHALL consist of The client's request and the server's response each SHALL consist of
a sequence of records formatted according to Figure 1. The sequence a sequence of records formatted according to Figure 1. The sequence
SHALL be terminated by a "End of Message" record, which has a Record SHALL be terminated by a "End of Message" record, which has a Record
Type of zero and a zero-length body. Furthermore, requests and non- Type of zero and a zero-length body. Furthermore, requests and non-
error responses each SHALL include exactly one NTS Next Protocol error responses each SHALL include exactly one NTS Next Protocol
Negotiation record. Negotiation record.
0 1 2 3 Clients and servers MAY enforce length limits on requests and
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 responses, however servers MUST accept requests of at least 1024
octets, and clients SHOULD accept responses of at least 65536 octets.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|C| Record Type | Body Length | |C| Record Type | Body Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |
. . . .
. Record Body . . Record Body .
. . . .
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
skipping to change at page 7, line 12 skipping to change at page 7, line 20
C (Critical Bit): Determines the disposition of unrecognized C (Critical Bit): Determines the disposition of unrecognized
Record Types. Implementations which receive a record with an Record Types. Implementations which receive a record with an
unrecognized Record Type MUST ignore the record if the Critical unrecognized Record Type MUST ignore the record if the Critical
Bit is 0, and MUST treat it as an error if the Critical Bit is 1. Bit is 0, and MUST treat it as an error if the Critical Bit is 1.
Record Type: A 15-bit integer in network byte order. The Record Type: A 15-bit integer in network byte order. The
semantics of record types 0-5 are specified in this memo; semantics of record types 0-5 are specified in this memo;
additional type numbers SHALL be tracked through the IANA Network additional type numbers SHALL be tracked through the IANA Network
Time Security Key Establishment Record Types registry. Time Security Key Establishment Record Types registry.
Body Length: the length of the Record Body field, in octets, as a Body Length: The length of the Record Body field, in octets, as a
16-bit integer in network byte order. Record bodies MAY have any 16-bit integer in network byte order. Record bodies MAY have any
representable length and need not be aligned to a word boundary. representable length and need not be aligned to a word boundary.
Record Body: the syntax and semantics of this field SHALL be Record Body: The syntax and semantics of this field SHALL be
determined by the Record Type. determined by the Record Type.
For clarity regarding bit-endianness: the Critical Bit is the most- For clarity regarding bit-endianness: the Critical Bit is the most-
significant bit of the first octet. In C, given a network buffer significant bit of the first octet. In C, given a network buffer
`unsigned char b[]` containing an NTS-KE record, the critical bit is `unsigned char b[]` containing an NTS-KE record, the critical bit is
`b[0] >> 7` while the record type is `((b[0] & 0x7f) << 8) + b[1]`. `b[0] >> 7` while the record type is `((b[0] & 0x7f) << 8) + b[1]`.
Figure 2 provides a schematic overview of the key exchange. It Figure 2 provides a schematic overview of the key exchange. 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.
skipping to change at page 8, line 18 skipping to change at page 8, line 18
| - generate KE response message | | - generate KE response message |
| - included Record Types: | | - included Record Types: |
| - NTS Next Protocol Negotiation | | - NTS Next Protocol Negotiation |
| - AEAD Alg. Negotiation | | - AEAD Alg. Negotiation |
| - New Cookie for NTPv4 | | - New Cookie for NTPv4 |
| - <New Cookie for NTPv4> | | - <New Cookie for NTPv4> |
| - End of Message | | - End of Message |
+-----------------+---------------------+ +-----------------+---------------------+
| |
| |
Server -------- --+---------------+-----+-----------------------> Server -----------+---------------+-----+----------------------->
^ \ ^ \
/ \ / \
/ TLS application \ / TLS application \
/ data \ / data \
/ \ / \
/ V / V
Client -----+---------------------------------+----------------> Client -----+---------------------------------+---------------->
| | | |
| | | |
| | | |
+-----------+----------------------+ +------+-----------------+ +-----------+----------------------+ +------+-----------------+
|- 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 Alg. Negotiation | | | | o AEAD Alg. Negotiation | | |
| o End of Message | | | | o End of Message | | |
+----------------------------------+ +------------------------+ +----------------------------------+ +------------------------+
Figure 2: NTS Key Exchange messages Figure 2: NTS Key Exchange 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 an zero- The End of Message record has a Record Type number of 0 and an 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.
4.1.2. NTS Next Protocol Negotiation 4.1.2. NTS Next Protocol Negotiation
The NTS Next Protocol Negotiation record has a record type of 1. It The NTS Next Protocol Negotiation record has a Record Type of 1. It
MUST occur exactly once in every NTS-KE request and response. Its MUST occur exactly once in every NTS-KE request and response. Its
body consists of a sequence of 16-bit unsigned integers in network body consists of a sequence of 16-bit unsigned integers in network
byte order. Each integer represents a Protocol ID from the IANA byte order. Each integer represents a Protocol ID from the IANA
Network Time Security Next Protocols registry. The Critical Bit MUST Network Time Security Next Protocols registry. The Critical Bit MUST
be set. be set.
The Protocol IDs listed in the client's NTS Next Protocol Negotiation The Protocol IDs listed in the client's NTS Next Protocol Negotiation
record denote those protocols which the client wishes to speak using record denote those protocols which the client wishes to speak using
the key material established through this NTS-KE session. The the key material established through this NTS-KE session. The
Protocol IDs listed in the server's response MUST comprise a subset Protocol IDs listed in the server's response MUST comprise a subset
skipping to change at page 9, line 35 skipping to change at page 9, line 35
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 negotiated key material and MUST NOT proceed to the Next discard any negotiated key material and MUST NOT proceed to the Next
Protocol. Protocol.
The following error code 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, upon the expiration of an implementation-defined this error if, upon the expiration of an implementation-defined
timeout, it has not yet received a complete and syntactically timeout, it has not yet received a complete and syntactically
skipping to change at page 10, line 46 skipping to change at page 10, line 46
the list MUST include at least one algorithm. In responses, it MUST the list MUST include at least one algorithm. In responses, it MUST
include at most one. Honoring the client's preference order is include at most one. Honoring the client's preference order is
OPTIONAL: servers may select among any of the client's offered OPTIONAL: servers may select among any of the client's offered
choices, even if they are able to support some other algorithm which choices, even if they are able to support some other algorithm which
the client prefers more. the client prefers more.
Server implementations of NTS extension fields for NTPv4 (Section 5) Server implementations of NTS extension fields for NTPv4 (Section 5)
MUST support AEAD_AES_SIV_CMAC_256 [RFC5297] (Numeric Identifier 15). MUST support AEAD_AES_SIV_CMAC_256 [RFC5297] (Numeric Identifier 15).
That is, if the client includes AEAD_AES_SIV_CMAC_256 in its AEAD That is, if the client includes AEAD_AES_SIV_CMAC_256 in its AEAD
Algorithm Negotiation record, and the server accepts Protocol ID 0 Algorithm Negotiation record, and the server accepts Protocol ID 0
(NTPv4); in its NTS Next Protocol Negotiation record, then the (NTPv4) in its NTS Next Protocol Negotiation record, then the
server's AEAD Algorithm Negotiation record MUST NOT be empty. server's AEAD Algorithm Negotiation record MUST NOT be empty.
4.1.6. New Cookie for NTPv4 4.1.6. New Cookie for NTPv4
The New Cookie for NTPv4 record has a Record Type number of 5. The The New Cookie for NTPv4 record has a Record Type number of 5. The
contents of its body SHALL be implementation-defined and clients MUST contents of its body SHALL be implementation-defined and clients MUST
NOT attempt to interpret them. See Section 7 for a suggested NOT attempt to interpret them. See Section 7 for a suggested
construction. construction.
Clients MUST NOT send records of this type. Servers MUST send at Clients MUST NOT send records of this type. Servers MUST send at
skipping to change at page 12, line 48 skipping to change at page 12, line 48
5.3. The Unique Identifier extension field 5.3. The Unique Identifier extension field
The Unique Identifier extension field has a Field Type of [[TBD2]]. The Unique Identifier extension field has a Field Type of [[TBD2]].
When the extension field is included in a client packet (mode 3), its When the extension field is included in a client packet (mode 3), its
body SHALL consist of a string of octets generated uniformly at body SHALL consist of a string of octets generated uniformly at
random. The string MUST be at least 32 octets long. When the random. The string MUST be at least 32 octets long. When the
extension field is included in a server packet (mode 4), its body extension field is included in a server packet (mode 4), its body
SHALL contain the same octet string as was provided in the client SHALL contain the same octet string as was provided in the client
packet to which the server is responding. Its use in modes other packet to which the server is responding. Its use in modes other
than client/server is not defined. than client-server is not defined.
The Unique Identifier extension field provides the client with a The Unique Identifier extension field provides the client with a
cryptographically strong means of detecting replayed packets. It MAY cryptographically strong means of detecting replayed packets. It MAY
also be used standalone, without NTS, in which case it provides the also be used standalone, without NTS, in which case it provides the
client with a means of detecting spoofed packets from off-path client with a means of detecting spoofed packets from off-path
attackers. Historically, NTP's origin timestamp field has played attackers. Historically, NTP's origin timestamp field has played
both these roles, but for cryptographic purposes this is suboptimal both these roles, but for cryptographic purposes this is suboptimal
because it is only 64 bits long and, depending on implementation because it is only 64 bits long and, depending on implementation
details, most of those bits may be predictable. In contrast, the details, most of those bits may be predictable. In contrast, the
Unique Identifier extension field enables a degree of Unique Identifier extension field enables a degree of
skipping to change at page 13, line 50 skipping to change at page 13, line 50
checking its length, MUST be ignored by the server. checking its length, MUST be ignored by the server.
5.6. The NTS Authenticator and Encrypted Extension Fields extension 5.6. The NTS Authenticator and Encrypted Extension Fields extension
field field
The NTS Authenticator and Encrypted Extension Fields extension field The NTS Authenticator and Encrypted Extension Fields extension field
is the central cryptographic element of an NTS-protected NTP packet. is the central cryptographic element of an NTS-protected NTP packet.
Its Field Type is [[TBD5]] and the format of its body SHALL be as Its Field Type is [[TBD5]] and the format of its body SHALL be as
follows: follows:
Nonce length: two octets in network byte order, giving the length Nonce length: Two octets in network byte order, giving the length
of the Nonce field and interpreted as an unsigned integer. of the Nonce field and interpreted as an unsigned integer.
Nonce: a nonce as required by the negotiated AEAD Algorithm. Nonce: A nonce as required by the negotiated AEAD Algorithm.
Ciphertext: the output of the negotiated AEAD Algorithm. The Ciphertext: The output of the negotiated AEAD Algorithm. The
structure of this field is determined by the negotiated algorithm, structure of this field is determined by the negotiated algorithm,
but it typically contains an authentication tag in addition to the but it typically contains an authentication tag in addition to the
actual ciphertext. actual ciphertext.
Padding: between 1 and 24 octets of padding, with every octet set Padding: several octets of padding, with every octet set to the
to the number of padding octets included, e.g., "01", "02 02", or number of padding octets included, e.g., "01", "02 02", or "03 03
"03 03 03". The number of padding bytes SHOULD be chosen in order 03". Constraints on the number of padding octets included are
to comply with the RFC 7822 [RFC7822] requirement that (in the enumerated below.
absence of a legacy MAC) extension fields have a total length in
octets (including the four octets for the type and length fields)
which is at least 28 and divisible by 4. At least one octet of
padding MUST be included, so that implementations can
unambiguously delimit the end of the ciphertext from the start of
the padding by examining the last octet to determine the padding
length.
The Ciphertext field SHALL be formed by providing the following The Ciphertext field SHALL be formed by providing the following
inputs to the negotiated AEAD Algorithm: inputs to the negotiated AEAD Algorithm:
K: For packets sent from the client to the server, the C2S key K: For packets sent from the client to the server, the C2S key
SHALL be used. For packets sent from the server to the client, SHALL be used. For packets sent from the server to the client,
the S2C key SHALL be used. the S2C key SHALL be used.
A: The associated data SHALL consist of the portion of the NTP A: The associated data SHALL consist of the portion of the NTP
packet beginning from the start of the NTP header and ending at packet beginning from the start of the NTP header and ending at
skipping to change at page 14, line 44 skipping to change at page 14, line 37
Authenticator and Encrypted Extension Fields extension field. Authenticator and Encrypted Extension Fields extension field.
P: The plaintext SHALL consist of all (if any) NTP extension P: The plaintext SHALL consist of all (if any) NTP extension
fields to be encrypted. The format of any such fields SHALL be in fields to be encrypted. The format of any such fields SHALL be in
accordance with RFC 7822 [RFC7822], and if multiple extension accordance with RFC 7822 [RFC7822], and if multiple extension
fields are present they SHALL be joined by concatenation. fields are present they SHALL be joined by concatenation.
N: The nonce SHALL be formed however required by the negotiated N: The nonce SHALL be formed however required by the negotiated
AEAD Algorithm. AEAD Algorithm.
The number of padding octets included SHALL conform to the following
constraints:
The number MUST be at least 1, so that the final octet of the
extension field always gives the padding length.
The number MUST NOT be greater than 255, since high numbers are
unrepresentable in a single octet
The number MUST result in an extension field length which is legal
per [RFC7822]. That is, the number of padding octets must be
chosen so that the total length of the extension field (including
the Field Type and Length subfields) is a multiple of 4 greater
than or equal to 16, and greater than or equal to 28 if the
extension field is the last one in the packet.
For mode 3 (client) packets only, the number MUST be at least
MAX(MIN(N_MAX, 16) - N_len, 0) + 4, where `N_len` represents the
actual length of the nonce and N_MAX is, per [RFC5116], the
maximum permitted nonce length for the AEAD algorithm in use.
This constraint ensures that servers can always use an adequately
long nonce without causing the size of their response packet to
exceed the size of the request packet. Servers SHOULD enforce
this constraint by dropping client packets that do not conform to
it. Clients MUST NOT enforce it since it is not binding on mode 4
(server) packets to begin with.
The NTS Authenticator and Encrypted Extension Fields extension field The NTS Authenticator and Encrypted Extension Fields extension field
MUST NOT be included in NTP packets whose mode is other than 3 MUST NOT be included in NTP packets whose mode is other than 3
(client) or 4 (server). (client) or 4 (server).
6. Protocol details 6. Protocol details
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 3: extension fields as displayed in Figure 3:
Exactly one Unique Identifier extension field, which MUST be Exactly one Unique Identifier extension field, which MUST be
skipping to change at page 16, line 13 skipping to change at page 16, line 32
in its response: in its response:
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 SHALL authenticated, MUST NOT be encrypted, and whose contents SHALL
echo those provided by the client. echo those provided by the client.
Exactly one NTS Authenticator and Encrypted Extension Fields Exactly one NTS Authenticator and Encrypted Extension Fields
extension field, generated using the AEAD algorithm and S2C key extension field, generated using the AEAD algorithm and S2C key
recovered from the cookie provided by the client. recovered from the cookie provided by the client.
One or more NTS Cookie extension fields, which MUST be One or more NTS Cookie extension fields, which MUST be encrypted
authenticated and encrypted. The number of NTS Cookie extension and authenticated. The number of NTS Cookie extension fields
fields included SHOULD be equal to, and MUST NOT exceed, one plus included SHOULD be equal to, and MUST NOT exceed, one plus the
the number of valid NTS Cookie Placeholder extension fields number of valid NTS Cookie Placeholder extension fields included
included in the request. in the request.
We emphasize the contrast that NTS Cookie extension fields MUST NOT
be encrypted when sent from client to server, but MUST be encrypted
from sent from server to client. The former is necessary in order
for the server to be able to recover the C2S and S2C keys, while the
latter is necessary to satisfy the unlinkability goals discussed in
Section 11.1. We emphasize also that " encrypted" means encapsulated
within the the NTS Authenticator and Encrypted Extensions extension
field. While the body of a NTS Cookie extension field will generally
consist of some sort of AEAD output (regardless of whether the
recommendations of Section 7 are precisely followed), this is not
sufficient to make the extension field "encrypted".
The server MAY include additional (non-NTS-related) extension fields, The server MAY include additional (non-NTS-related) extension fields,
which MAY appear prior to the NTS Authenticator and Encrypted which MAY appear prior to the NTS Authenticator and Encrypted
Extension Fields extension field (therefore authenticated but not Extension Fields extension field (therefore authenticated but not
encrypted), within it (therefore encrypted and authenticated), or encrypted), within it (therefore encrypted and authenticated), or
after it (therefore neither encrypted nor authenticated). In after it (therefore neither encrypted nor authenticated). In
general, however, the client MUST discard any unauthenticated general, however, the client MUST discard any unauthenticated
extension fields and process the packet as though they were not extension fields and process the packet as though they were not
present. Clients MAY implement exceptions to this requirement for present. Clients MAY implement exceptions to this requirement for
particular extension fields if their specification explicitly particular extension fields if their specification explicitly
skipping to change at page 17, line 10 skipping to change at page 18, line 10
this check passes, the client SHOULD wait until the next poll for a this check passes, the client SHOULD wait until the next poll for a
valid NTS-protected response and if none is received, discard all valid NTS-protected response and if none is received, discard all
cookies and AEAD keys associated with the server which sent the NAK cookies and AEAD keys associated with the server which sent the NAK
and initiate a fresh NTS-KE handshake. and initiate a fresh NTS-KE handshake.
+---------------------------------------+ +---------------------------------------+
| - verify time request message | | - verify time request message |
| - generate time response message | | - generate time response message |
| - included NTPv4 extension fields | | - included NTPv4 extension fields |
| o Unique Identifier EF | | o Unique Identifier EF |
| o NTS Cookie EF | | o NTS Authentication and |
| o <NTS Cookie EF> | | Encrypted Extension Fields EF |
| | | - NTS Cookie EF |
| - generate AEAD tag of NTP message | | - <NTS Cookie EF> |
| - add NTS Authentication and |
| Encrypted Extension Fields EF |
| - transmit time request packet | | - transmit time request packet |
+-----------------+---------------------+ +-----------------+---------------------+
| |
| |
Server -------- --+---------------+-----+-----------------------> Server -------- --+---------------+-----+----------------------->
^ \ ^ \
/ \ / \
time request / \ time response time request / \ time response
(mode 3) / \ (mode 4) (mode 3) / \ (mode 4)
/ \ / \
skipping to change at page 18, line 10 skipping to change at page 19, line 7
This section is non-normative. It gives a suggested way for servers This section is non-normative. It gives a suggested way for servers
to construct NTS cookies. All normative requirements are stated in to construct NTS cookies. All normative requirements are stated in
Section 4.1.6 and Section 5.4. Section 4.1.6 and Section 5.4.
The role of cookies in NTS is closely analogous to that of session The role of cookies in NTS is closely analogous to that of session
cookies in TLS. Accordingly, the thematic resemblance of this cookies in TLS. Accordingly, the thematic resemblance of this
section to RFC 5077 [RFC5077] is deliberate, and the reader should section to RFC 5077 [RFC5077] is deliberate, and the reader should
likewise take heed of its security considerations. likewise take heed of its security considerations.
Servers SHOULD select an AEAD algorithm which they will use to Servers should select an AEAD algorithm which they will use to
encrypt and authenticate cookies. The chosen algorithm SHOULD be one encrypt and authenticate cookies. The chosen algorithm should be one
such as AEAD_AES_SIV_CMAC_256 [RFC5297] which resists accidental such as AEAD_AES_SIV_CMAC_256 [RFC5297] which resists accidental
nonce reuse, and it need not be the same as the one that was nonce reuse, and it need not be the same as the one that was
negotiated with the client. Servers SHOULD randomly generate and negotiated with the client. Servers should randomly generate and
store a master AEAD key `K`. Servers SHOULD additionally choose a store a master AEAD key `K`. Servers should additionally choose a
non-secret, unique value `I` as key-identifier for `K`. non-secret, unique value `I` as key-identifier for `K`.
Servers SHOULD periodically (e.g., once daily) generate a new pair Servers should periodically (e.g., once daily) generate a new pair
(I,K) and immediately switch to using these values for all newly- (I,K) and immediately switch to using these values for all newly-
generated cookies. Immediately following each such key rotation, generated cookies. Immediately following each such key rotation,
servers SHOULD securely erase any keys generated two or more rotation servers should securely erase any keys generated two or more rotation
periods prior. Servers SHOULD continue to accept any cookie periods prior. Servers should continue to accept any cookie
generated using keys that they have not yet erased, even if those generated using keys that they have not yet erased, even if those
keys are no longer current. Erasing old keys provides for forward keys are no longer current. Erasing old keys provides for forward
secrecy, limiting the scope of what old information can be stolen if secrecy, limiting the scope of what old information can be stolen if
a master key is somehow compromised. Holding on to a limited number a master key is somehow compromised. Holding on to a limited number
of old keys allows clients to seamlessly transition from one of old keys allows clients to seamlessly transition from one
generation to the next without having to perform a new NTS-KE generation to the next without having to perform a new NTS-KE
handshake. handshake.
The need to keep keys synchronized across load-balanced clusters can The need to keep keys synchronized across load-balanced clusters can
make automatic key rotation challenging. However, the task can be make automatic key rotation challenging. However, the task can be
accomplished without the need for central key-management accomplished without the need for central key-management
infrastructure by using a ratchet, i.e., making each new key a infrastructure by using a ratchet, i.e., making each new key a
deterministic, cryptographically pseudo-random function of its deterministic, cryptographically pseudo-random function of its
predecessor. A recommended concrete implementation of this approach predecessor. A recommended concrete implementation of this approach
is to use HKDF [RFC5869] to derive new keys, using the key's is to use HKDF [RFC5869] to derive new keys, using the key's
predecessor as Input Keying Material and its key identifier as a predecessor as Input Keying Material and its key identifier as a
salt. salt.
To form a cookie, servers SHOULD first form a plaintext `P` To form a cookie, servers should first form a plaintext `P`
consisting of the following fields: consisting of the following fields:
The AEAD algorithm negotiated during NTS-KE The AEAD algorithm negotiated during NTS-KE
The S2C key The S2C key
The C2S key The C2S key
Servers SHOULD then generate a nonce `N` uniformly at random, and Servers should then generate a nonce `N` uniformly at random, and
form AEAD output `C` by encrypting `P` under key `K` with nonce `N` form AEAD output `C` by encrypting `P` under key `K` with nonce `N`
and no associated data. and no associated data.
The cookie SHOULD consist of the tuple `(I,N,C)`. The cookie should consist of the tuple `(I,N,C)`.
To verify and decrypt a cookie provided by the client, first parse it To verify and decrypt a cookie provided by the client, first parse it
into its components `I`, `N`, and `C`. Use `I` to look up its into its components `I`, `N`, and `C`. Use `I` to look up its
decryption key `K`. If the key whose identifier is `I` has been decryption key `K`. If the key whose identifier is `I` has been
erased or never existed, decryption fails; reply with an NTS NAK. erased or never existed, decryption fails; reply with an NTS NAK.
Otherwise, attempt to decrypt and verify ciphertext `C` using key `K` Otherwise, attempt to decrypt and verify ciphertext `C` using key `K`
and nonce `N` with no associated data. If decryption or verification and nonce `N` with no associated data. If decryption or verification
fails, reply with an NTS NAK. Otherwise, parse out the contents of fails, reply with an NTS NAK. Otherwise, parse out the contents of
the resulting plaintext `P` to obtain the negotiated AEAD algorithm, the resulting plaintext `P` to obtain the negotiated AEAD algorithm,
S2C key, and C2S key. S2C key, and C2S key.
skipping to change at page 20, line 41 skipping to change at page 21, line 34
| [[TBD4]] | NTS Cookie Placeholder | [[this | | [[TBD4]] | NTS Cookie Placeholder | [[this |
| | | memo]] | | | | memo]] |
| [[TBD5]] | NTS Authenticator and Encrypted | [[this | | [[TBD5]] | NTS Authenticator and Encrypted | [[this |
| | Extension Fields | memo]] | | | Extension Fields | memo]] |
+-----------+-----------------------------------------+-------------+ +-----------+-----------------------------------------+-------------+
IANA is requested to create a new registry entitled "Network Time IANA is requested to create a new registry entitled "Network Time
Security Key Establishment Record Types". Entries SHALL have the Security Key Establishment Record Types". Entries SHALL have the
following fields: following fields:
Type Number (REQUIRED): An integer in the range 0-32767 inclusive Type Number (REQUIRED): An integer in the range 0-32767 inclusive.
Description (REQUIRED): short text description of the purpose of Description (REQUIRED): A short text description of the purpose of
the field the field.
Set Critical Bit (REQUIRED): One of "MUST", "SHOULD", "MAY", Set Critical Bit (REQUIRED): One of "MUST", "SHOULD", "MAY",
"SHOULD NOT", or "MUST NOT" "SHOULD NOT", or "MUST NOT".
Reference (REQUIRED): A reference to a document specifying the Reference (REQUIRED): A reference to a document specifying the
semantics of the record. semantics of the record.
The policy for allocation of new entries in this registry SHALL vary The policy for allocation of new entries in this registry SHALL vary
by the Type Number, as follows: by the Type Number, as follows:
0-1023: IETF Review 0-1023: IETF Review
1024-16383: Specification Required 1024-16383: Specification Required
skipping to change at page 21, line 45 skipping to change at page 22, line 37
| | | | memo]] | | | | | memo]] |
| 5 | New cookie for NTPv4 | SHOULD | [[this | | 5 | New cookie for NTPv4 | SHOULD | [[this |
| | | NOT | memo]] | | | | NOT | memo]] |
| 16384-32767 | Reserved for Private & | MAY | [[this | | 16384-32767 | Reserved for Private & | MAY | [[this |
| | Experimental Use | | memo]] | | | Experimental Use | | memo]] |
+-------------+-----------------------------+----------+------------+ +-------------+-----------------------------+----------+------------+
IANA is requested to create a new registry entitled "Network Time IANA is requested to create a new registry entitled "Network Time
Security Next Protocols". Entries SHALL have the following fields: Security Next Protocols". Entries SHALL have the following fields:
Protocol ID (REQUIRED): a integer in the range 0-65535 inclusive, Protocol ID (REQUIRED): An integer in the range 0-65535 inclusive,
functioning as an identifier. functioning as an identifier.
Protocol Name (REQUIRED): a short text string naming the protocol Protocol Name (REQUIRED): A short text string naming the protocol
being identified. being identified.
Reference (RECOMMENDED): a reference to a relevant specification Reference (RECOMMENDED): A reference to a relevant specification
document. If no relevant document exists, a point-of-contact for document. If no relevant document exists, a point-of-contact for
questions regarding the entry SHOULD be listed here in lieu. questions regarding the entry SHOULD be listed here in lieu.
Applications for new entries in this registry SHALL specify all Applications for new entries in this registry SHALL specify all
desired fields, and SHALL be granted upon approval by a Designated desired fields, and SHALL be granted upon approval by a Designated
Expert. Protocol IDs 32768-65535 SHALL be reserved for Private or Expert. Protocol IDs 32768-65535 SHALL be reserved for Private or
Experimental Use, and SHALL NOT be registered. Experimental Use, and SHALL NOT be registered.
The initial contents of this registry SHALL be as follows: The initial contents of this registry SHALL be as follows:
skipping to change at page 22, line 29 skipping to change at page 23, line 20
| 0 | Network Time Protocol version | [[this memo]] | | 0 | Network Time Protocol version | [[this memo]] |
| | 4 (NTPv4) | | | | 4 (NTPv4) | |
| 32768-65535 | Reserved for Private or | Reserved by [[this | | 32768-65535 | Reserved for Private or | Reserved by [[this |
| | Experimental Use | memo]] | | | Experimental Use | memo]] |
+-------------+-------------------------------+---------------------+ +-------------+-------------------------------+---------------------+
IANA is requested to create two new registries entitled "Network Time IANA is requested to create two new registries entitled "Network Time
Security Error Codes" and "Network Time Security Warning Codes". Security Error Codes" and "Network Time Security Warning Codes".
Entries in each SHALL have the following fields: Entries in each SHALL have the following fields:
Number (REQUIRED): a integer in the range 0-65535 inclusive Number (REQUIRED): An integer in the range 0-65535 inclusive.
Description (REQUIRED): a short text description of the condition. Description (REQUIRED): A short text description of the condition.
Reference (REQUIRED): a reference to a relevant specification Reference (REQUIRED): A reference to a relevant specification
document. document.
The policy for allocation of new entries in these registries SHALL The policy for allocation of new entries in these registries SHALL
vary by their Number, as follows: vary by their Number, as follows:
0-1023: IETF Review 0-1023: IETF Review
1024-32767: Specification Required 1024-32767: Specification Required
32768-65535: Private and Experimental Use 32768-65535: Private and Experimental Use
skipping to change at page 23, line 15 skipping to change at page 24, line 5
+--------+---------------------------------+---------------+ +--------+---------------------------------+---------------+
| Number | Description | Reference | | Number | Description | Reference |
+--------+---------------------------------+---------------+ +--------+---------------------------------+---------------+
| 0 | Unrecognized Critical Extension | [[this memo]] | | 0 | Unrecognized Critical Extension | [[this memo]] |
| 1 | Bad Request | [[this memo]] | | 1 | Bad Request | [[this memo]] |
+--------+---------------------------------+---------------+ +--------+---------------------------------+---------------+
The Network Time Security Warning Codes Registry SHALL initially be The Network Time Security Warning Codes Registry SHALL initially be
empty. empty.
9. Security considerations 9. Implementation Status
9.1. Avoiding DDoS amplification This section records the status of known implementations of the
protocol defined by this specification at the time of posting of this
Internet-Draft, and is based on a proposal described in RFC 7942.
The description of implementations in this section is intended to
assist the IETF in its decision processes in progressing drafts to
RFCs. Please note that the listing of any individual implementation
here does not imply endorsement by the IETF. Furthermore, no effort
has been spent to verify the information presented here that was
supplied by IETF contributors. This is not intended as, and must not
be construed to be, a catalog of available implementations or their
features. Readers are advised to note that other implementations may
exist.
According to RFC 7942, "this will allow reviewers and working groups
to assign due consideration to documents that have the benefit of
running code, which may serve as evidence of valuable experimentation
and feedback that have made the implemented protocols more mature.
It is up to the individual working groups to use this information as
they see fit".
9.1. Implementation PoC 1
Organization: Ostfalia University of Applied Science
Implementor: Martin Langer
Maturity: Proof-of-Concept Prototype
This implementation was used to verify consistency and to ensure
completeness of this specification. It also demonstrate
interoperability with NTP's client-server mode messages.
9.1.1. Coverage
This implementation covers the complete specification.
9.1.2. Licensing
The code is released under a Apache License 2.0 license.
The source code is available at: https://gitlab.com/MLanger/nts/
9.1.3. Contact Information
Contact Martin Langer: mart.langer@ostfalia.de
9.1.4. Last Update
The implementation was updated 3rd May 2018.
9.2. Implementation PoC 2
Organization: tbd
Implementor: Daniel Fox Franke
Maturity: Proof-of-Concept Prototype
This implementation was used to verify consistency and to ensure
completeness of this specification.
9.2.1. Coverage
This implementation provides the client and the server for the
initial TLS handshake and NTS key exchange. It provides the the
client part of the NTS protected NTP messages.
9.2.2. Licensing
Public domain.
The source code is available at: https://github.com/dfoxfranke/nts-
hackathon
9.2.3. Contact Information
Contact Daniel Fox Franke: dfoxfranke@gmail.com
9.2.4. Last Update
The implementation was updated 16th March 2018.
9.3. Interoperability
The Interoperability tests distinguished between NTS key exchange and
NTS time exchange messages. For the NTS key exchange,
interoperability between the two implementations has been verified
successfully. Interoperability of NTS time exchange messages has
been verified successfully for the case that PoC 1 represents the
server and PoC 2 the client.
These tests successfully demonstrate that there are at least two
running implementations of this draft which are able to interoperate.
10. Security considerations
10.1. Avoiding DDoS amplification
Certain non-standard and/or deprecated features of the Network Time Certain non-standard and/or deprecated features of the Network Time
Protocol enable clients to send a request to a server which causes Protocol enable clients to send a request to a server which causes
the server to send a response much larger than the request. Servers the server to send a response much larger than the request. Servers
which enable these features can be abused in order to amplify traffic which enable these features can be abused in order to amplify traffic
volume in distributed denial-of-service (DDoS) attacks by sending volume in distributed denial-of-service (DDoS) attacks by sending
them a request with a spoofed source IP. In recent years, attacks of them a request with a spoofed source IP. In recent years, attacks of
this nature have become an endemic nuisance. this nature have become an endemic nuisance.
NTS is designed to avoid contributing any further to this problem by NTS is designed to avoid contributing any further to this problem by
ensuring that NTS-related extension fields included in server ensuring that NTS-related extension fields included in server
responses will be the same size as the NTS-related extension fields responses will be the same size as the NTS-related extension fields
sent by the client. In particular, this is why the client is sent by the client. In particular, this is why the client is
required to send a separate and appropriately padded-out NTS Cookie required to send a separate and appropriately padded-out NTS Cookie
Placeholder extension field for every cookie it wants to get back, Placeholder extension field for every cookie it wants to get back,
rather than being permitted simply to specify a desired quantity. rather than being permitted simply to specify a desired quantity.
9.2. Initial verification of server certificates Due to the [RFC7822] requirement that extensions be padded and
aligned to four-octet boundaries, response size may still in some
cases exceed request size by up to three octets. This is
sufficiently inconsequential that we have declined to address it.
10.2. Initial verification of server certificates
NTS's security goals are undermined if the client fails to verify NTS's security goals are undermined if the client fails to verify
that the X.509 certificate chain presented by the server is valid and that the X.509 certificate chain presented by the server is valid and
rooted in a trusted certificate authority. [RFC5280] and [RFC6125] rooted in a trusted certificate authority. [RFC5280] and [RFC6125]
specifies how such verification is to be performed in general. specify how such verification is to be performed in general.
However, the expectation that the client does not yet have a However, the expectation that the client does not yet have a
correctly-set system clock at the time of certificate verification correctly-set system clock at the time of certificate verification
presents difficulties with verifying that the certificate is within presents difficulties with verifying that the certificate is within
its validity period, i.e., that the current time lies between the its validity period, i.e., that the current time lies between the
times specified in the certificate's notBefore and notAfter fields, times specified in the certificate's notBefore and notAfter fields,
and it may be operationally necessary in some cases for a client to and it may be operationally necessary in some cases for a client to
accept a certificate which appears to be expired or not yet valid. accept a certificate which appears to be expired or not yet valid.
While there is no perfect solution to this problem, there are several While there is no perfect solution to this problem, there are several
mitigations the client can implement to make it more difficult for an mitigations the client can implement to make it more difficult for an
adversary to successfully present an expired certificate: adversary to successfully present an expired certificate:
skipping to change at page 24, line 34 skipping to change at page 27, line 30
them falls outside the validity period of the server's them falls outside the validity period of the server's
certificate. certificate.
Use multiple time sources. The ability to pass off an expired Use multiple time sources. The ability to pass off an expired
certificate is only useful to an adversary who has compromised the certificate is only useful to an adversary who has compromised the
corresponding private key. If the adversary has compromised only corresponding private key. If the adversary has compromised only
a minority of servers, NTP's selection algorithm ([RFC5905] a minority of servers, NTP's selection algorithm ([RFC5905]
section 11.2.1) will protect the client from accepting bad time section 11.2.1) will protect the client from accepting bad time
from the adversary-controlled servers. from the adversary-controlled servers.
9.3. Usage of NTP pools 10.3. Usage of NTP pools
Additional standardization work and infrastructure development is Additional standardization work and infrastructure development is
necessary before NTS can be used with public NTP server pools. necessary before NTS can be used with public NTP server pools.
First, a scheme will need to be specified for determining what First, a scheme will need to be specified for determining what
constitutes an acceptable certificate for a pool server, such as constitutes an acceptable certificate for a pool server, such as
establishing a value required to be contained in its Extended Key establishing a value required to be contained in its Extended Key
Usage attribute, and how to determine, given the DNS name of a pool, Usage attribute, and how to determine, given the DNS name of a pool,
what Subject Alternative Name to expect in the certificates of its what Subject Alternative Name to expect in the certificates of its
members. Implementing any such specification will necessitate members. Implementing any such specification will necessitate
infrastructure work: pool organizers will need to act as certificate infrastructure work: pool organizers will need to act as certificate
authorities, regularly monitor the behavior of servers to which authorities, regularly monitor the behavior of servers to which
certificates have been issued, and promptly revoke the certificate of certificates have been issued, and promptly revoke the certificate of
any server found to be serving incorrect time. any server found to be serving incorrect time.
9.4. Delay attacks 10.4. Delay attacks
In a packet delay attack, an adversary with the ability to act as a In a packet delay attack, an adversary with the ability to act as a
man-in-the-middle delays time synchronization packets between client man-in-the-middle delays time synchronization packets between client
and server asymmetrically [RFC7384]. Since NTP's formula for and server asymmetrically [RFC7384]. Since NTP's formula for
computing time offset relies on the assumption that network latency computing time offset relies on the assumption that network latency
is roughly symmetrical, this leads to the client to compute an is roughly symmetrical, this leads to the client to compute an
inaccurate value [Mizrahi]. The delay attack does not reorder or inaccurate value [Mizrahi]. The delay attack does not reorder or
modify the content of the exchanged synchronization packets. modify the content of the exchanged synchronization packets.
Therefore, cryptographic means do not provide a feasible way to Therefore, cryptographic means do not provide a feasible way to
mitigate this attack. However, the maximum error that an adversary mitigate this attack. However, the maximum error that an adversary
skipping to change at page 25, line 32 skipping to change at page 28, line 24
will tolerate before concluding that the server is unsuitable for will tolerate before concluding that the server is unsuitable for
synchronization. The standard value for MAXDIST is one second, synchronization. The standard value for MAXDIST is one second,
although some implementations use larger values. Whatever value a although some implementations use larger values. Whatever value a
client chooses, the maximum error which can be introduced by a delay client chooses, the maximum error which can be introduced by a delay
attack is MAXDIST/2. attack is MAXDIST/2.
Usage of multiple time sources, or multiple network paths to a given Usage of multiple time sources, or multiple network paths to a given
time source [Shpiner], may also serve to mitigate delay attacks if time source [Shpiner], may also serve to mitigate delay attacks if
the adversary is in control of only some of the paths. the adversary is in control of only some of the paths.
9.5. Random number generation 10.5. Random number generation
At various points in NTS, the generation of cryptographically secure At various points in NTS, the generation of cryptographically secure
random numbers is required. Whenever this draft specifies the use of random numbers is required. Whenever this draft specifies the use of
random numbers, then cryptographically secure random number random numbers, then cryptographically secure random number
generation MUST be used. See [RFC4086] for guidelines concerning generation MUST be used. See [RFC4086] for guidelines concerning
this topic. this topic.
10. Privacy Considerations 11. Privacy Considerations
10.1. Unlinkability 11.1. Unlinkability
Unlinkability prevents a device from being tracked when it changes Unlinkability prevents a device from being tracked when it changes
network addresses (e.g. because said device moved between different network addresses (e.g. because said device moved between different
networks). In other words, unlinkability thwarts an attacker that networks). In other words, unlinkability thwarts an attacker that
seeks to link a new network address used by a device with a network seeks to link a new network address used by a device with a network
address that it was formerly using, because of recognizable data that address that it was formerly using, because of recognizable data that
the device persistently sends as part of an NTS-secured NTP the device persistently sends as part of an NTS-secured NTP
association. This is the justification for continually supplying the association. This is the justification for continually supplying the
client with fresh cookies, so that a cookie never represents client with fresh cookies, so that a cookie never represents
recognizable data in the sense outlined above. recognizable data in the sense outlined above.
skipping to change at page 26, line 25 skipping to change at page 29, line 18
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 authentication data). externally triggered to send authentication data).
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
revealed by control queries. revealed by control queries.
10.2. Confidentiality 11.2. Confidentiality
NTS does not protect the confidentiality of information in NTP's NTS does not protect the confidentiality of information in NTP's
header fields. When clients implement header fields. When clients implement
[I-D.ietf-ntp-data-minimization], client packet headers do not [I-D.ietf-ntp-data-minimization], client packet headers do not
contain any information which the client could conceivably wish to contain any information which the client could conceivably wish to
keep secret: one field is random, and all others are fixed. keep secret: one field is random, and all others are fixed.
Information in server packet headers is likewise public: the origin Information in server packet headers is likewise public: the origin
timestamp is copied from the client's (random) transmit timestamp, timestamp is copied from the client's (random) transmit timestamp,
and all other fields are set the same regardless of the identity of and all other fields are set the same regardless of the identity of
the client making the request. the client making the request.
Future extension fields could hypothetically contain sensitive Future extension fields could hypothetically contain sensitive
information, in which case NTS provides a mechanism for encrypting information, in which case NTS provides a mechanism for encrypting
them. them.
11. Acknowledgements 12. Acknowledgements
The authors would like to thank Richard Barnes, Steven Bellovin, The authors would like to thank Richard Barnes, Steven Bellovin,
Scott Fluhrer, Sharon Goldberg, Russ Housley, Martin Langer, Miroslav Scott Fluhrer, Sharon Goldberg, Russ Housley, Martin Langer, Miroslav
Lichvar, Aanchal Malhotra, Dave Mills, Danny Mayer, Karen O'Donoghue, Lichvar, Aanchal Malhotra, Dave Mills, Danny Mayer, Karen O'Donoghue,
Eric K. Rescorla, Stephen Roettger, Kurt Roeckx, Kyle Rose, Rich Eric K. Rescorla, Stephen Roettger, Kurt Roeckx, Kyle Rose, Rich
Salz, Brian Sniffen, Susan Sons, Douglas Stebila, Harlan Stenn, Salz, Brian Sniffen, Susan Sons, Douglas Stebila, Harlan Stenn,
Martin Thomson, and Richard Welty for contributions to this document Martin Thomson, and Richard Welty for contributions to this document
and comments on the design of NTS. and comments on the design of NTS.
12. References 13. References
12.1. Normative References 13.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
[RFC5116] McGrew, D., "An Interface and Algorithms for Authenticated [RFC5116] McGrew, D., "An Interface and Algorithms for Authenticated
Encryption", RFC 5116, DOI 10.17487/RFC5116, January 2008, Encryption", RFC 5116, DOI 10.17487/RFC5116, January 2008,
<https://www.rfc-editor.org/info/rfc5116>. <https://www.rfc-editor.org/info/rfc5116>.
skipping to change at page 28, line 20 skipping to change at page 31, line 15
[RFC7627] Bhargavan, K., Ed., Delignat-Lavaud, A., Pironti, A., [RFC7627] Bhargavan, K., Ed., Delignat-Lavaud, A., Pironti, A.,
Langley, A., and M. Ray, "Transport Layer Security (TLS) Langley, A., and M. Ray, "Transport Layer Security (TLS)
Session Hash and Extended Master Secret Extension", Session Hash and Extended Master Secret Extension",
RFC 7627, DOI 10.17487/RFC7627, September 2015, RFC 7627, DOI 10.17487/RFC7627, September 2015,
<https://www.rfc-editor.org/info/rfc7627>. <https://www.rfc-editor.org/info/rfc7627>.
[RFC7822] Mizrahi, T. and D. Mayer, "Network Time Protocol Version 4 [RFC7822] Mizrahi, T. and D. Mayer, "Network Time Protocol Version 4
(NTPv4) Extension Fields", RFC 7822, DOI 10.17487/RFC7822, (NTPv4) Extension Fields", RFC 7822, DOI 10.17487/RFC7822,
March 2016, <https://www.rfc-editor.org/info/rfc7822>. March 2016, <https://www.rfc-editor.org/info/rfc7822>.
12.2. Informative References 13.2. Informative References
[I-D.ietf-ntp-data-minimization] [I-D.ietf-ntp-data-minimization]
Franke, D. and A. Malhotra, "NTP Client Data Franke, D. and A. Malhotra, "NTP Client Data
Minimization", draft-ietf-ntp-data-minimization-00 (work Minimization", draft-ietf-ntp-data-minimization-00 (work
in progress), May 2017. in progress), May 2017.
[Mizrahi] Mizrahi, T., "A game theoretic analysis of delay attacks [Mizrahi] Mizrahi, T., "A game theoretic analysis of delay attacks
against time synchronization protocols", in Proceedings against time synchronization protocols", in Proceedings
of Precision Clock Synchronization for Measurement Control of Precision Clock Synchronization for Measurement Control
and Communication, ISPCS 2012, pp. 1-6, September 2012. and Communication, ISPCS 2012, pp. 1-6, September 2012.
skipping to change at page 29, line 20 skipping to change at page 32, line 16
International Symposium on Precision Clock Synchronization International Symposium on Precision Clock Synchronization
for Measurement, Control and Communication (ISPCS), for Measurement, Control and Communication (ISPCS),
September 2013. 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]
DDoS Distributed Denial of Service DDoS Distributed Denial of Service
NTP Network Time Protocol [RFC5905] NTP Network Time Protocol [RFC5905]
NTS Network Time Security NTS Network Time Security
TLS Transport Layer Security TLS Transport Layer Security
Authors' Addresses Authors' Addresses
Daniel Fox Franke Daniel Fox Franke
Email: dfoxfranke@akamai.com Email: dfoxfranke@gmail.com
URI: https://www.dfranke.us URI: https://www.dfranke.us
Dieter Sibold Dieter Sibold
Physikalisch-Technische Bundesanstalt Physikalisch-Technische Bundesanstalt
Bundesallee 100 Bundesallee 100
Braunschweig D-38116 Braunschweig D-38116
Germany Germany
Phone: +49-(0)531-592-8420 Phone: +49-(0)531-592-8420
Fax: +49-531-592-698420 Fax: +49-531-592-698420
 End of changes. 66 change blocks. 
110 lines changed or deleted 255 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/