<?xmlversion="1.0" encoding="US-ASCII"?>version='1.0' encoding='utf-8'?> <!DOCTYPE rfc SYSTEM"rfc2629.dtd"> <?rfc toc="yes"?> <?rfc tocompact="yes"?> <?rfc tocdepth="3"?> <?rfc tocindent="yes"?> <?rfc symrefs="yes"?> <?rfc sortrefs="yes"?> <?rfc comments="yes"?> <?rfc inline="yes"?> <?rfc compact="yes"?> <?rfc subcompact="no"?>"rfc2629-xhtml.ent"> <rfc xmlns:xi="http://www.w3.org/2001/XInclude" submissionType="IETF" category="std" consensus="true" docName="draft-ietf-ntp-using-nts-for-ntp-28" number="8915" ipr="trust200902"submissionType="IETF">obsoletes="" updates="" xml:lang="en" tocInclude="true" tocDepth="3" symRefs="true" sortRefs="true" version="3"> <!-- xml2rfc v2v3 conversion 2.43.0 --> <front> <title abbrev="Network Time Security for NTP">Network Time Security for the Network Time Protocol</title> <seriesInfo name="RFC" value="8915"/> <author fullname="Daniel Fox Franke" initials="D." surname="Franke"> <organization abbrev="Akamai">Akamai Technologies</organization> <address> <postal> <street>145 Broadway</street> <city>Cambridge</city> <region>MA</region> <code>02142</code> <country>UnitedStates</country>States of America</country> </postal> <email>dafranke@akamai.com</email> </address> </author> <author fullname="Dieter Sibold" initials="D." surname="Sibold"> <organization abbrev="PTB">Physikalisch-Technische Bundesanstalt</organization> <address> <postal> <street>Bundesallee 100</street> <city>Braunschweig</city> <code>D-38116</code><region/><country>Germany</country> </postal><phone>+49-(0)531-592-8420</phone> <facsimile>+49-531-592-698420</facsimile><phone>+49-(0)531-592-8462</phone> <email>dieter.sibold@ptb.de</email> </address> </author> <author fullname="Kristof Teichel" initials="K." surname="Teichel"> <organization abbrev="PTB">Physikalisch-Technische Bundesanstalt</organization> <address> <postal> <street>Bundesallee 100</street> <city>Braunschweig</city><region/><code>D-38116</code> <country>Germany</country> </postal> <phone>+49-(0)531-592-4471</phone><facsimile/><email>kristof.teichel@ptb.de</email> <uri/> </address> </author> <author fullname="Marcus Dansarie" initials="M." surname="Dansarie"> <address> <postal><street /> <city /> <region /> <code /><country>Sweden</country> </postal> <email>marcus@dansarie.se</email> <uri>https://orcid.org/0000-0001-9246-0263</uri> </address> </author> <author fullname="Ragnar Sundblad" initials="R." surname="Sundblad"> <organization>Netnod</organization> <address> <postal><street /> <city /> <region /> <code /><country>Sweden</country> </postal> <email>ragge@netnod.se</email> </address> </author> <dateday="25" month="March"month="September" year="2020"/> <area>Internet Area</area> <workgroup>NTP Working Group</workgroup> <keyword>Integrity</keyword> <keyword>Authentication</keyword> <keyword>NTP</keyword> <keyword>Security</keyword> <abstract> <t> This memo specifies Network Time Security (NTS), a mechanism for using Transport Layer Security (TLS) and Authenticated Encryption with Associated Data (AEAD) to provide cryptographic security for the client-server mode of the Network Time Protocol (NTP). </t> <t> NTS is structured as a suite of two loosely coupled sub-protocols. The first(NTS-KE)(NTS Key Establishment (NTS-KE)) handles initial authentication and key establishment over TLS. The second (NTS Extension Fields for NTPv4) handles encryption and authentication during NTP time synchronization via extension fields in the NTP packets, and holds all required state only on the client via opaque cookies. </t> </abstract> </front> <middle> <sectiontitle="Introduction">numbered="true" toc="default"> <name>Introduction</name> <t> This memo specifies Network Time Security (NTS), a cryptographic security mechanism for network time synchronization. A complete specification is provided for application of NTS to the client-server mode of the <xreftarget="RFC5905">Networktarget="RFC5905" format="default">Network Time Protocol (NTP)</xref>. </t> <sectiontitle="Objectives">numbered="true" toc="default"> <name>Objectives</name> <t> The objectives of NTS are as follows:<list style="symbols"> <t></t> <ul spacing="normal"> <li> Identity: Through the use of a X.509 public key infrastructure, implementations can cryptographically establish the identity of the parties they are communicating with.</t> <t></li> <li> Authentication: Implementations can cryptographically verify that any time synchronization packets are authentic, i.e., that they were produced by an identified party and have not been modified in transit.</t> <t></li> <li> Confidentiality: Although basic time synchronization data is considerednon-confidentialnonconfidential and sent in the clear, NTS includes support for encrypting NTP extension fields.</t> <t></li> <li> Replay prevention: Client implementations can detect when a received time synchronization packet is a replay of a previous packet.</t> <t></li> <li> Request-response consistency: Client implementations can verify that a time synchronization packet received from a server was sent in response to a particular request from the client.</t> <t></li> <li> Unlinkability: For mobile clients, NTS will not leak any information additional to NTP which would permit a passive adversary to determine that two packets sent over different networks came from the same client.</t> <t></li> <li> Non-amplification: Implementations (especially server implementations) can avoid acting as distributed denial-of-service (DDoS) amplifiers by never responding to a request with a packet larger than the request packet.</t> <t></li> <li> Scalability: Server implementations can serve large numbers of clients without having to retain any client-specific state.</t> <t></li> <li> Performance: NTS must not significantly degrade the quality of the time transfer. The encryption and authentication used when actually transferring time should be lightweight (see<xref target="RFC7384">RFC 7384,Section5.7</xref>). </t> </list> </t><xref target="RFC7384" section="5.7" sectionFormat="bare" format="default"/> of <xref target="RFC7384" format="default">RFC 7384</xref>). </li> </ul> </section> <section numbered="true" toc="default"> <name>Terms and Abbreviations</name> <dl newline="false" spacing="normal" indent="11"> <dt>AEAD </dt> <dd> <xref target="RFC5116" format="default">Authenticated Encryption with Associated Data</xref></dd> <dt>ALPN </dt> <dd> <xref target="RFC7301" format="default">Application-Layer Protocol Negotiation</xref></dd> <dt>C2S </dt> <dd>Client-to-server</dd> <dt>DoS </dt> <dd>Denial-of-Service</dd> <dt>DDoS </dt> <dd>Distributed Denial-of-Service</dd> <dt>EF </dt> <dd> <xref target="RFC5905" format="default">Extension Field</xref></dd> <dt>HKDF </dt> <dd> <xref target="RFC5869" format="default">Hashed Message Authentication Code-based Key Derivation Function</xref></dd> <dt>KoD </dt> <dd> <xref target="RFC5905" format="default">Kiss-o'-Death</xref></dd> <dt>NTP </dt> <dd> <xref target="RFC5905" format="default">Network Time Protocol </xref></dd> <dt>NTS </dt> <dd>Network Time Security</dd> <dt>NTS NAK</dt> <dd>NTS negative-acknowledgment</dd> <dt>NTS-KE </dt> <dd>Network Time Security Key Establishment</dd> <dt>S2C </dt> <dd>Server-to-client</dd> <dt>TLS </dt> <dd> <xref target="RFC8446" format="default">Transport Layer Security</xref></dd> </dl> </section> <sectiontitle="Protocol Overview" anchor="sec-protocol-overview">anchor="sec-protocol-overview" numbered="true" toc="default"> <name>Protocol Overview</name> <t> The Network Time Protocol includes many different operating modes to support various network topologies (see<xref target="RFC5905">RFC 5905,Section3</xref>).<xref target="RFC5905" section="3" sectionFormat="bare" format="default"/> of <xref target="RFC5905" format="default">RFC 5905</xref>). In addition to its best-known and most-widely-used client-server mode, it also includes modes for synchronization between symmetric peers, a control mode for server monitoring and administration, and a broadcast mode. These various modes have differing and partly contradictory requirements for security and performance. Symmetric and control modes demand mutual authentication and mutual replay protection. Additionally, for certain messagetypestypes, the control mode may require confidentiality as well as authentication. Client-server mode places more stringent requirements on resource utilization than othermodes,modes because servers may have a vast number of clients and be unable to afford to maintain per-client state. However, client-server mode also has more relaxed securityneeds,needs because only the client requires replay protection: it is harmless for stateless servers to process replayed packets. The security demands of symmetric and control modes, on the other hand, are in conflict with the resource-utilization demands of client-server mode: any schemewhichthat provides replay protection inherently involves maintaining some state to keep track ofwhatwhich messages have already been seen. </t> <t> This memo specifies NTS exclusively for the client-server mode of NTP. To this end, NTS is structured as a suite of two protocols:<list> <t></t> <ul empty="true" spacing="normal"> <li> The "NTSExtensionsExtension Fields for NTPv4" define a collection of NTP extension fields for cryptographically securing NTPv4 usingpreviously-establishedpreviously established key material. They are suitable for securing client-server mode because the server can implement them without retaining per-client state. All state is kept by the client and provided to the server in the form of an encrypted cookie supplied with each request. On the other hand, the NTS Extension Fields are suitable*only*<em>only</em> for client-server mode because only the client, and not the server, is protected from replay.</t> <t></li> <li> The"NTS"NTS KeyEstablishment"Establishment" protocol (NTS-KE) is a mechanism for establishing key material for use with the NTS Extension Fields for NTPv4. It uses TLS to establish keys, to provide the client with an initial supply of cookies, and to negotiate some additional protocol options. After this, the TLS channel is closed with no per-client state remaining on the server side.</t> </list> </t></li> </ul> <t> 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 handshake. Via the TLS channel, the parties negotiate some additional protocolparametersparameters, and the server sends the client a supply of cookies along with an address and port of an NTP server for which the cookies are valid. The parties use <xreftarget="RFC5705">TLStarget="RFC5705" format="default">TLS key export</xref> to extract keymaterialmaterial, which will be used in the next phase of the protocol. This negotiation takes only a single round trip, after which the server closes the connection and discards all associated state. At thispointpoint, the NTS-KE phase of the protocol is complete. Ideally, the client never needs to connect to the NTS-KE server again. </t> <t> Time synchronization proceeds with the indicated NTP server. The client sends the server an NTP client packetwhichthat includes several extension fields. Included among these fields are a cookie (previously provided by the key establishment server) and an authentication tag, computed using key material extracted from the NTS-KE handshake. The NTP server uses the cookie to recover this key material and send back an authenticated response. The response includes a fresh, encrypted cookiewhichthat the client then sends back in the clear in a subsequent request.(ThisThis constant refreshing of cookies is necessary in order to achieve NTS's unlinkabilitygoal.)goal. </t> <t> <xreftarget="protocol-overview"/>target="protocol-overview" format="default"/> provides an overview of the high-level interaction between 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 NTP servers are not part of this specification and are implementation dependent. However, a suggested format for NTS cookies is provided in <xreftarget="suggested-format-for-nts-cookies"/>.target="suggested-format-for-nts-cookies" format="default"/>. </t> <figureanchor="protocol-overview" title="Overviewanchor="protocol-overview"> <name>Overview of High-Level Interactions inNTS"> <artwork><![CDATA[NTS</name> <artwork name="" type="" align="left" alt=""><![CDATA[ +--------------+ | | +-> | NTP Server 1 | | | | Shared cookie | +--------------+ +---------------+ encryption parameters | +--------------+ | | (Implementation dependent) | | | | NTS-KE Server | <------------------------------+-> | NTP Server 2 | | | | | | +---------------+ | +--------------+ ^ | . | | . | 1. Negotiate parameters, | . | receive initial cookie | +--------------+ | supply, generate AEAD keys, | | | | and receive NTP server IP +-> | NTP Server N | | addresses using "NTS Key | | | Establishment" protocol. +--------------+ | ^ | | | +----------+ | | | | | +-----------> | Client | <-------------------------+ | | 2. Perform authenticated +----------+ time synchronization and generate new cookies using "NTS Extension Fields forNTPv4".]]> </artwork>NTPv4". ]]></artwork> </figure> </section> </section> <sectiontitle="Requirements Language">numbered="true" toc="default"> <name>Requirements Language</name> <t> The key words"MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY","<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>", "<bcp14>MAY</bcp14>", and"OPTIONAL""<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as described in BCP 14 <xref target="RFC2119"/>format="default"/> <xref target="RFC8174"/>format="default"/> when, and only when, they appear in all capitals, as shown here. </t> </section> <sectiontitle="TLS profileanchor="tls-profile" numbered="true" toc="default"> <name>TLS Profile for Network TimeSecurity" anchor="tls-profile">Security</name> <t> Network Time Security makes use of TLS for NTS key establishment. </t> <t> Since the NTS protocol is new as of this publication, no backward-compatibility concerns exist to justify using obsolete, insecure, or otherwise broken TLS features or versions. ImplementationsMUST<bcp14>MUST</bcp14> conform with <xreftarget="RFC7525">RFCtarget="RFC7525" format="default">RFC 7525</xref> or with a later revision of BCP 195. </t> <t> ImplementationsMUST NOT<bcp14>MUST NOT</bcp14> negotiate TLS versions earlier than 1.3 <xreftarget="RFC8446"/>target="RFC8446" format="default"/> andMAY<bcp14>MAY</bcp14> refuse to negotiate any TLS versionwhichthat has been superseded by a later supported version. </t> <t> Use of the <xreftarget="RFC7301">Application-Layertarget="RFC7301" format="default">Application-Layer Protocol Negotiation Extension</xref> is integral toNTSNTS, and support for it isREQUIRED<bcp14>REQUIRED</bcp14> for interoperability. </t> <t> ImplementationsMUST<bcp14>MUST</bcp14> follow the rules in <xreftarget="RFC5280">target="RFC5280" format="default"> RFC 5280</xref> and <xreftarget="RFC6125">RFCtarget="RFC6125" format="default">RFC 6125</xref> for the representation and verification of the application's service identity. When NTS-KE service discovery (out of scope for this document) produces one or more host names, use of the <xreftarget="RFC6125">DNS-IDtarget="RFC6125" format="default">DNS-ID identifier type</xref> isRECOMMENDED;<bcp14>RECOMMENDED</bcp14>; specifications for service discovery mechanisms can provide additional guidance for certificate validation based on the results of discovery. <xref target="sec-cert-verification"/>format="default"/> of this memo discusses particular considerations for certificate verification in the context of NTS. </t> </section> <sectiontitle="Theanchor="nts-ke" numbered="true" toc="default"> <name>The NTS Key EstablishmentProtocol" anchor="nts-ke">Protocol</name> <t> The NTS key establishment protocol is conducted via TCP port[[TBD1]].4460. The two endpoints carry out a TLS handshake in conformance with <xreftarget="tls-profile"/>,target="tls-profile" format="default"/>, with the client offering (via an <xreftarget="RFC7301">ALPN</xref> extension),target="RFC7301" format="default">ALPN extension</xref>), and the server accepting, an application-layer protocol of"ntske/1"."ntske/1". Immediately following a successful handshake, the clientSHALL<bcp14>SHALL</bcp14> send a single request as Application Data encapsulated in the TLS-protected channel. Then, the serverSHALL<bcp14>SHALL</bcp14> send a single response. After sending their respective request and response, the client and serverSHALL<bcp14>SHALL</bcp14> send TLS"close_notify""close_notify" alerts in accordance with<xref target="RFC8446">RFC 8446,Section6.1</xref>.<xref target="RFC8446" section="6.1" sectionFormat="bare" format="default"/> of <xref target="RFC8446" format="default">RFC 8446</xref>. </t> <t> The client's request and the server's response eachSHALL<bcp14>SHALL</bcp14> consist of a sequence of records formatted according to <xreftarget="ntske-record"/>.target="ntske-record" format="default"/>. The request and a non-error response eachSHALL<bcp14>SHALL</bcp14> include exactly one NTS Next Protocol Negotiation record. The sequenceSHALL<bcp14>SHALL</bcp14> be terminated by a"End"End ofMessage"Message" record. The requirement that all NTS-KE messages be terminated by an End of Message record makes them self-delimiting. </t> <t> Clients and serversMAY<bcp14>MAY</bcp14> enforce length limits on requests andresponses,responses; however, serversMUST<bcp14>MUST</bcp14> accept requests of at least 1024octetsoctets, and clientsSHOULD<bcp14>SHOULD</bcp14> accept responses of at least 65536 octets. </t> <figureanchor="ntske-record" title="NTS-KEanchor="ntske-record"> <name>NTS-KE RecordFormat"> <artwork><![CDATA[Format</name> <artwork name="" type="" align="left" alt=""><![CDATA[ 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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . Record Body . . . | |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]> </artwork>+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ]]></artwork> </figure> <t> The fields of an NTS-KE record are defined as follows:<list> <t> C</t> <dl newline="false" spacing="normal"> <dt>C (CriticalBit): DeterminesBit):</dt> <dd>Determines the disposition of unrecognized Record Types. Implementations which receive a record with an unrecognized Record TypeMUST<bcp14>MUST</bcp14> ignore the record if the Critical Bit is 0 andMUST<bcp14>MUST</bcp14> treat it as an error if the Critical Bit is 1 (see <xreftarget="nts-error"/>). </t> <t> Recordtarget="nts-error" format="default"/>). </dd> <dt>Record TypeNumber: ANumber:</dt> <dd>A 15-bit integer in network byte order. The semantics ofrecord types 0–7Record Types 0-7 are specified in this memo. Additional type numbersSHALL<bcp14>SHALL</bcp14> be tracked through the IANANetwork"Network Time Security Key Establishment RecordTypesTypes" registry.</t> <t> Body Length: The</dd> <dt>Body Length:</dt> <dd>The length of the Record Body field, in octets, as a 16-bit integer in network byte order. Record bodiesMAY<bcp14>MAY</bcp14> have any representable length and need not be aligned to a word boundary.</t> <t> Record Body: The</dd> <dt>Record Body:</dt> <dd>The syntax and semantics of this fieldSHALL<bcp14>SHALL</bcp14> be determined by the Record Type.</t> </list> </t></dd> </dl> <t> For clarity regarding bit-endianness: the Critical Bit is themost-significantmost significant bit of the first octet. In the C programming language, given a network buffer`unsigned'unsigned charb[]`b[]' containing an NTS-KE record, the critical bit is`b[0]'b[0] >>7`7' while the record type is`((b[0]'((b[0] & 0x7f) << 8) +b[1]`.b[1]'. </t> <t> 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 length field differ. While the length subfield of an NTP extension field gives the length of the entire extension field including the type and length subfields, the length field of an NTS-KE record gives just the length of the body. </t> <t> <xreftarget="fig_NTSKeyEstablishment"/>target="fig_NTSKeyEstablishment" format="default"/> provides a schematic overview of the key establishment. It displays the protocol steps to be performed by the NTS client and server andrecord typesRecord Types to be exchanged. </t> <figureanchor="fig_NTSKeyEstablishment" title="NTSanchor="fig_NTSKeyEstablishment"> <name>NTS Key EstablishmentMessages"> <artwork><![CDATA[Messages</name> <artwork name="" type="" align="left" alt=""><![CDATA[ +---------------------------------------+ | - Verify client request message. | | - Extract TLS key material. | | - Generate KE response message. | | - Include Record Types: | | o NTS Next Protocol Negotiation | | o AEAD Algorithm Negotiation | | o <NTPv4 Server Negotiation> | | o <NTPv4 Port Negotiation> | | o New Cookie for NTPv4 | | o <New Cookie for NTPv4> | | o End of Message | +-----------------+---------------------+ | | Server -----------+---------------+-----+-----------------------> ^ \ / \ / TLS application \ / data \ / \ / V Client -----+---------------------------------+-----------------> | | | | | | +-----------+----------------------+ +------+-----------------+ |- Generate KE request message. | |- Verify server response| | - Include Record Types: | | message. | | o NTS Next Protocol Negotiation | |- Extract cookie(s). | | o AEAD Algorithm Negotiation | +------------------------+ | o <NTPv4 Server Negotiation> | | o <NTPv4 Port Negotiation> | | o End of Message |+----------------------------------+]]> </artwork>+----------------------------------+ ]]></artwork> </figure> <sectiontitle="NTS-KEnumbered="true" toc="default"> <name>NTS-KE RecordTypes">Types</name> <t>The following NTS-KE Record Types are defined:</t> <sectiontitle="Endanchor="end-of-message" numbered="true" toc="default"> <name>End ofMessage" anchor="end-of-message">Message</name> <t> The End of Message record has a Record Type number of 0 and a zero-length body. ItMUST<bcp14>MUST</bcp14> occur exactly once as the final record of every NTS-KE request and response. The Critical BitMUST<bcp14>MUST</bcp14> be set. </t> </section> <sectiontitle="NTSanchor="nts-next-protocol-negotiation" numbered="true" toc="default"> <name>NTS Next ProtocolNegotiation" anchor="nts-next-protocol-negotiation">Negotiation</name> <t> The NTS Next Protocol Negotiation record has a Record Type number of 1. ItMUST<bcp14>MUST</bcp14> occur exactly once in every NTS-KE request and response. Its body consists of a sequence of 16-bit unsigned integers in network byte order. Each integer represents a Protocol ID from the IANANetwork"Network Time Security NextProtocols registry.Protocols" registry (<xref target="iana-nts-next-protocols" format="default"/>). The Critical BitMUST<bcp14>MUST</bcp14> be set. </t> <t> The Protocol IDs listed in the client's NTS Next Protocol Negotiation record denote those protocolswhichthat the client wishes to speak using the key material established through this NTS-KE session. Protocol IDs listed in the NTS-KE server's responseMUST<bcp14>MUST</bcp14> comprise a subset of those listed in the request and denote those protocolswhichthat the NTP server is willing and able to speak using the key material established through this NTS-KE session. The clientMAY<bcp14>MAY</bcp14> proceed with one or more of them. The requestMUST<bcp14>MUST</bcp14> list at least one protocol, but the responseMAY<bcp14>MAY</bcp14> be empty. </t> </section> <sectiontitle="Error" anchor="nts-error">anchor="nts-error" numbered="true" toc="default"> <name>Error</name> <t> 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 byte order, denoting an error code. The Critical BitMUST<bcp14>MUST</bcp14> be set. </t> <t> ClientsMUST NOT<bcp14>MUST NOT</bcp14> include Error records in their request. If clients receive a server responsewhichthat includes an Error record, theyMUST<bcp14>MUST</bcp14> discard any key material negotiated during the initial TLS exchange andMUST NOT<bcp14>MUST NOT</bcp14> proceed to the Next Protocol. Requirements for retry intervals are described in <xref target="nts-ke-retry"/>.format="default"/>. </t> <t> The following error codes are defined:<list> <t></t> <ul empty="true" spacing="normal"> <li> Error code 0 means"Unrecognized"Unrecognized CriticalRecord".Record". The serverMUST<bcp14>MUST</bcp14> respond with this error code if the request included a recordwhichthat the server did not understand andwhichthat had its Critical Bit set. The clientSHOULD NOT<bcp14>SHOULD NOT</bcp14> retry its request without modification.</t> <t></li> <li> Error code 1 means"Bad Request"."Bad Request". The serverMUST<bcp14>MUST</bcp14> respond with this error if the request is not complete and syntactically well-formed, or, upon the expiration of an implementation-defined timeout, it has not yet received such a request. The clientSHOULD NOT<bcp14>SHOULD NOT</bcp14> retry its request without modification.</t> <t></li> <li> Error code 2 means"Internal"Internal ServerError".Error". The serverMUST<bcp14>MUST</bcp14> respond with this error if it is unable to respond properly due to an internal condition. The clientMAY<bcp14>MAY</bcp14> retry its request.</t> </list> </t></li> </ul> </section> <sectiontitle="Warning" anchor="nts-warning">anchor="nts-warning" numbered="true" toc="default"> <name>Warning</name> <t> 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 network byte order, denoting a warning code. The Critical BitMUST<bcp14>MUST</bcp14> be set. </t> <t> ClientsMUST NOT<bcp14>MUST NOT</bcp14> include Warning records in their request. If clients receive a server responsewhichthat includes a Warning record, theyMAY<bcp14>MAY</bcp14> discard any negotiated key material and abort without proceeding to the Next Protocol. Unrecognized warning codesMUST<bcp14>MUST</bcp14> be treated as errors. </t> <t> This memo defines no warning codes. </t> </section> <sectiontitle="AEADanchor="aead-algorithm-negotiation" numbered="true" toc="default"> <name>AEAD AlgorithmNegotiation" anchor="aead-algorithm-negotiation">Negotiation</name> <t> The AEAD Algorithm Negotiation record has a Record Type number of 4. Its body consists of a sequence of unsigned 16-bit integers in network byte order, denoting Numeric Identifiers from the IANA <xreftarget="IANA-AEAD">AEAD Algorithmstarget="IANA-AEAD" format="default">"AEAD Algorithms" registry</xref>. The Critical BitMAY<bcp14>MAY</bcp14> be set. </t> <t> If the NTS Next Protocol Negotiation record offers Protocol ID 0 (for NTPv4), then this recordMUST<bcp14>MUST</bcp14> be included exactly once. Other protocolsMAY<bcp14>MAY</bcp14> require it as well. </t> <t> When included in a request, this record denotes which AEAD algorithms the client is willing to use to secure the Next Protocol, in decreasing preference order. When included in a response, this record denotes which algorithm the server chooses to use. It is empty if the server supports none of the algorithms offered. In requests, the listMUST<bcp14>MUST</bcp14> include at least one algorithm. In responses, itMUST<bcp14>MUST</bcp14> include at most one. Honoring the client's preference order isOPTIONAL:<bcp14>OPTIONAL</bcp14>: servers may select among any of the client's offered choices, even if they are able to support some other algorithmwhichthat the client prefers more. </t> <t> Server implementations of <xreftarget="nts-extension-fields-for-ntpv4">NTS extension fieldstarget="nts-extension-fields-for-ntpv4" format="default">NTS Extension Fields for NTPv4</xref>MUST<bcp14>MUST</bcp14> support <xreftarget="RFC5297">AEAD_AES_SIV_CMAC_256</xref>target="RFC5297" format="default">AEAD_AES_SIV_CMAC_256</xref> (Numeric Identifier 15). That is, if the client includes AEAD_AES_SIV_CMAC_256 in its AEAD Algorithm Negotiationrecordrecord, and the server accepts Protocol ID 0 (NTPv4) in its NTS Next Protocol Negotiation record, then the server's AEAD Algorithm Negotiation recordMUST NOT<bcp14>MUST NOT</bcp14> be empty. </t> </section> <sectiontitle="Newanchor="new-cookie-for-ntpv4" numbered="true" toc="default"> <name>New Cookie forNTPv4" anchor="new-cookie-for-ntpv4">NTPv4</name> <t> The New Cookie for NTPv4 record has a Record Type number of 5. The contents of its bodySHALL<bcp14>SHALL</bcp14> beimplementation-definedimplementation-defined, and clientsMUST NOT<bcp14>MUST NOT</bcp14> attempt to interpret them. See <xreftarget="suggested-format-for-nts-cookies"/>target="suggested-format-for-nts-cookies" format="default"/> for a suggested construction. </t> <t> ClientsMUST NOT<bcp14>MUST NOT</bcp14> send records of this type. ServersMUST<bcp14>MUST</bcp14> send at least one record of this type, andSHOULD<bcp14>SHOULD</bcp14> send eight of them, if the Next Protocol Negotiation response record contains Protocol ID 0 (NTPv4) and the AEAD Algorithm Negotiation response record is not empty. The Critical BitSHOULD NOT<bcp14>SHOULD NOT</bcp14> be set. </t> </section> <sectiontitle="NTPv4anchor="ntp-server-negotiation" numbered="true" toc="default"> <name>NTPv4 ServerNegotiation" anchor="ntp-server-negotiation">Negotiation</name> <t> The NTPv4 Server Negotiation record has a Record Type number of 6. Its body consists of an <xreftarget="RFC0020">ASCII-encoded</xref>target="RFC0020" format="default">ASCII-encoded</xref> string. The contents of the stringSHALL<bcp14>SHALL</bcp14> be either an IPv4 address, an IPv6 address, or a fully qualified domain name (FQDN). IPv4 addressesMUST<bcp14>MUST</bcp14> be in dotted decimal notation. IPv6 addressesMUST<bcp14>MUST</bcp14> conform to the "Text Representation of Addresses" as specified in <xreftarget="RFC4291">RFCtarget="RFC4291" format="default">RFC 4291</xref> andMUST NOT<bcp14>MUST NOT</bcp14> include zone identifiers <xreftarget="RFC6874"/>.target="RFC6874" format="default"/>. If a label contains at least one non-ASCII character, it is an internationalized domainnamename, and an A-LABELMUST<bcp14>MUST</bcp14> be used as defined in Section2.3.2.1<xref target="RFC5890" section="2.3.2.1" sectionFormat="bare" format="default"/> of <xreftarget="RFC5890">RFCtarget="RFC5890" format="default">RFC 5890</xref>. If the record contains a domain name, the recipientMUST<bcp14>MUST</bcp14> treat it as a FQDN,e.g.e.g., by making sure it ends with a dot. </t> <t> When NTPv4 is negotiated as a Next Protocol and this record is sent by the server, the body specifies the hostname or IP address of the NTPv4 server with which the client should associate andwhichthat will accept the supplied cookies. If no record of this type is sent, the clientSHALL<bcp14>SHALL</bcp14> interpret this as a directive to associate with an NTPv4 server at the same IP address as the NTS-KE server. ServersMUST NOT<bcp14>MUST NOT</bcp14> send more than one record of this type. </t> <t> When this record is sent by the client, it indicates that the client wishes to associate with the specified NTP server. The NTS-KE serverMAY<bcp14>MAY</bcp14> incorporate this request when decidingwhatwhich NTPv4 Server Negotiation records to respond with, but honoring the client's preference isOPTIONAL.<bcp14>OPTIONAL</bcp14>. The clientMUST NOT<bcp14>MUST NOT</bcp14> send more than one record of this type. </t> <t> If the client has sent a record of this type, the NTS-KE serverSHOULD<bcp14>SHOULD</bcp14> reply with the same record if it is valid and the server is able to supply cookies for it. If the client has not sent any record of this type, the NTS-KE serverSHOULD<bcp14>SHOULD</bcp14> respond with either an NTP server address in the same family as the NTS-KE session or a FQDN that can be resolved to an address in that family, if such alternatives are available. </t> <t> ServersMAY<bcp14>MAY</bcp14> set the Critical Bit on records of this type; clientsSHOULD NOT.<bcp14>SHOULD NOT</bcp14>. </t> </section> <sectiontitle="NTPv4anchor="ntp-port-negotiation" numbered="true" toc="default"> <name>NTPv4 PortNegotiation" anchor="ntp-port-negotiation">Negotiation</name> <t> The NTPv4 Port Negotiation record has a Record Type number of 7. Its body consists of a 16-bit unsigned integer in network byte order, denoting a UDP port number. </t> <t> When NTPv4 is negotiated as a NextProtocolProtocol, and this record is sent by the server, the body specifies the port number of the NTPv4 server with which the client should associate andwhichthat will accept the supplied cookies. If no record of this type is sent, the clientSHALL<bcp14>SHALL</bcp14> assume a default of 123 (the registered port number for NTP). </t> <t> When this record is sent by the client in conjunction with a NTPv4 Server Negotiation record, it indicates that the client wishes to associate with the NTP server at the specified port. The NTS-KE serverMAY<bcp14>MAY</bcp14> incorporate this request when deciding what NTPv4 Server Negotiation and NTPv4 Port Negotiation records to respond with, but honoring the client's preference isOPTIONAL.<bcp14>OPTIONAL</bcp14>. </t> <t> ServersMAY<bcp14>MAY</bcp14> set the Critical Bit on records of this type; clientsSHOULD NOT.<bcp14>SHOULD NOT</bcp14>. </t> </section> </section> <sectiontitle="Retry Intervals" anchor="nts-ke-retry">anchor="nts-ke-retry" numbered="true" toc="default"> <name>Retry Intervals</name> <t> A mechanism for not unnecessarily overloading the NTS-KE server isREQUIRED<bcp14>REQUIRED</bcp14> 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. </t> <t> ClientsSHOULD<bcp14>SHOULD</bcp14> 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`,'t', for the nth retry is calculated with<list style="empty"> <t>the following: </t> <ul empty="true" spacing="normal"> <li> t = min(10 *1.5^(n-1),1.5<sup>n-1</sup>, 432000).</t> </list> </t></li> </ul> <t> ClientsMUST NOT<bcp14>MUST NOT</bcp14> reset the retry interval until they have performed a successful key establishment with the NTS-KE server, followed by a successful use of the negotiatednext protocolNext Protocol with the keys and data established during that transaction. </t> </section> <sectiontitle="Keyanchor="key-extraction" numbered="true" toc="default"> <name>Key Extraction(generally)" anchor="key-extraction">(Generally)</name> <t> Following a successful run of the NTS-KE protocol, key materialSHALL<bcp14>SHALL</bcp14> be extracted using <xreftarget="RFC5869">thetarget="RFC5869" format="default">the HMAC-based Extract-and-Expand Key Derivation Function (HKDF)</xref> in accordance with<xref target="RFC8446">RFC 8446,Section7.5</xref>.<xref target="RFC8446" section="7.5" sectionFormat="bare" format="default"/> of <xref target="RFC8446" format="default">RFC 8446</xref>. Inputs to the exporter function are to be constructed in a manner specific to the negotiated Next Protocol. However, all protocolswhichthat utilize NTS-KEMUST<bcp14>MUST</bcp14> conform to the following two rules:<list> <t></t> <ul empty="true" spacing="normal"> <li> The <xreftarget="RFC5705">disambiguatingtarget="RFC5705" format="default">disambiguating label string</xref>MUST<bcp14>MUST</bcp14> be"EXPORTER-network-time-security". </t> <t>"EXPORTER-network-time-security". </li> <li> The <xreftarget="RFC5705">per-associationtarget="RFC5705" format="default">per-association context value</xref>MUST<bcp14>MUST</bcp14> be provided andMUST<bcp14>MUST</bcp14> begin with the two-octet Protocol IDwhichthat was negotiated as a Next Protocol.</t> </list> </t></li> </ul> </section> </section> <sectiontitle="NTSanchor="nts-extension-fields-for-ntpv4" numbered="true" toc="default"> <name>NTS Extension Fields forNTPv4" anchor="nts-extension-fields-for-ntpv4">NTPv4</name> <sectiontitle="Keynumbered="true" toc="default"> <name>Key Extraction (forNTPv4)">NTPv4)</name> <t> Following a successful run of the NTS-KE protocol wherein Protocol ID 0 (NTPv4) is selected as a Next Protocol, two AEAD keysSHALL<bcp14>SHALL</bcp14> be extracted: a client-to-server (C2S) key and a server-to-client (S2C) key. These keysSHALL<bcp14>SHALL</bcp14> be computed with the HKDF defined in<xref target="RFC8446">RFC 8446,Section7.5</xref><xref target="RFC8446" section="7.5" sectionFormat="bare" format="default"/> of <xref target="RFC8446" format="default">RFC 8446</xref> using the followinginputs. <list> <t>inputs: </t> <ul empty="true" spacing="normal"> <li> The <xreftarget="RFC5705">disambiguatingtarget="RFC5705" format="default">disambiguating label string</xref>SHALL<bcp14>SHALL</bcp14> be"EXPORTER-network-time-security". </t>"EXPORTER-network-time-security". </li> <li> <t> The <xreftarget="RFC5705">per-associationtarget="RFC5705" format="default">per-association context value</xref>SHALL<bcp14>SHALL</bcp14> consist of the following five octets:<list> <t></t> <ul spacing="normal"> <li> The first two octetsSHALL<bcp14>SHALL</bcp14> be zero (the Protocol ID for NTPv4).</t> <t></li> <li> The next two octetsSHALL<bcp14>SHALL</bcp14> be the Numeric Identifier of the negotiated AEADAlgorithmalgorithm in network byte order.</t> <t></li> <li> The final octetSHALL<bcp14>SHALL</bcp14> be 0x00 for the C2S key and 0x01 for the S2C key.</t> </list> </t> </list></li> </ul> </li> </ul> <t> Implementations wishing to derive additional keys for private or experimental useMUST NOT<bcp14>MUST NOT</bcp14> do so by extending the above-specified syntax for per-association context values. Instead, theySHOULD<bcp14>SHOULD</bcp14> use their own disambiguating label string. Note that <xreftarget="RFC5705">RFCtarget="RFC5705" format="default">RFC 5705</xref> provides that disambiguating label strings beginning with"EXPERIMENTAL" MAY"EXPERIMENTAL" <bcp14>MAY</bcp14> be used without IANA registration. </t> </section> <sectiontitle="Packetnumbered="true" toc="default"> <name>Packet StructureOverview">Overview</name> <t> In general, an NTS-protected NTPv4 packet consistsof: <list> <t>of the following: </t> <ul empty="true" spacing="normal"> <li> The usual 48-octet NTPheaderheader, which is authenticated but not encrypted.</t> <t></li> <li> Some extensionfieldsfields, which are authenticated but not encrypted.</t> <t></li> <li> An extension fieldwhichthat contains AEAD output (i.e., an authentication tag and possible ciphertext). The corresponding plaintext, if non-empty, consists of some extension fieldswhichthat benefit from both encryption and authentication.</t> <t></li> <li> Possibly, some additional extension fieldswhichthat are neither encrypted nor authenticated. In general, these are discarded by the receiver.</t> </list> </t></li> </ul> <t> Always included among the authenticated or authenticated-and-encrypted extension fields are a cookie extension field and a unique identifier extension field, as described inSection 5.7.<xref target="protocol-details" format="default"/>. The purpose of the cookie extension field is to enable the server to offload storage of session state onto the client. The purpose of the unique identifier extension field is to protect the client from replay attacks. </t> </section> <sectiontitle="Theanchor="unique-identifier-extension-field" numbered="true" toc="default"> <name>The Unique Identifier ExtensionField" anchor="unique-identifier-extension-field">Field</name> <t> The Unique Identifier extension field provides the client with a cryptographically strong means of detecting replayed packets. It has a Field Type of[[TBD2]].0x0104. When the extension field is included in a client packet (mode 3), its bodySHALL<bcp14>SHALL</bcp14> consist of a string of octets generated by a <xreftarget="RFC4086">cryptographicallytarget="RFC4086" format="default">cryptographically secure random number generator</xref>. The stringMUST<bcp14>MUST</bcp14> be at least 32 octets long. When the extension field is included in a server packet (mode 4), its bodySHALL<bcp14>SHALL</bcp14> contain the same octet string as was provided in the client packet to which the server is responding. All server packets generated by NTS-implementing servers in response to client packets containing this extension fieldMUST<bcp14>MUST</bcp14> also contain this field with the same content as in the client's request. The field's use in modes other than client-server is not defined. </t> <t> This extension fieldMAY<bcp14>MAY</bcp14> also be used standalone, without NTS, in which case it provides the client with a means of detecting spoofed packets from off-path attackers. Historically, NTP's origin timestamp field has played both these roles, butfor cryptographic purposesthis is suboptimal for cryptographic purposes because it is only 64 bitslong and,long, and depending on implementation details, most of those bits may be predictable. In contrast, the Unique Identifier extension field enables a degree of unpredictability and collision resistance more consistent with cryptographic best practice. </t> </section> <sectiontitle="Theanchor="nts-cookie-extension-field" numbered="true" toc="default"> <name>The NTS Cookie ExtensionField" anchor="nts-cookie-extension-field">Field</name> <t> The NTS Cookie extension field has a Field Type of[[TBD3]].0x0204. Its purpose is to carry informationwhichthat enables the server to recompute keys and other session state without having to store any per-client state. The contents of its bodySHALL<bcp14>SHALL</bcp14> beimplementation-definedimplementation-defined, and clientsMUST NOT<bcp14>MUST NOT</bcp14> attempt to interpret them. See <xreftarget="suggested-format-for-nts-cookies"/>target="suggested-format-for-nts-cookies" format="default"/> for a suggested construction. The NTS Cookie extension fieldMUST NOT<bcp14>MUST NOT</bcp14> be included in NTP packets whose mode is other than 3 (client) or 4 (server). </t> </section> <sectiontitle="Theanchor="nts-cookie-placeholder-extension-field" numbered="true" toc="default"> <name>The NTS Cookie Placeholder ExtensionField" anchor="nts-cookie-placeholder-extension-field">Field</name> <t> The NTS Cookie Placeholder extension field has a Field Type of[[TBD4]].0x0304. When this extension field is included in a client packet (mode 3), it communicates to the server that the client wishes it to send additional cookies in its response. This extension fieldMUST NOT<bcp14>MUST NOT</bcp14> be included in NTP packets whose mode is other than 3. </t> <t> Whenever an NTS Cookie Placeholder extension field is present, itMUST<bcp14>MUST</bcp14> be accompanied by an NTS Cookie extension field. The body length of the NTS Cookie Placeholder extension fieldMUST<bcp14>MUST</bcp14> be the same as the body length of the NTS Cookie extension field. This length requirement serves to ensure that the response will not be larger than the request, in order to improve timekeeping precision and prevent DDoS amplification. The contents of the NTS Cookie Placeholder extension field's bodySHOULD<bcp14>SHOULD</bcp14> be all zeros and, aside from checking its length,MUST<bcp14>MUST</bcp14> be ignored by the server. </t> </section> <sectiontitle="Theanchor="nts-aeef-extension-field" numbered="true" toc="default"> <name>The NTS Authenticator and Encrypted Extension Fields ExtensionField" anchor="nts-aeef-extension-field">Field</name> <t> The NTS Authenticator and Encrypted Extension Fields extension field is the central cryptographic element of an NTS-protected NTP packet. Its Field Type is[[TBD5]].0x0404. ItSHALL<bcp14>SHALL</bcp14> be formatted according to <xreftarget="fig-aeef-field"/>target="fig-aeef-field" format="default"/> and include the following fields:<list> <t> Nonce Length: Two</t> <dl newline="false" spacing="normal"> <dt>Nonce Length:</dt> <dd>Two octets in network byte order, giving the length of the Nonce field, excluding any padding, interpreted as an unsigned integer.</t> <t> Ciphertext Length: Two</dd> <dt>Ciphertext Length:</dt> <dd>Two octets in network byte order, giving the length of the Ciphertext field, excluding any padding, interpreted as an unsigned integer.</t> <t> Nonce: A</dd> <dt>Nonce:</dt> <dd>A nonce as required by the negotiated AEADAlgorithm.algorithm. The end of the field is zero-padded to a word (four octets) boundary.</t> <t> Ciphertext: The</dd> <dt>Ciphertext:</dt> <dd>The output of the negotiated AEADAlgorithm.algorithm. The structure of this field is determined by the negotiated algorithm, but it typically contains an authentication tag in addition to the actual ciphertext. The end of the field is zero-padded to a word (four octets) boundary.</t> <t> Additional Padding: Clients which</dd> <dt>Additional Padding:</dt> <dd>Clients that use a nonce length shorter than the maximum allowed by the negotiated AEAD algorithm may be required to include additional zero-padding. The necessary length of this field is specified below.</t> </list> </t></dd> </dl> <figureanchor="fig-aeef-field" title="NTSanchor="fig-aeef-field"> <name>NTS Authenticator and Encrypted Extension Fields Extension FieldFormat"> <artwork><![CDATA[Format</name> <artwork name="" type="" align="left" alt=""><![CDATA[ 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Nonce Length | Ciphertext Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . Nonce, including up to 3 octets padding . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . Ciphertext, including up to 3 octets padding . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . Additional Padding . . . | |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]> </artwork>+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ]]></artwork> </figure> <t> The Ciphertext fieldSHALL<bcp14>SHALL</bcp14> be formed by providing the following inputs to the negotiated AEADAlgorithm: <list> <t> K: Foralgorithm: </t> <dl newline="false" spacing="normal" indent="4"> <dt>K:</dt> <dd>For packets sent from the client to the server, the C2S keySHALL<bcp14>SHALL</bcp14> be used. For packets sent from the server to the client, the S2C keySHALL<bcp14>SHALL</bcp14> be used.</t> <t> A: The</dd> <dt>A:</dt> <dd>The associated dataSHALL<bcp14>SHALL</bcp14> consist of the portion of the NTP packet beginning from the start of the NTP header and ending at the end of the last extension fieldwhichthat precedes the NTS Authenticator and Encrypted Extension Fields extension field.</t> <t> P: The</dd> <dt>P:</dt> <dd>The plaintextSHALL<bcp14>SHALL</bcp14> consist of all (if any) NTP extension fields to be encrypted; if multiple extension fields arepresentpresent, theySHALL<bcp14>SHALL</bcp14> be joined by concatenation. Each such fieldSHALL<bcp14>SHALL</bcp14> be formatted in accordance withRFC 7822 [RFC7822],<xref target="RFC7822" format="default">RFC 7822</xref>, except that, contrary to the RFC 7822 requirement that fields have a minimum length of 16 or 28 octets, encrypted extension fieldsMAY<bcp14>MAY</bcp14> be arbitrarily short (but stillMUST<bcp14>MUST</bcp14> be a multiple of 4 octets in length).</t> <t> N: The</dd> <dt>N:</dt> <dd>The nonceSHALL<bcp14>SHALL</bcp14> be formed however required by the negotiated AEAD algorithm.</t> </list> </t></dd> </dl> <t> The purpose of the Additional Padding field is to ensure that servers can always choose a nonce whose length is adequate to ensure its uniqueness, even if the client chooses a shorter one, and still ensure that the overall length of the server's response packet does not exceed the length of the request. For mode 4 (server) packets, no Additional Padding field is ever required. For mode 3 (client) packets, the length of the Additional Padding fieldSHALL<bcp14>SHALL</bcp14> be computed as follows. Let`N_LEN`'N_LEN' be the padded length of the Nonce field. Let`N_MAX`'N_MAX' be, as specified by <xreftarget="RFC5116">RFCtarget="RFC5116" format="default">RFC 5116</xref>, the maximum permitted nonce length for the negotiated AEAD algorithm. Let`N_REQ`'N_REQ' be the lesser of 16 and N_MAX, rounded up to the nearest multiple of 4. If N_LEN is greater than or equal to N_REQ, then no Additional Padding field is required. Otherwise, the Additional Padding fieldSHALL<bcp14>SHALL</bcp14> be at least N_REQ - N_LEN octets in length. ServersMUST<bcp14>MUST</bcp14> enforce this requirement by discarding any packetwhichthat does not conform to it. </t> <t> Senders are always free to include more Additional Padding than mandated by the above paragraph. Theoretically, it could be necessary to do so in order to bring the extension field to the minimum length required by <xreftarget="RFC7822">RFCtarget="RFC7822" format="default">RFC 7822</xref>. This should never happen in practice because any reasonable AEAD algorithm will have a nonce and an authenticator long enough to bring the extension field to its required length already. Nonetheless, implementers are advised to explicitly handle this case and ensure that the extension field they emit is of legal length. </t> <t> The NTS Authenticator and Encrypted Extension Fields extension fieldMUST NOT<bcp14>MUST NOT</bcp14> be included in NTP packets whose mode is other than 3 (client) or 4 (server). </t> </section> <sectiontitle="Protocol Details" anchor="protocol-details">anchor="protocol-details" numbered="true" toc="default"> <name>Protocol Details</name> <t> A client sending an NTS-protected requestSHALL<bcp14>SHALL</bcp14> include the following extension fields as displayed in <xreftarget="fig_NTSTimeSyncMessage"/>: <list> <t>target="fig_NTSTimeSyncMessage" format="default"/>: </t> <ul empty="true" spacing="normal"> <li> Exactly one Unique Identifier extension fieldwhich MUSTthat <bcp14>MUST</bcp14> be authenticated,MUST NOT<bcp14>MUST NOT</bcp14> be encrypted, and whose contentsMUST<bcp14>MUST</bcp14> be the output of acryptographically<xref target="RFC4086" format="default">cryptographically secure random numbergenerator. <xref target="RFC4086"/> </t> <t>generator </xref>. </li> <li> Exactly one NTS Cookie extension fieldwhich MUSTthat <bcp14>MUST</bcp14> be authenticated andMUST NOT<bcp14>MUST NOT</bcp14> be encrypted. The cookieMUST<bcp14>MUST</bcp14> be one which has been previously provided to the client, either from the key establishment server during the NTS-KE handshake or from the NTP server in response to a previous NTS-protected NTP request.</t> <t></li> <li> Exactly one NTS Authenticator and Encrypted Extension Fields extension field, generated using an AEADAlgorithmalgorithm and C2S key established through NTS-KE.</t> </list> </t></li> </ul> <t> To protect the client's privacy, the clientSHOULD<bcp14>SHOULD</bcp14> avoid reusing a cookie. If the client does not have any cookies that it has not already sent, itSHOULD<bcp14>SHOULD</bcp14> initiate are-runrerun of the NTS-KE protocol. The clientMAY<bcp14>MAY</bcp14> reuse cookies in order to prioritize resilience over unlinkability. Which of the two that should be prioritized in any particular case is dependent on the application and the user's preference. <xreftarget="Unlinkability"/>target="Unlinkability" format="default"/> describes the privacy considerations of this in further detail. </t> <t> The clientMAY<bcp14>MAY</bcp14> include one or more NTS Cookie Placeholder extension fieldswhich MUSTthat <bcp14>MUST</bcp14> be authenticated andMAY<bcp14>MAY</bcp14> be encrypted. The number of NTS Cookie Placeholder extension fields that the client includesSHOULD<bcp14>SHOULD</bcp14> be such that if the client includes N placeholders and the server sends back N+1 cookies, the number of unused cookies stored by the client will come to eight. The clientSHOULD NOT<bcp14>SHOULD NOT</bcp14> include more than seven NTS Cookie Placeholder extension fields in a request. When both the client and server adhere to all cookie-management guidance provided in this memo, the number of placeholder extension fields will equal the number of dropped packets since the last successful volley. </t> <t> In rare circumstances, it may be necessary to include fewer NTS Cookie Placeholder extensions than recommended above in order to prevent datagram fragmentation. When cookies adhere to the format recommended in <xreftarget="suggested-format-for-nts-cookies"/>target="suggested-format-for-nts-cookies" format="default"/> and the AEAD in use is the mandatory-to-implement AEAD_AES_SIV_CMAC_256, senders can include a cookie and seven placeholders and still have packet size fall comfortably below 1280 octets if no non-NTS-related extensions are used; 1280 octets is the minimum prescribed MTU for IPv6 and is generally safe for avoiding IPv4 fragmentation. Nonetheless, sendersSHOULD<bcp14>SHOULD</bcp14> include fewer cookies and placeholders than otherwise indicated if doing so is necessary to prevent fragmentation. </t> <figureanchor="fig_NTSTimeSyncMessage" title="NTS-protectedanchor="fig_NTSTimeSyncMessage"> <name>NTS-Protected NTP Time SynchronizationMessages"> <artwork><![CDATA[Messages</name> <artwork name="" type="" align="left" alt=""><![CDATA[ +---------------------------------------+ | - Verify time requestmessagemessage. | | - Generate time responsemessagemessage. | | - Included NTPv4 extensionfieldsfields: | | o Unique Identifier EF | | o NTS Authentication and | | Encrypted Extension Fields EF | | - NTS Cookie EF | | - <NTS Cookie EF> | | - Transmit time requestpacketpacket. | +-----------------+---------------------+ | | Server -----------+---------------+-----+-----------------------> ^ \ / \ Time request / \ Time response (mode 3) / \ (mode 4) / \ / V Client -----+---------------------------------+-----------------> | | | | | |+-----------+----------------------+ +------+-----------------++-----------+-----------------------+ +-----+------------------+ |- Generate time requestmessagemessage. | |- Verify time response | | - Include NTPv4 Extensionfieldsfields: | |messagemessage. | | o Unique Identifier EF | |- Extractcookie(s)cookie(s). | | o NTS Cookie EF | |- Time synchronization | | o <NTS Cookie Placeholder EF> | |processingprocessing. | | | +------------------------+ |- Generate AEAD tag of NTPmessage|message.| |- Add NTS Authentication and | | Encrypted Extension FieldsEFEF. | |- Transmit time requestpacketpacket. |+----------------------------------+]]> </artwork>+-----------------------------------+ ]]></artwork> </figure> <t> The clientMAY<bcp14>MAY</bcp14> include additional (non-NTS-related) extension fieldswhich MAYthat <bcp14>MAY</bcp14> appear prior to the NTS Authenticator and Encrypted Extension Fields extension fields (therefore authenticated but not encrypted), within it (therefore encrypted and authenticated), or after it (therefore neither encrypted nor authenticated). The serverMUST<bcp14>MUST</bcp14> discard any unauthenticated extension fields. Future specifications of extension fieldsMAY<bcp14>MAY</bcp14> provide exceptions to this rule. </t> <t> Upon receiving an NTS-protected request, the serverSHALL<bcp14>SHALL</bcp14> (through some implementation-defined mechanism) use the cookie to recover the AEADAlgorithm,algorithm, C2S key, and S2C key associated with the request, and then use the C2S key to authenticate the packet and decrypt the ciphertext. If the cookie is valid and authentication and decryption succeed, the serverSHALL<bcp14>SHALL</bcp14> include the following extension fields in its response:<list> <t></t> <ul empty="true" spacing="normal"> <li> Exactly one Unique Identifier extension fieldwhich MUSTthat <bcp14>MUST</bcp14> be authenticated,MUST NOT<bcp14>MUST NOT</bcp14> be encrypted, and whose contentsSHALL<bcp14>SHALL</bcp14> echo those provided by the client.</t> <t></li> <li> Exactly one NTS Authenticator and Encrypted Extension Fields extension field, generated using the AEAD algorithm and S2C key recovered from the cookie provided by the client.</t> <t></li> <li> One or more NTS Cookie extension fieldswhich MUSTthat <bcp14>MUST</bcp14> be authenticated and encrypted. The number of NTS Cookie extension fields includedSHOULD<bcp14>SHOULD</bcp14> be equal to, andMUST NOT<bcp14>MUST NOT</bcp14> exceed, one plus the number of valid NTS Cookie Placeholder extension fields included in the request. The cookies returned in those fieldsMUST<bcp14>MUST</bcp14> be valid for use with the NTP server that sent them. TheyMAY<bcp14>MAY</bcp14> be valid for other NTP servers as well, but there is no way for the server to indicate this.</t> </list> </t></li> </ul> <t> We emphasize the contrast that NTS Cookie extension fieldsMUST NOT<bcp14>MUST NOT</bcp14> be encrypted when sent from client toserver,server butMUST<bcp14>MUST</bcp14> be encrypted when 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 <xreftarget="Unlinkability"/>.target="Unlinkability" format="default"/>. We emphasize also that"encrypted""encrypted" means encapsulated within the NTS Authenticator and Encrypted Extensions extension field. While the body of an NTS Cookie extension field will generally consist of some sort of AEAD output (regardless of whether the recommendations of <xreftarget="suggested-format-for-nts-cookies"/>target="suggested-format-for-nts-cookies" format="default"/> are precisely followed), this is not sufficient to make the extension field"encrypted"."encrypted". </t> <t> The serverMAY<bcp14>MAY</bcp14> include additional (non-NTS-related) extension fieldswhich MAYthat <bcp14>MAY</bcp14> appear prior to the NTS Authenticator and Encrypted Extension Fields extension field (therefore authenticated but not encrypted), within it (therefore encrypted and authenticated), or after it (therefore neither encrypted nor authenticated). The clientMUST<bcp14>MUST</bcp14> discard any unauthenticated extension fields. Future specifications of extension fieldsMAY<bcp14>MAY</bcp14> provide exceptions to this rule. </t> <t> Upon receiving an NTS-protected response, the clientMUST<bcp14>MUST</bcp14> verify that the Unique Identifier matches that of an outstanding request, and that the packet is authentic under the S2C key associated with that request. If either of these checks fails, the packetMUST<bcp14>MUST</bcp14> be discarded without further processing. In particular, the clientMUST<bcp14>MUST</bcp14> discard unprotected responses to NTS-protected requests. </t> <t> If the server is unable to validate the cookie or authenticate the request, itSHOULD<bcp14>SHOULD</bcp14> respond with a Kiss-o'-Death (KoD) packet (see<xref target="RFC5905">RFC 5905,Section7.4</xref>)<xref target="RFC5905" section="7.4" sectionFormat="bare" format="default"/> of <xref target="RFC5905" format="default">RFC 5905</xref>) with kiss code"NTSN","NTSN", meaning"NTS NAK""NTS NAK" (NTS negative-acknowledgment). ItMUST NOT<bcp14>MUST NOT</bcp14> include any NTS Cookie or NTS Authenticator and Encrypted Extension Fields extension fields. </t> <t> If the NTP server has previously responded with authentic NTS-protected NTP packets, the clientMUST<bcp14>MUST</bcp14> verify that any KoD packets received from the server contain the Unique Identifier extension field and that the Unique Identifier matches that of an outstanding request. If this check fails, the packetMUST<bcp14>MUST</bcp14> be discarded without further processing. If this check passes, the clientMUST<bcp14>MUST</bcp14> comply with<xref target="RFC5905">RFC 5905,Section7.4</xref><xref target="RFC5905" section="7.4" sectionFormat="bare" format="default"/> of <xref target="RFC5905" format="default">RFC 5905</xref> where required. </t> <t> A clientMAY<bcp14>MAY</bcp14> automaticallyre-runrerun the NTS-KE protocol upon forced disassociation from an NTP server. In that case, itMUST<bcp14>MUST</bcp14> avoid quickly looping between the NTS-KE and NTP servers by rate limiting the retries. Requirements for retry intervals in NTS-KE are described in <xref target="nts-ke-retry"/>.format="default"/>. </t> <t> Upon reception of the NTS NAK kiss code, the clientSHOULD<bcp14>SHOULD</bcp14> wait until the next poll for a valid NTS-protectedresponseresponse, and if none is received, initiate a fresh NTS-KE handshake to try to renegotiate new cookies, AEAD keys, and parameters. If the NTS-KE handshake succeeds, the clientMUST<bcp14>MUST</bcp14> discard all old cookies and parameters and use the new ones instead. As long as the NTS-KE handshake has not succeeded, the clientSHOULD<bcp14>SHOULD</bcp14> continue polling the NTP server using the cookies and parameters it has. </t> <t> To allow for NTP session restart when the NTS-KE server is unavailable and to reduce NTS-KE server load, the clientSHOULD<bcp14>SHOULD</bcp14> keep at least one unused but recent cookie, AEAD keys, negotiated AEAD algorithm, and other necessary parametersonin persistent storage. This way, the client is able to resume the NTP session without performing renewed NTS-KE negotiation. </t> </section> </section> <sectiontitle="Suggestedanchor="suggested-format-for-nts-cookies" numbered="true" toc="default"> <name>Suggested Format for NTSCookies" anchor="suggested-format-for-nts-cookies">Cookies</name> <t> This section is non-normative. It gives a suggested way for servers to construct NTS cookies. All normative requirements are stated in <xreftarget="new-cookie-for-ntpv4"/>target="new-cookie-for-ntpv4" format="default"/> and <xreftarget="nts-cookie-extension-field"/>.target="nts-cookie-extension-field" format="default"/>. </t> <t> The role of cookies in NTS is closely analogous to that of sessioncookiestickets in TLS. Accordingly, the thematic resemblance of this section to <xreftarget="RFC5077">RFCtarget="RFC5077" format="default">RFC 5077</xref> isdeliberatedeliberate, and the reader should likewise take heed of its security considerations. </t> <t> Servers should select an AEAD algorithmwhichthat they will use to encrypt and authenticate cookies. The chosen algorithm should be one such as <xreftarget="RFC5297">AEAD_AES_SIV_CMAC_256</xref>target="RFC5297" format="default">AEAD_AES_SIV_CMAC_256</xref>, which resists accidental nonce reuse. It need not be the same as the one that was negotiated with the client. Servers should randomly generate and store a secret master AEAD key`K`.'K'. Servers should additionally choose a non-secret, unique value`I`'I' askey-identifierkey identifier for`K`.'K'. </t> <t> Servers should periodically (e.g., once daily) generate a new pair`(I,K)`'(I,K)' and immediately switch to using these values for all newly-generated cookies. Following each such key rotation, servers should securely erase any previously generated keys that should now be expired. Servers should continue to accept any cookie generated using keys that they have not yet erased, even if those keys are no longer current. Erasing old keys provides for forward secrecy, limiting the scope of what old information can be stolen if a master key is somehow compromised. Holding on to a limited number of old keys allows clients to seamlessly transition from one generation to the next without having to perform a new NTS-KE handshake. </t> <t> The need to keep keys synchronized between NTS-KE and NTP servers as well as across load-balanced clusters can make automatic key rotation challenging. However, the task can be accomplished without the need for central key-management infrastructure by using a ratchet, i.e., making each new key a deterministic, cryptographicallypseudo-randompseudorandom function of its predecessor. A recommended concrete implementation of this approach is to use <xreftarget="RFC5869">HKDF</xref>target="RFC5869" format="default">HKDF</xref> to derive new keys, using the key's predecessor as Input Keying Material and its key identifier as a salt. </t> <t> To form a cookie, servers should first form a plaintext`P`'P' consisting of the following fields:<list> <t>The</t> <ul empty="true" spacing="normal"> <li>The AEAD algorithm negotiated duringNTS-KE.</t> <t>TheNTS-KE.</li> <li>The S2Ckey.</t> <t>Thekey.</li> <li>The C2Skey.</t> </list> </t>key.</li> </ul> <t> Servers should then generate a nonce`N`'N' uniformly at random, and form AEAD output`C`'C' by encrypting`P`'P' under key`K`'K' with nonce`N`'N' and no associated data. </t> <t> The cookie should consist of the tuple`(I,N,C)`.'(I,N,C)'. </t> <t> To verify and decrypt a cookie provided by the client, first parse it into its components`I`, `N`,'I', 'N', and`C`.'C'. Use`I`'I' to look up its decryption key`K`.'K'. If the key whose identifier is`I`'I' has been erased or never existed, decryption fails; reply with an NTS NAK. Otherwise, attempt to decrypt and verify ciphertext`C`'C' using key`K`'K' and nonce`N`'N' with no associated data. If decryption or verification fails, reply with an NTS NAK. Otherwise, parse out the contents of the resulting plaintext`P`'P' to obtain the negotiated AEAD algorithm, S2C key, and C2S key. </t> </section> <sectiontitle="IANA Considerations" anchor="iana-considerations"> <section title="Serviceanchor="iana-considerations" numbered="true" toc="default"> <name>IANA Considerations</name> <section numbered="true" toc="default"> <name>Service Name and Transport Protocol Port NumberRegistry">Registry</name> <t> IANAis requested to allocatehas allocated the following entry in the<xref target="RFC6335">Service"Service Name and Transport Protocol Port NumberRegistry</xref>: <list> <t>Service Name: ntske</t> <t>Transport Protocol: tcp</t> <t>Assignee: IESG <iesg@ietf.org></t> <t>Contact: IETF Chair <chair@ietf.org></t> <t>Description: NetworkRegistry" <xref target="RFC6335" format="default"/>: </t> <dl newline="false" spacing="normal"> <dt>Service Name:</dt> <dd>ntske</dd> <dt>Port Number:</dt> <dd>4460</dd> <dt>Transport Protocol:</dt> <dd>tcp</dd> <dt>Description:</dt> <dd>Network Time Security KeyEstablishment</t> <t>Reference: [[this memo]]</t> <t>Port Number: [[TBD1]], selected by IANA from the User Port range</t> </list> </t> <t> [[RFC EDITOR: Replace all instances of [[TBD1]] in this document with the IANA port assignment.]] </t>Establishment</dd> <dt>Assignee:</dt> <dd>IESG <iesg@ietf.org></dd> <dt>Contact:</dt> <dd>IETF Chair <chair@ietf.org></dd> <dt>Registration Date:</dt> <dd>2020-04-07</dd> <dt>Reference:</dt> <dd>RFC 8915</dd> </dl> </section> <sectiontitle="TLSnumbered="true" toc="default"> <name>TLS Application-Layer Protocol Negotiation (ALPN) Protocol IDsRegistry">Registry</name> <t> IANAis requested to allocatehas allocated the following entry in the<xref target="RFC7301">TLS"TLS Application-Layer Protocol Negotiation (ALPN) ProtocolIDs registry</xref>: <list> <t>Protocol: NetworkIDs" registry <xref target="RFC7301" format="default"/>: </t> <dl newline="false" spacing="normal"> <dt>Protocol:</dt> <dd>Network Time Security Key Establishment, version1</t> <t> Identification Sequence:<vspace/> 0x6E 0x74 0x73 0x6B 0x65 0x2F 0x31 ("ntske/1") </t> <t>Reference: [[this memo]], <xref target="nts-ke"/></t> </list> </t> </section> <section title="TLS1</dd> <dt>Identification Sequence:</dt> <dd>0x6E 0x74 0x73 0x6B 0x65 0x2F 0x31 ("ntske/1")</dd> <dt>Reference:</dt><dd>RFC 8915, <xref target="nts-ke" format="default"/></dd> </dl> </section> <section numbered="true" toc="default"> <name>TLS Exporter LabelsRegistry">Registry</name> <t> IANAis requested to allocatehas allocated the following entry in the <xreftarget="RFC5705">TLStarget="RFC5705" format="default">TLS Exporter LabelsRegistry</xref>:registry</xref>: </t><texttable> <ttcol>Value</ttcol> <ttcol>DTLS-OK</ttcol> <ttcol>Recommended</ttcol> <ttcol>Reference</ttcol> <ttcol>Note</ttcol> <c>EXPORTER-network- time-security</c> <c>Y</c> <c>Y</c> <c>[[this memo]], <xref target="key-extraction"/></c> <c/> </texttable> </section> <section title="NTP<table align="center"> <thead> <tr> <th align="left">Value</th> <th align="left">DTLS-OK</th> <th align="left">Recommended</th> <th align="left">Reference</th> <th align="left">Note</th> </tr> </thead> <tbody> <tr> <td align="left">EXPORTER-network-time-security</td> <td align="left">Y</td> <td align="left">Y</td> <td align="left">RFC 8915, <xref target="key-extraction" format="default"/></td> <td align="left"/> </tr> </tbody> </table> </section> <section numbered="true" toc="default"> <name>NTP Kiss-o'-Death CodesRegistry">Registry</name> <t> IANAis requested to allocatehas allocated the following entry in the<xref target="RFC5905">registry of NTP"NTP Kiss-o'-DeathCodes</xref>:Codes" registry <xref target="RFC5905" format="default"/>: </t><texttable> <ttcol>Code</ttcol> <ttcol>Meaning</ttcol> <ttcol>Reference</ttcol> <c>NTSN</c> <c>Network<table align="center"> <thead> <tr> <th align="left">Code</th> <th align="left">Meaning</th> <th align="left">Reference</th> </tr> </thead> <tbody> <tr> <td align="left">NTSN</td> <td align="left">Network Time Security (NTS) negative-acknowledgment(NAK)</c> <c>[[this memo]], <xref target="protocol-details"/></c> </texttable>(NAK)</td> <td align="left">RFC 8915, <xref target="protocol-details" format="default"/></td> </tr> </tbody> </table> </section> <sectiontitle="NTPnumbered="true" toc="default"> <name>NTP Extension Field TypesRegistry">Registry</name> <t> IANAis requested to allocatehas allocated the following entries in the<xref target="RFC5905">NTP"NTP Extension FieldTypes registry</xref>:Types" registry <xref target="RFC5905" format="default"/>: </t><texttable> <ttcol>Field Type</ttcol> <ttcol>Meaning</ttcol> <ttcol>Reference</ttcol> <c>[[TBD2]]</c> <c>Unique Identifier</c> <c>[[this memo]], <xref target="unique-identifier-extension-field"/></c> <c>[[TBD3]]</c> <c>NTS Cookie</c> <c>[[this memo]], <xref target="nts-cookie-extension-field"/></c> <c>[[TBD4]]</c> <c>NTS<table align="center"> <thead> <tr> <th align="left">Field Type</th> <th align="left">Meaning</th> <th align="left">Reference</th> </tr> </thead> <tbody> <tr> <td align="left">0x0104</td> <td align="left">Unique Identifier</td> <td align="left">RFC 8915, <xref target="unique-identifier-extension-field" format="default"/></td> </tr> <tr> <td align="left">0x0204</td> <td align="left">NTS Cookie</td> <td align="left">RFC 8915, <xref target="nts-cookie-extension-field" format="default"/></td> </tr> <tr> <td align="left">0x0304</td> <td align="left">NTS CookiePlaceholder</c> <c>[[this memo]], <xref target="nts-cookie-placeholder-extension-field"/></c> <c>[[TBD5]]</c> <c>NTSPlaceholder</td> <td align="left">RFC 8915, <xref target="nts-cookie-placeholder-extension-field" format="default"/></td> </tr> <tr> <td align="left">0x0404</td> <td align="left">NTS Authenticator and Encrypted ExtensionFields</c> <c>[[this memo]], <xref target="nts-aeef-extension-field"/></c> </texttable> <t> [[RFC EDITOR: REMOVE BEFORE PUBLICATION - The NTP WG suggests that the following values be used: <figure> <artwork> Unique Identifier 0x0104 NTS Cookie 0x0204 Cookie Placeholder 0x0304 NTS Authenticator 0x0404]] </artwork> </figure> </t> <t> [[RFC EDITOR: Replace all instances of [[TBD2]], [[TBD3]], [[TBD4]], and [[TBD5]] in this document with the respective IANA assignments.]] </t>Fields</td> <td align="left">RFC 8915, <xref target="nts-aeef-extension-field" format="default"/></td> </tr> </tbody> </table> </section> <sectiontitle="Networknumbered="true" toc="default"> <name>Network Time Security Key Establishment Record TypesRegistry">Registry</name> <t> IANAis requested to createhas created a new registry entitled"Network"Network Time Security Key Establishment RecordTypes".Types". EntriesSHALLhave the following fields:<list> <t> Record</t> <dl newline="false" spacing="normal"> <dt>Record Type Number(REQUIRED): An(<bcp14>REQUIRED</bcp14>):</dt> <dd>An integer in the range0–327670-32767 inclusive.</t> <t> Description (REQUIRED): A</dd> <dt>Description (<bcp14>REQUIRED</bcp14>):</dt> <dd>A short text description of the purpose of the field.</t> <t> Reference (REQUIRED): A</dd> <dt>Reference (<bcp14>REQUIRED</bcp14>):</dt> <dd>A reference to a document specifying the semantics of the record.</t> </list> </t></dd> </dl> <t> The registration policyfor allocation of new entries in this registry SHALL varyvaries bytheRecord Type Number, as follows:<list> <t>0–1023: IETF Review</t> <t>1024–16383: Specification Required</t> <t>16384–32767: Private and Experimental Use</t> </list></t><t><dl newline="false" spacing="normal"> <dt>0-1023:</dt> <dd>IETF Review</dd> <dt>1024-16383:</dt> <dd>Specification Required</dd> <dt>16384-32767:</dt> <dd>Private or Experimental Use</dd> </dl> <t> The initial contents of this registrySHALL beare as follows: </t><texttable> <ttcol>Record<table align="center"> <thead> <tr> <th align="left">Record TypeNumber</ttcol> <ttcol>Description</ttcol> <ttcol>Reference</ttcol> <c>0</c> <c>End of Message</c> <c>[[this memo]], <xref target="end-of-message"/></c> <c>1</c> <c>NTSNumber</th> <th align="left">Description</th> <th align="left">Reference</th> </tr> </thead> <tbody> <tr> <td align="left">0</td> <td align="left">End of Message</td> <td align="left">RFC 8915, <xref target="end-of-message" format="default"/></td> </tr> <tr> <td align="left">1</td> <td align="left">NTS Next ProtocolNegotiation</c> <c>[[this memo]], <xref target="nts-next-protocol-negotiation"/></c> <c>2</c> <c>Error</c> <c>[[this memo]], <xref target="nts-error"/></c> <c>3</c> <c>Warning</c> <c>[[this memo]], <xref target="nts-warning"/></c> <c>4</c> <c>AEADNegotiation</td> <td align="left">RFC 8915, <xref target="nts-next-protocol-negotiation" format="default"/></td> </tr> <tr> <td align="left">2</td> <td align="left">Error</td> <td align="left">RFC 8915, <xref target="nts-error" format="default"/></td> </tr> <tr> <td align="left">3</td> <td align="left">Warning</td> <td align="left">RFC 8915, <xref target="nts-warning" format="default"/></td> </tr> <tr> <td align="left">4</td> <td align="left">AEAD AlgorithmNegotiation</c> <c>[[this memo]], <xref target="aead-algorithm-negotiation"/></c> <c>5</c> <c>NewNegotiation</td> <td align="left">RFC 8915, <xref target="aead-algorithm-negotiation" format="default"/></td> </tr> <tr> <td align="left">5</td> <td align="left">New Cookie forNTPv4</c> <c>[[this memo]], <xref target="new-cookie-for-ntpv4"/></c> <c>6</c> <c>NTPv4NTPv4</td> <td align="left">RFC 8915, <xref target="new-cookie-for-ntpv4" format="default"/></td> </tr> <tr> <td align="left">6</td> <td align="left">NTPv4 ServerNegotiation</c> <c>[[this memo]], <xref target="ntp-server-negotiation"/></c> <c>7</c> <c>NTPv4Negotiation</td> <td align="left">RFC 8915, <xref target="ntp-server-negotiation" format="default"/></td> </tr> <tr> <td align="left">7</td> <td align="left">NTPv4 PortNegotiation</c> <c>[[this memo]], <xref target="ntp-port-negotiation"/></c> <c>16384–32767</c> <c>ReservedNegotiation</td> <td align="left">RFC 8915, <xref target="ntp-port-negotiation" format="default"/></td> </tr> <tr> <td align="left">8-16383</td> <td align="left">Unassigned</td> <td align="left"/> </tr> <tr> <td align="left">16384-32767</td> <td align="left">Reserved for Private&or ExperimentalUse</c> <c>[[this memo]]</c> </texttable>Use</td> <td align="left">RFC 8915</td> </tr> </tbody> </table> </section> <sectiontitle="Networknumbered="true" anchor="iana-nts-next-protocols" toc="default"> <name>Network Time Security Next ProtocolsRegistry">Registry</name> <t> IANAis requested to createhas created a new registry entitled"Network"Network Time Security NextProtocols".Protocols". EntriesSHALLhave the following fields:<list> <t> Protocol</t> <dl newline="false" spacing="normal"> <dt>Protocol ID(REQUIRED): An(<bcp14>REQUIRED</bcp14>):</dt> <dd>An integer in the range 0-65535 inclusive, functioning as an identifier.</t> <t> Protocol</dd> <dt>Protocol Name(REQUIRED): A(<bcp14>REQUIRED</bcp14>):</dt> <dd>A short text string naming the protocol being identified.</t> <t> Reference (REQUIRED):</dd> <dt>Reference (<bcp14>REQUIRED</bcp14>):</dt> <dd> A reference to a relevant specification document.</t> </list></dd> </dl> <t> The registration policyfor allocation of new entries in these registries SHALL varyvaries bytheirProtocol ID, as follows:<list> <t>0–1023: IETF Review</t> <t>1024–32767: Specification Required</t> <t>32768–65535: Private and Experimental Use</t> </list></t><t> The initial contents of this registry SHALL be as follows: </t> <texttable> <ttcol>Protocol ID</ttcol> <ttcol>Protocol Name</ttcol> <ttcol>Reference</ttcol> <c>0</c> <c>Network Time Protocol version 4 (NTPv4)</c> <c>[[this memo]]</c> <c>32768-65535</c> <c>Reserved for Private<dl newline="false" spacing="normal"> <dt>0-1023:</dt> <dd>IETF Review</dd> <dt>1024-32767:</dt> <dd>Specification Required</dd> <dt>32768-65535:</dt> <dd>Private or ExperimentalUse</c> <c>Reserved by [[this memo]]</c> </texttable> </section> <section title="Network Time Security Error and Warning Codes Registries"> <t> IANA is requested to create two new registries entitled "Network Time Security Error Codes" and "Network Time Security Warning Codes". Entries in each SHALL have the following fields: <list> <t>Number (REQUIRED): An integer in the range 0-65535 inclusive</t> <t>Description (REQUIRED): A short text description of the condition.</t> <t>Reference (REQUIRED): A reference to a relevant specification document.</t> </list> The policy for allocation of new entries in these registries SHALL vary by their Number, as follows: <list> <t>0–1023: IETF Review</t> <t>1024–32767: Specification Required</t> <t>32768–65535: Private and Experimental Use</t> </list> </t>Use</dd> </dl> <t> The initial contents ofthe Network Time Security Error Codes Registry SHALL be as follows: </t> <texttable> <ttcol>Number</ttcol> <ttcol>Description</ttcol> <ttcol>Reference</ttcol> <c>0</c> <c>Unrecognized Critical Extension</c> <c>[[this memo]], <xref target="nts-error"/></c> <c>1</c> <c>Bad Request</c> <c>[[this memo]], <xref target="nts-error"/></c> <c>2</c> <c>Internal Server Error</c> <c>[[this memo]], <xref target="nts-error"/></c> <c>32768-65535</c> <c>Reserved for Private or Experimental Use</c> <c>Reserved by [[this memo]]</c> </texttable> <t> The Network Time Security Warning Codes Registry SHALL initially be empty except for the reserved range, i.e.: </t> <texttable> <ttcol>Number</ttcol> <ttcol>Description</ttcol> <ttcol>Reference</ttcol> <c>32768-65535</c> <c>Reserved for Private or Experimental Use</c> <c>Reserved by [[this memo]]</c> </texttable> </section> </section> <section title="Implementation Status - RFC EDITOR: REMOVE BEFORE PUBLICATION"> <t>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 inthissection 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. Readersregistry areadvised to note that other implementations may exist.</t> <t>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 informationasthey see fit".</t> <section title="Implementation 1"> <t>Organization: Ostfalia University of Applied Science</t> <t>Implementor: Martin Langer</t> <t>Maturity: Proof-of-Concept Prototype</t> <t>This implementation was used to verify consistency and to ensure completeness of this specification.</t> <section title="Coverage"> <t>This implementation covers the complete specification.</t> </section> <section title="Licensing"> <t>The code is released under a Apache License 2.0 license. </t> <t>The source code is available at: https://gitlab.com/MLanger/nts/</t> </section> <section title="Contact Information"> <t>Contact Martin Langer: mart.langer@ostfalia.de</t> </section> <section title="Last Update"> <t>The implementation was updated 25. February 2019.</t> </section> </section> <section title="Implementation 2"> <t>Organization: Netnod</t> <t>Implementor: Christer Weinigel</t> <t>Maturity: Proof-of-Concept Prototype</t> <t>This implementation was used to verify consistency and to ensure completeness of this specification. </t> <section title="Coverage"> <t>This implementation covers the complete specification.</t> </section> <section title="Licensing"> <t>The source code is available at: https://github.com/Netnod/nts-poc-python.</t> <t>See LICENSE file for details on licensing (BSD 2).</t> </section> <section title="Contact Information"> <t>Contact Christer Weinigel: christer@weinigel.se</t> </section> <section title="Last Update"> <t>The implementation was updated 31. January 2019.</t> </section> </section> <section title="Implementation 3"> <t>Organization: Red Hat</t> <t>Implementor: Miroslav Lichvar</t> <t>Maturity: Prototype</t> <t>This implementation was used to verify consistency and to ensure completeness of this specification. </t> <section title="Coverage"> <t>This implementation covers the complete specification.</t> </section> <section title="Licensing"> <t>Licensing is GPLv2.</t> <t>The source code is available at: https://github.com/mlichvar/chrony-nts</t> </section> <section title="Contact Information"> <t>Contact Miroslav Lichvar: mlichvar@redhat.com</t> </section> <section title="Last Update"> <t>The implementation was updated 28. March 2019.</t> </section> </section> <section title="Implementation 4"> <t>Organization: NTPsec</t> <t>Implementor: Hal Murray and NTPsec team</t> <t>Maturity:Looking for testers. Servers running at ntp1.glypnod.com:123 and ntp2.glypnod.com:123 </t> <t>This implementation was used to verify consistency and to ensure completeness of this specification. </t> <section title="Coverage"> <t>This implementation covers the complete specification.</t> </section> <section title="Licensing"> <t>The source code is available at: https://gitlab.com/NTPsec/ntpsec. Licensing details in LICENSE.</t> </section> <section title="Contact Information"> <t>Contact Hal Murray: hmurray@megapathdsl.net, devel@ntpsec.org</t> </section> <section title="Last Update"> <t>The implementation was updated 2019-Apr-10.</t> </section> </section> <section title="Implementation 5"> <t>Organization: Cloudflare</t> <t>Implementor: Watson Ladd</t> <t>Maturity: </t> <t>This implementation was used to verify consistency and to ensure completeness of this specification.follows: </t><section title="Coverage"> <t>This implementation covers the server side of the NTS specification.</t> </section> <section title="Licensing"> <t>The source code is available at: https://github.com/wbl/nts-rust</t> <t>Licensing is ISC (details see LICENSE.txt file).</t> </section> <section title="Contact Information"> <t>Contact Watson Ladd: watson@cloudflare.com</t> </section> <section title="Last Update"> <t>The implementation was updated 21. March 2019.</t> </section> </section> <section title="Implementation 6"> <t>Organization: Hacklunch, independent</t> <t>Implementor: Michael Cardell Widerkrantz, Daniel Lublin, Martin Samuelsson et. al.</t> <t>Maturity: interoperable client, immature server</t> <section title="Coverage"> <t>NTS-KE client and server.</t> </section> <section title="Licensing"> <t>Licensing is ISC (details in LICENSE file).</t> <t>Source code is available at: https://gitlab.com/hacklunch/ntsclient</t> </section> <section title="Contact Information"> <t>Contact Michael Cardell Widerkrantz: mc@netnod.se</t> </section> <section title="Last Update"> <t>The implementation was updated 6. February 2020.</t> </section> </section> <section title="Interoperability "> <t>The Interoperability tests distinguished between NTS key establishment protocol and NTS time exchange messages. For the implementations 1, 2, 3, and<table align="center"> <thead> <tr> <th align="left">Protocol ID</th> <th align="left">Protocol Name</th> <th align="left">Reference</th> </tr> </thead> <tbody> <tr> <td align="left">0</td> <td align="left">Network Time Protocol version 4pairwise interoperability of the NTS key establishment protocol(NTPv4)</td> <td align="left">RFC 8915</td> </tr> <tr> <td align="left">1-32767</td> <td align="left">Unassigned</td> <td align="left"/> </tr> <tr> <td align="left">32768-65535</td> <td align="left">Reserved for Private or Experimental Use</td> <td align="left">RFC 8915</td> </tr> </tbody> </table> </section> <section numbered="true" toc="default"> <name>Network Time Security Error andexchange of NTS protected NTP messagesWarning Codes Registries</name> <t> IANA has created two new registries entitled "Network Time Security Error Codes" and "Network Time Security Warning Codes". Entries in each havebeen verified successfully. The implementation 2 was able to successfully performthekey establishment protocol againstfollowing fields: </t> <dl newline="false" spacing="normal"> <dt>Number (<bcp14>REQUIRED</bcp14>):</dt> <dd>An integer in theserver siderange 0-65535 inclusive</dd> <dt>Description (<bcp14>REQUIRED</bcp14>):</dt> <dd>A short text description of theimplementation 5.condition.</dd> <dt>Reference (<bcp14>REQUIRED</bcp14>):</dt> <dd>A reference to a relevant specification document.</dd> </dl> <t> The registration policy varies by Number, as follows: </t><t>These tests successfully demonstrate that there are at least four running implementations<dl newline="false" spacing="normal"> <dt>0-1023:</dt> <dd>IETF Review</dd> <dt>1024-32767:</dt> <dd>Specification Required</dd> <dt>32768-65535:</dt> <dd>Private or Experimental Use</dd> </dl> <t> The initial contents ofthis draft whichthe "Network Time Security Error Codes" registry areable to interoperate.as follows: </t> <table align="center"> <thead> <tr> <th align="left">Number</th> <th align="left">Description</th> <th align="left">Reference</th> </tr> </thead> <tbody> <tr> <td align="left">0</td> <td align="left">Unrecognized Critical Record</td> <td align="left">RFC 8915, <xref target="nts-error" format="default"/></td> </tr> <tr> <td align="left">1</td> <td align="left">Bad Request</td> <td align="left">RFC 8915, <xref target="nts-error" format="default"/></td> </tr> <tr> <td align="left">2</td> <td align="left">Internal Server Error</td> <td align="left">RFC 8915, <xref target="nts-error" format="default"/></td> </tr> <tr> <td align="left">3-32767</td> <td align="left">Unassigned</td> <td align="left"/> </tr> <tr> <td align="left">32768-65535</td> <td align="left">Reserved for Private or Experimental Use</td> <td align="left">RFC 8915</td> </tr> </tbody> </table> <t> The "Network Time Security Warning Codes" registry is initially empty except for the reserved range, i.e.: </t> <table align="center"> <thead> <tr> <th align="left">Number</th> <th align="left">Description</th> <th align="left">Reference</th> </tr> </thead> <tbody> <tr> <td align="left">0-32767</td> <td align="left">Unassigned</td> <td align="left"/> </tr> <tr> <td align="left">32768-65535</td> <td align="left">Reserved for Private or Experimental Use</td> <td align="left">RFC 8915</td> </tr> </tbody> </table> </section> </section> <sectiontitle="Security Considerations"> <section title="Protected Modes">numbered="true" toc="default"> <name>Security Considerations</name> <section numbered="true" toc="default"> <name>Protected Modes</name> <t> NTP provides many different operating modes in order to support different network topologies and to adapt to various requirements. This memo only specifies NTS for NTP modes 3 (client) and 4 (server) (see <xref target="sec-protocol-overview"/>).format="default"/>). The best current practice for authenticating the other NTP modes is using the symmetric message authentication code feature as described in <xreftarget="RFC5905">RFCtarget="RFC5905" format="default">RFC 5905</xref> and <xreftarget="RFC8573">RFCtarget="RFC8573" format="default">RFC 8573</xref>. </t> </section> <sectiontitle="Cookienumbered="true" toc="default"> <name>Cookie Encryption KeyCompromise">Compromise</name> <t> If the suggested format for NTS cookies in <xref target="suggested-format-for-nts-cookies"/>format="default"/> of thisdraftdocument is used, an attacker who has gained access to the secret cookie encryption key`K`'K' can impersonate the NTP server, including generating new cookies. NTP and NTS-KE server operatorsSHOULD<bcp14>SHOULD</bcp14> remove compromised keys as soon as the compromise is discovered. This will cause the NTP servers to respond with NTS NAK, thus forcing key renegotiation. Note that this measure does not protect against MITM attacks where the attacker has access to a compromised cookie encryption key. If another cookie scheme is used, there are likely similar considerations for that particular scheme. </t> </section> <sectiontitle="Sensitivitynumbered="true" toc="default"> <name>Sensitivity to DDoSAttacks">Attacks</name> <t> The introduction of NTS brings with it the introduction of asymmetric cryptography to NTP. Asymmetric cryptography is necessary for initial server authentication and AEAD key extraction. Asymmetric cryptosystems are generally orders of magnitude slower than their symmetric counterparts. This makes it much harder to build systems that can serve requests at a rate corresponding to the full line speed of the network connection. This, in turn, opens up a new possibility for DDoS attacks on NTP services. </t> <t> The main protection against these attacks in NTS lies in that the use of asymmetric cryptosystems is only necessary in the initial NTS-KE phase of the protocol. Since the protocol design enables separation of the NTS-KE and NTP servers, a successful DDoS attack on an NTS-KE server separated from the NTP service it supports will not affect NTP users that have already performed initial authentication, AEAD key extraction, and cookie exchange. </t> <t> NTS users should also consider that they are not fully protected against DoS attacks by on-path adversaries. In addition to dropping packets and attacks such as those described in <xreftarget="DelayAttack"/>,target="DelayAttack" format="default"/>, an on-path attacker can send spoofedkiss-o'-deathKiss-o'-Death replies, which are not authenticated, in response to NTP requests. This could result in significantly increased load on the NTS-KE server. Implementers have to weigh the user's need for unlinkability against the added resilience that comes with cookie reuse in cases of NTS-KE server unavailability. </t> </section> <sectiontitle="Avoidingnumbered="true" toc="default"> <name>Avoiding DDoSAmplification">Amplification</name> <t> Certainnon-standardnonstandard and/or deprecated features of the Network Time Protocol enable clients to send a request to a serverwhichthat causes the server to send a response much larger than the request. Serverswhichthat enable these features can be abused in order to amplify traffic volume in DDoS attacks by sending them a request with a spoofed sourceIP.IP address. In recent years, attacks of this nature have become an endemic nuisance. </t> <t> NTS is designed to avoid contributing any further to this problem by ensuring that NTS-related extension fields included in server responses will be the same size as the NTS-related extension fields sent by the client. In particular, this is why the client is required to send a separate and appropriately padded-out NTS Cookie Placeholder extension field for every cookie it wants to get back, rather than being permitted simply to specify a desired quantity. </t> <t> Due to the <xreftarget="RFC7822">RFCtarget="RFC7822" format="default">RFC 7822</xref> 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. </t> </section> <sectiontitle="Initialanchor="sec-cert-verification" numbered="true" toc="default"> <name>Initial Verification of ServerCertificates" anchor="sec-cert-verification">Certificates</name> <t> NTS's security goals are undermined if the client fails to verify that the X.509 certificate chain presented by the NTS-KE server is valid and rooted in a trusted certificate authority. <xreftarget="RFC5280">RFCtarget="RFC5280" format="default">RFC 5280</xref> and <xreftarget="RFC6125">target="RFC6125" format="default"> RFC 6125</xref> specify how such verification is to be performed in general. However, the expectation that the client does not yet have a correctly-set system clock at the time of certificate verification presents difficulties with verifying that the certificate is within its validity period, i.e., that the current time lies between the times specified in the certificate's notBefore and notAfter fields. It may be operationally necessary in some cases for a client to accept a certificatewhichthat appears to be expired or not yet valid. While there is no perfect solution to this problem, there are several mitigations the client can implement to make it more difficult for an adversary to successfully present an expired certificate:<list> <t></t> <ul empty="true" spacing="normal"> <li> Check whether the system time is in fact unreliable. On systems with the ntp_adjtime() system call, a return code other than TIME_ERROR indicates that some trusted software has already set the time and certificates can be strictly validated.</t> <t></li> <li> Allow the system administrator to specify that certificates should*always*<em>always</em> be strictly validated. Such a configuration is appropriate on systemswhichthat have a battery-backed clockand whichor that can reasonably prompt the user to manually set anapproximately-correctapproximately correct time if it appears to be needed.</t> <t></li> <li> Once the clock has been synchronized, periodically write the current system time to persistent storage. Do not accept any certificate whose notAfter field is earlier than the last recorded time.</t> <t></li> <li> NTP time replies are expected to be consistent with the NTS-KE TLS certificate validity period, i.e. time replies received immediately after an NTS-KE handshake are expected to lie within the certificate validity period. Implementations are recommended to check that this is the case. Performing a new NTS-KE handshake based solely on the fact that the certificate used by the NTS-KE server in a previous handshake has expired is normally not necessary. Clients that still wish to do this must take care not to cause an inadvertent denial-of-service attack on the NTS-KE server, for example by picking a random time in the week preceding certificate expiry to perform the new handshake.</t> <t></li> <li> Use multiple time sources. The ability to pass off an expired certificate is only useful to an adversary who has compromised the corresponding private key. If the adversary has compromised only a minority of servers, NTP's selection algorithm(<xref target="RFC5905">RFC 5905 section 11.2.1</xref>)(Section <xref target="RFC5905" section="11.2.1" sectionFormat="bare" format="default"/> of <xref target="RFC5905" format="default">RFC 5905</xref>) will protect the client from accepting bad time from the adversary-controlled servers.</t> </list> </t></li> </ul> </section> <section anchor="DelayAttack"title="Delay Attacks">numbered="true" toc="default"> <name>Delay Attacks</name> <t> In a packet delay attack, an adversary with the ability to act as a man-in-the-middle delays time synchronization packets between client and server asymmetrically <xreftarget="RFC7384"/>.target="RFC7384" format="default"/>. Since NTP's formula for computing time offset relies on the assumption that network latency is roughly symmetrical, this leads to the client to compute an inaccurate value <xreftarget="Mizrahi"/>.target="Mizrahi" format="default"/>. The delay attack does not reorder or modify the content of the exchanged synchronization packets. Therefore, cryptographic means do not provide a feasible way to mitigate this attack. However, the maximum error that an adversary can introduce is bounded by half of theround tripround-trip delay. </t> <t> <xreftarget="RFC5905">RFCtarget="RFC5905" format="default">RFC 5905</xref> specifies a parameter calledMAXDISTMAXDIST, which denotes the maximum round-trip latency (including not only the immediate round trip between client and server, but the whole distance back to the reference clock as reported in the Root Delay field) that a client will tolerate before concluding that the server is unsuitable for synchronization. The standard value for MAXDIST is one second, although some implementations use larger values. Whatever value a client chooses, the maximum errorwhichthat can be introduced by a delay attack is MAXDIST/2. </t> <t> Usage of multiple time sources, or multiple network paths to a given time source <xreftarget="Shpiner"/>,target="Shpiner" format="default"/>, may also serve to mitigate delay attacks if the adversary is in control of only some of the paths. </t> </section> <sectiontitle="NTS Stripping">numbered="true" toc="default"> <name>NTS Stripping</name> <t> Implementers must be aware of the possibility of "NTS stripping" attacks, where an attacker attempts to trick clients into reverting to plain NTP. Naive client implementations might, for example, revert automatically to plain NTP if the NTS-KE handshake fails. A man-in-the-middle attacker can easily cause this to happen. Even clients that already hold valid cookies can be vulnerable, since an attacker can force a client to repeat the NTS-KE handshake by sending faked NTP mode 4 replies with the NTS NAK kiss code. Forcing a client to repeat the NTS-KE handshake can also be the first step in more advanced attacks. </t> <t> For the reasons described here, implementationsSHOULD NOT<bcp14>SHOULD NOT</bcp14> revert from NTS-protected to unprotected NTP with any server without explicit user action. </t> </section> </section> <sectiontitle="Privacy Considerations"> <section title="Unlinkability" anchor="Unlinkability">numbered="true" toc="default"> <name>Privacy Considerations</name> <section anchor="Unlinkability" numbered="true" toc="default"> <name>Unlinkability</name> <t>Unlinkability prevents a device from being tracked when it changes network addresses(e.g.(e.g., because said device moved between different networks). In other words, unlinkability thwarts an attacker that seeks to link a new network address used by a device with a network address that it was formerlyusing,using because of recognizable data that the device persistently sends as part of an NTS-secured NTP association. This is the justification for continually supplying the client with fresh cookies, so that a cookie never represents recognizable data in the sense outlined above. </t> <t>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 not rectify legacy linkability issues that are already present in NTP. Thus, a client that requires unlinkability must also minimize information transmitted in a client query (mode 3) packet as described in thedraftdocument <xreftarget="I-D.ietf-ntp-data-minimization"/>.target="I-D.ietf-ntp-data-minimization" format="default"> NTP Client Data Minimization</xref>. </t> <t>The unlinkability objective only holds for time synchronization traffic, as opposed to key establishment traffic. This implies that it cannot be guaranteed for devices that function not only as time clients, but also as time servers (because the latter can be externally triggered to send linkable data, such as the TLS certificate).</t> <t>It should also be noted that it could be possible to link devices that operate as time servers from their time synchronization traffic, using information exposed in (mode 4) server response packets (e.g. reference ID, reference time, stratum,poll). poll). Also, devices that respond to NTP control queries could be linked using the information revealed by control queries. </t> <t>Note that the unlinkability objective does not prevent a client deviceto befrom being tracked by its time servers.</t> </section> <sectiontitle="Confidentiality">numbered="true" toc="default"> <name>Confidentiality</name> <t> NTS does not protect the confidentiality of information in NTP's header fields. When clients implement <xreftarget="I-D.ietf-ntp-data-minimization"/>,target="I-D.ietf-ntp-data-minimization" format="default"> NTP Client Data Minimization</xref>, client packet headers do not contain any informationwhichthat the client could conceivably wish to keep secret: one field is random, and all others are fixed. Information in server packet headers is likewise public: the origin timestamp is copied from the client's (random) transmit timestamp, and all other fields are set the same regardless of the identity of the client making the request. </t> <t> Future extension fields could hypothetically contain sensitive information, in which case NTS provides a mechanism for encrypting them. </t> </section> </section><section anchor="Acknowledgements" title="Acknowledgements"> <t>The authors would like to thank Richard Barnes, Steven Bellovin, Scott Fluhrer, Patrik Fältström (Faltstrom), Sharon Goldberg, Russ Housley, Benjamin Kaduk, Suresh Krishnan, Mirja Kühlewind (Kuehlewind), Martin Langer, Barry Leiba, Miroslav Lichvar, Aanchal Malhotra, Danny Mayer, Dave Mills, Sandra Murphy, Hal Murray, Karen O'Donoghue, Eric K. Rescorla, Kurt Roeckx, Stephen Roettger, Dan Romascanu, Kyle Rose, Rich Salz, Brian Sniffen, Susan Sons, Douglas Stebila, Harlan Stenn, Joachim Strömbergsson (Strombergsson), Martin Thomson, Éric (Eric) Vyncke, Richard Welty, Christer Weinigel, and Magnus Westerlund for contributions to this document and comments on the design of NTS.</t> </section></middle> <back><references title="Normative References"><displayreference target="I-D.ietf-ntp-data-minimization" to="NTP-DATA-MIN"/> <references> <name>References</name> <references> <name>Normative References</name> <reference anchor="IANA-AEAD" target="https://www.iana.org/assignments/aead-parameters/"> <front> <title> Authenticated Encryption with Associated Data (AEAD) Parameters </title> <author> <organization>IANA</organization> </author><date /></front> </reference><?rfc include='reference.RFC.0020.xml'?> <?rfc include='reference.RFC.2119.xml'?> <?rfc include='reference.RFC.4291.xml'?> <?rfc include='reference.RFC.5116.xml'?> <?rfc include="reference.RFC.5280.xml'?> <?rfc include='reference.RFC.5297.xml'?> <?rfc include='reference.RFC.5705.xml'?> <?rfc include='reference.RFC.5869.xml'?> <?rfc include='reference.RFC.5890.xml'?> <?rfc include='reference.RFC.5905.xml'?> <?rfc include='reference.RFC.6125.xml'?> <?rfc include='reference.RFC.6335.xml'?> <?rfc include='reference.RFC.6874.xml'?> <?rfc include='reference.RFC.7301.xml'?> <?rfc include='reference.RFC.7525.xml'?> <?rfc include='reference.RFC.7822.xml'?> <?rfc include='reference.RFC.8174.xml'?> <?rfc include='reference.RFC.8446.xml'?><xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.0020.xml"/> <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/> <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4291.xml"/> <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5116.xml"/> <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5280.xml"/> <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5297.xml"/> <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5705.xml"/> <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5869.xml"/> <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5890.xml"/> <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5905.xml"/> <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6125.xml"/> <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6335.xml"/> <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6874.xml"/> <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7301.xml"/> <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7525.xml"/> <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7822.xml"/> <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/> <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8446.xml"/> </references><references title="Informative References"> <?rfc include='reference.I-D.draft-ietf-ntp-data-minimization-04.xml'?> <?rfc include='reference.RFC.4086.xml'?> <?rfc include='reference.RFC.5077.xml'?> <?rfc include='reference.RFC.7384.xml'?> <?rfc include='reference.RFC.8573.xml'?><references> <name>Informative References</name> <xi:include href="https://datatracker.ietf.org/doc/bibxml3/reference.I-D.draft-ietf-ntp-data-minimization.xml"/> <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4086.xml"/> <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5077.xml"/> <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7384.xml"/> <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8573.xml"/> <reference anchor="Mizrahi" target=""> <front> <title>A game theoretic analysis of delay attacks against time synchronization protocols</title> <author fullname="Tal Mizrahi" initials="T" surname="Mizrahi"><organization abbrev=""/><organization/> </author> <date day="" month="September" year="2012"/> </front> <seriesInfoname="in Proceedings of" value="Precisionname="DOI" value="10.1109/ISPCS.2012.6336612"/> <refcontent>2012 IEEE International Symposium on Precision Clock Synchronization forMeasurementMeasurement, Control andCommunication, ISPCS 2012,Communication Proceedings, pp.1-6, DOI 10.1109/ISPCS.2012.6336612"/>1-6</refcontent> </reference> <reference anchor="Shpiner"> <front> <title>Multi-path Time Protocols</title> <author fullname="Alexander Shpiner" initials="A" surname="Shpiner"> <organization/> </author> <author fullname="Yoram Revah" initials="Y" surname="Revah"> <organization/> </author> <author fullname="Tal Mizrahi" initials="T" surname="Mizrahi"> <organization/> </author> <date month="September" year="2013"/> </front> <seriesInfoname="in Proceedings of" value="IEEEname="DOI" value="10.1109/ISPCS.2013.6644754"/> <refcontent>2013 IEEE International Symposium on Precision Clock Synchronization for Measurement, Control and Communication(ISPCS), DOI 10.1109/ISPCS.2013.6644754"/>(ISPCS) Proceedings, pp. 1-6</refcontent> </reference> </references> </references> <sectiontitle="Termsanchor="Acknowledgments" numbered="false" toc="default"> <name>Acknowledgments</name> <t>The authors would like to thank <contact fullname="Richard Barnes"/>, <contact fullname="Steven Bellovin"/>, <contact fullname="Scott Fluhrer"/>, <contact fullname="Patrik Fältström"/>, <contact fullname="Sharon Goldberg"/>, <contact fullname="Russ Housley"/>, <contact fullname="Benjamin Kaduk"/>, <contact fullname="Suresh Krishnan"/>, <contact fullname="Mirja Kühlewind"/>, <contact fullname="Martin Langer"/>, <contact fullname="Barry Leiba"/>, <contact fullname="Miroslav Lichvar"/>, <contact fullname="Aanchal Malhotra"/>, <contact fullname="Danny Mayer"/>, <contact fullname="Dave Mills"/>, <contact fullname="Sandra Murphy"/>, <contact fullname="Hal Murray"/>, <contact fullname="Karen O'Donoghue"/>, <contact fullname="Eric K. Rescorla"/>, <contact fullname="Kurt Roeckx"/>, <contact fullname="Stephen Roettger"/>, <contact fullname="Dan Romascanu"/>, <contact fullname="Kyle Rose"/>, <contact fullname="Rich Salz"/>, <contact fullname="Brian Sniffen"/>, <contact fullname="Susan Sons"/>, <contact fullname="Douglas Stebila"/>, <contact fullname="Harlan Stenn"/>, <contact fullname="Joachim Strömbergsson"/>, <contact fullname="Martin Thomson"/>, <contact fullname="Éric Vyncke"/>, <contact fullname="Richard Welty"/>, <contact fullname="Christer Weinigel"/>, and <contact fullname="Magnus Westerlund"/> for contributions to this document andAbbreviations"> <t> <list style="hanging"> <t hangText="AEAD "><xref target="RFC5116">Authenticated Encryption with Associated Data</xref></t> <t hangText="ALPN "><xref target="RFC7301">Application-Layer Protocol Negotiation</xref></t> <t hangText="C2S ">Client-to-server</t> <t hangText="DoS ">Denial-of-Service</t> <t hangText="DDoS ">Distributed Denial-of-Service</t> <t hangText="EF "><xref target="RFC5905">Extension Field</xref></t> <t hangText="HKDF "><xref target="RFC5869">Hashed Message Authentication Code-based Key Derivation Function</xref></t> <t hangText="KoD "><xref target="RFC5905">Kiss-o'-Death</xref></t> <t hangText="NTP "><xref target="RFC5905">Network Time Protocol </xref></t> <t hangText="NTS ">Network Time Security</t> <t hangText="NTS NAK">NTS negative-acknowledgment</t> <t hangText="NTS-KE ">Network Time Security Key Establishment</t> <t hangText="S2C ">Server-to-client</t> <t hangText="TLS "><xref target="RFC8446">Transport Layer Security</xref></t> </list> </t>comments on the design of NTS.</t> </section> </back> </rfc>