rfc8915xml2.original.xml   rfc8915.xml 
<?xml version="1.0" encoding="US-ASCII"?> <?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?> <!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">
<?rfc tocompact="yes"?> <rfc
<?rfc tocdepth="3"?> xmlns:xi="http://www.w3.org/2001/XInclude"
<?rfc tocindent="yes"?> submissionType="IETF"
<?rfc symrefs="yes"?> category="std"
<?rfc sortrefs="yes"?> consensus="true"
<?rfc comments="yes"?> docName="draft-ietf-ntp-using-nts-for-ntp-28"
<?rfc inline="yes"?> number="8915"
<?rfc compact="yes"?> ipr="trust200902"
<?rfc subcompact="no"?> obsoletes=""
<rfc category="std" docName="draft-ietf-ntp-using-nts-for-ntp-28" updates=""
ipr="trust200902" submissionType="IETF"> xml:lang="en"
tocInclude="true"
tocDepth="3"
symRefs="true"
sortRefs="true"
version="3">
<!-- xml2rfc v2v3 conversion 2.43.0 -->
<front> <front>
<title abbrev="Network Time Security for NTP">Network Time Security for the Network Time <title abbrev="Network Time Security for NTP">Network Time Security for the Network Time
Protocol</title> Protocol</title>
<seriesInfo name="RFC" value="8915"/>
<author fullname="Daniel Fox Franke" initials="D." surname="Franke"> <author fullname="Daniel Fox Franke" initials="D." surname="Franke">
<organization abbrev="Akamai">Akamai Technologies</organization> <organization abbrev="Akamai">Akamai Technologies</organization>
<address> <address>
<postal> <postal>
<street>145 Broadway</street> <street>145 Broadway</street>
<city>Cambridge</city> <city>Cambridge</city>
<region>MA</region> <region>MA</region>
<code>02142</code> <code>02142</code>
<country>United States</country> <country>United States of America</country>
</postal> </postal>
<email>dafranke@akamai.com</email> <email>dafranke@akamai.com</email>
</address> </address>
</author> </author>
<author fullname="Dieter Sibold" initials="D." surname="Sibold"> <author fullname="Dieter Sibold" initials="D." surname="Sibold">
<organization abbrev="PTB">Physikalisch-Technische <organization abbrev="PTB">Physikalisch-Technische
Bundesanstalt</organization> Bundesanstalt</organization>
<address> <address>
<postal> <postal>
<street>Bundesallee 100</street> <street>Bundesallee 100</street>
<city>Braunschweig</city> <city>Braunschweig</city>
<code>D-38116</code> <code>D-38116</code>
<region/>
<country>Germany</country> <country>Germany</country>
</postal> </postal>
<phone>+49-(0)531-592-8462</phone>
<phone>+49-(0)531-592-8420</phone>
<facsimile>+49-531-592-698420</facsimile>
<email>dieter.sibold@ptb.de</email> <email>dieter.sibold@ptb.de</email>
</address> </address>
</author> </author>
<author fullname="Kristof Teichel" initials="K." surname="Teichel"> <author fullname="Kristof Teichel" initials="K." surname="Teichel">
<organization abbrev="PTB">Physikalisch-Technische <organization abbrev="PTB">Physikalisch-Technische
Bundesanstalt</organization> Bundesanstalt</organization>
<address> <address>
<postal> <postal>
<street>Bundesallee 100</street> <street>Bundesallee 100</street>
<city>Braunschweig</city> <city>Braunschweig</city>
<region/>
<code>D-38116</code> <code>D-38116</code>
<country>Germany</country> <country>Germany</country>
</postal> </postal>
<phone>+49-(0)531-592-4471</phone> <phone>+49-(0)531-592-4471</phone>
<facsimile/>
<email>kristof.teichel@ptb.de</email> <email>kristof.teichel@ptb.de</email>
<uri/> <uri/>
</address> </address>
</author> </author>
<author fullname="Marcus Dansarie" initials="M." surname="Dansarie"> <author fullname="Marcus Dansarie" initials="M." surname="Dansarie">
<address> <address>
<postal> <postal>
<street />
<city />
<region />
<code />
<country>Sweden</country> <country>Sweden</country>
</postal> </postal>
<email>marcus@dansarie.se</email> <email>marcus@dansarie.se</email>
<uri>https://orcid.org/0000-0001-9246-0263</uri> <uri>https://orcid.org/0000-0001-9246-0263</uri>
</address> </address>
</author> </author>
<author fullname="Ragnar Sundblad" initials="R." surname="Sundblad">
<author fullname="Ragnar Sundblad" initials="R." surname="Sundblad">
<organization>Netnod</organization> <organization>Netnod</organization>
<address> <address>
<postal> <postal>
<street />
<city />
<region />
<code />
<country>Sweden</country> <country>Sweden</country>
</postal> </postal>
<email>ragge@netnod.se</email> <email>ragge@netnod.se</email>
</address> </address>
</author> </author>
<date month="September" year="2020"/>
<date day="25" month="March" year="2020"/>
<area>Internet Area</area> <area>Internet Area</area>
<workgroup>NTP Working Group</workgroup> <workgroup>NTP Working Group</workgroup>
<keyword>Integrity</keyword> <keyword>Integrity</keyword>
<keyword>Authentication</keyword> <keyword>Authentication</keyword>
<keyword>NTP</keyword> <keyword>NTP</keyword>
<keyword>Security</keyword> <keyword>Security</keyword>
<abstract> <abstract>
<t> <t>
This memo specifies Network Time Security (NTS), a mechanism This memo specifies Network Time Security (NTS), a mechanism
for using Transport Layer Security (TLS) and Authenticated for using Transport Layer Security (TLS) and Authenticated
Encryption with Associated Data (AEAD) to provide Encryption with Associated Data (AEAD) to provide
cryptographic security for the client-server mode of the cryptographic security for the client-server mode of the
Network Time Protocol (NTP). Network Time Protocol (NTP).
</t> </t>
<t> <t>
NTS is structured as a suite of two loosely coupled sub-protocols. NTS is structured as a suite of two loosely coupled sub-protocols.
skipping to change at line 137 skipping to change at line 103
<abstract> <abstract>
<t> <t>
This memo specifies Network Time Security (NTS), a mechanism This memo specifies Network Time Security (NTS), a mechanism
for using Transport Layer Security (TLS) and Authenticated for using Transport Layer Security (TLS) and Authenticated
Encryption with Associated Data (AEAD) to provide Encryption with Associated Data (AEAD) to provide
cryptographic security for the client-server mode of the cryptographic security for the client-server mode of the
Network Time Protocol (NTP). Network Time Protocol (NTP).
</t> </t>
<t> <t>
NTS is structured as a suite of two loosely coupled sub-protocols. NTS is structured as a suite of two loosely coupled sub-protocols.
The first (NTS-KE) handles initial authentication and key The first (NTS Key Establishment (NTS-KE)) handles initial authenticatio
establishment over TLS. The second handles encryption and n and key
establishment over TLS. The second (NTS Extension Fields for NTPv4) hand
les encryption and
authentication during NTP time synchronization via extension fields in t he authentication during NTP time synchronization via extension fields in t he
NTP packets, and holds all required state only on the NTP packets, and holds all required state only on the
client via opaque cookies. client via opaque cookies.
</t> </t>
</abstract> </abstract>
</front> </front>
<middle> <middle>
<section title="Introduction"> <section numbered="true" toc="default">
<name>Introduction</name>
<t> <t>
This memo specifies Network Time Security (NTS), a This memo specifies Network Time Security (NTS), a
cryptographic security mechanism for network time cryptographic security mechanism for network time
synchronization. A complete specification is provided for synchronization. A complete specification is provided for
application of NTS to the client-server mode of the application of NTS to the client-server mode of the
<xref target="RFC5905">Network Time Protocol (NTP)</xref>. <xref target="RFC5905" format="default">Network Time Protocol (NTP)</xre f>.
</t> </t>
<section numbered="true" toc="default">
<section title="Objectives"> <name>Objectives</name>
<t> <t>
The objectives of NTS are as follows: 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, Identity: Through the use of a X.509 public key infrastructure,
implementations can cryptographically establish the identity of implementations can cryptographically establish the identity of
the parties they are communicating with. the parties they are communicating with.
</t> </li>
<t> <li>
Authentication: Implementations can cryptographically Authentication: Implementations can cryptographically
verify that any time synchronization packets are verify that any time synchronization packets are
authentic, i.e., that they were produced by an authentic, i.e., that they were produced by an
identified party and have not been modified in transit. identified party and have not been modified in transit.
</t> </li>
<t> <li>
Confidentiality: Although basic time synchronization Confidentiality: Although basic time synchronization
data is considered non-confidential and sent in the data is considered nonconfidential and sent in the
clear, NTS includes support for encrypting NTP extension clear, NTS includes support for encrypting NTP extension
fields. fields.
</t> </li>
<t> <li>
Replay prevention: Client implementations can detect when Replay prevention: Client implementations can detect when
a received time synchronization packet is a replay of a received time synchronization packet is a replay of
a previous packet. a previous packet.
</t> </li>
<t> <li>
Request-response consistency: Client implementations can Request-response consistency: Client implementations can
verify that a time synchronization packet received from verify that a time synchronization packet received from
a server was sent in response to a particular request from a server was sent in response to a particular request from
the client. the client.
</t> </li>
<t> <li>
Unlinkability: For mobile clients, NTS will not leak any Unlinkability: For mobile clients, NTS will not leak any
information additional to NTP which would permit a information additional to NTP which would permit a
passive adversary to determine that two packets sent passive adversary to determine that two packets sent
over different networks came from the same client. over different networks came from the same client.
</t> </li>
<t> <li>
Non-amplification: Implementations (especially server Non-amplification: Implementations (especially server
implementations) can avoid acting as distributed implementations) can avoid acting as distributed
denial-of-service (DDoS) amplifiers by never responding to a denial-of-service (DDoS) amplifiers by never responding to a
request with a packet larger than the request packet. request with a packet larger than the request packet.
</t> </li>
<t> <li>
Scalability: Server implementations can serve large Scalability: Server implementations can serve large
numbers of clients without having to retain any numbers of clients without having to retain any
client-specific state. client-specific state.
</t> </li>
<t> <li>
Performance: NTS must not significantly degrade the Performance: NTS must not significantly degrade the
quality of the time transfer. The encryption and quality of the time transfer. The encryption and
authentication used when actually transferring time authentication used when actually transferring time
should be lightweight (see <xref target="RFC7384">RFC should be lightweight (see Section
7384, Section 5.7</xref>). <xref target="RFC7384" section="5.7" sectionFormat="bare" format="
</t> default"/>
</list> of <xref target="RFC7384" format="default">RFC 7384</xref>).
</t> </li>
</ul>
</section> </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>
<section title="Protocol Overview" anchor="sec-protocol-overview"> <section anchor="sec-protocol-overview" numbered="true" toc="default">
<name>Protocol Overview</name>
<t> <t>
The Network Time Protocol includes many different operating modes to The Network Time Protocol includes many different operating modes to
support various network topologies (see <xref target="RFC5905">RFC 590 support various network topologies (see Section
5, <xref target="RFC5905" section="3" sectionFormat="bare" format="defaul
Section 3</xref>). In addition to its best-known and t"/> 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 most-widely-used client-server mode, it also includes modes for
synchronization between symmetric peers, a control mode for server synchronization between symmetric peers, a control mode for server
monitoring and administration, and a broadcast mode. These various monitoring and administration, and a broadcast mode. These various
modes have differing and partly contradictory requirements for modes have differing and partly contradictory requirements for
security and performance. Symmetric and control modes demand mutual security and performance. Symmetric and control modes demand mutual
authentication and mutual replay protection. Additionally, for certain authentication and mutual replay protection. Additionally, for certain
message types control mode may require confidentiality as well as message types, the control mode may require confidentiality as well as
authentication. Client-server mode places more stringent requirements authentication. Client-server mode places more stringent requirements
on resource utilization than other modes, because servers may have on resource utilization than other modes because servers may have a
vast number of clients and be unable to afford to maintain per-client vast number of clients and be unable to afford to maintain per-client
state. However, client-server mode also has more relaxed security state. However, client-server mode also has more relaxed security
needs, because only the client requires replay protection: it is needs because only the client requires replay protection: it is
harmless for stateless servers to process replayed packets. The harmless for stateless servers to process replayed packets. The
security demands of symmetric and control modes, on the other hand, security demands of symmetric and control modes, on the other hand,
are in conflict with the resource-utilization demands of client-server are in conflict with the resource-utilization demands of client-server
mode: any scheme which provides replay protection inherently involves mode: any scheme that provides replay protection inherently involves
maintaining some state to keep track of what messages have already maintaining some state to keep track of which messages have already
been seen. been seen.
</t> </t>
<t> <t>
This memo specifies NTS exclusively for the client-server mode of NTP. This memo specifies NTS exclusively for the client-server mode of NTP.
To this end, NTS is structured as a suite of two protocols: To this end, NTS is structured as a suite of two protocols:
<list> </t>
<t> <ul empty="true" spacing="normal">
The "NTS Extensions for NTPv4" define a collection of NTP <li>
The "NTS Extension Fields for NTPv4" define a collection of NTP
extension fields for cryptographically securing NTPv4 using extension fields for cryptographically securing NTPv4 using
previously-established key material. They are suitable for previously established key material. They are suitable for
securing client-server mode because the server can implement them securing client-server mode because the server can implement them
without retaining per-client state. All state is kept by the without retaining per-client state. All state is kept by the
client and provided to the server in the form of an encrypted client and provided to the server in the form of an encrypted
cookie supplied with each request. On the other hand, the NTS cookie supplied with each request. On the other hand, the NTS
Extension Fields are suitable *only* for client-server mode Extension Fields are suitable <em>only</em> for client-server mode
because only the client, and not the server, is protected from because only the client, and not the server, is protected from
replay. replay.
</t> </li>
<li>
<t> The "NTS Key Establishment" protocol (NTS-KE) is a
The &quot;NTS Key Establishment&quot; protocol (NTS-KE) is a
mechanism for establishing key material for use with the NTS mechanism for establishing key material for use with the NTS
Extension Fields for NTPv4. It uses TLS to establish keys, provide Extension Fields for NTPv4. It uses TLS to establish keys, to prov
the client with an initial supply of cookies, and negotiate some ide
the client with an initial supply of cookies, and to negotiate som
e
additional protocol options. After this, the TLS channel additional protocol options. After this, the TLS channel
is closed with no per-client state remaining on the server side. is closed with no per-client state remaining on the server side.
</t> </li>
</list> </ul>
</t>
<t> <t>
The typical protocol flow is as follows: The client connects to an The typical protocol flow is as follows: The client connects to an
NTS-KE server on the NTS TCP port and the two parties perform a TLS NTS-KE server on the NTS TCP port and the two parties perform a TLS
handshake. Via the TLS channel, the parties negotiate some additional handshake. Via the TLS channel, the parties negotiate some additional
protocol parameters and the server sends the client a supply of protocol parameters, and the server sends the client a supply of
cookies along with an address and port of an NTP server cookies along with an address and port of an NTP server
for which the cookies are valid. The parties use for which the cookies are valid. The parties use
<xref target="RFC5705">TLS key export</xref> to extract key material <xref target="RFC5705" format="default">TLS key export</xref> to extra ct key material,
which will be used in the next phase of the protocol. This negotiation 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 takes only a single round trip, after which the server closes the
connection and discards all associated state. At this point the NTS-KE connection and discards all associated state. At this point, the NTS-K E
phase of the protocol is complete. Ideally, the client never needs to phase of the protocol is complete. Ideally, the client never needs to
connect to the NTS-KE server again. connect to the NTS-KE server again.
</t> </t>
<t> <t>
Time synchronization proceeds with the indicated NTP server. Time synchronization proceeds with the indicated NTP server.
The client sends the server an NTP client The client sends the server an NTP client
packet which includes several extension fields. Included among these packet that includes several extension fields. Included among these
fields are a cookie (previously provided by the key establishment serv er) fields are a cookie (previously provided by the key establishment serv er)
and an authentication tag, computed using key material extracted from and an authentication tag, computed using key material extracted from
the NTS-KE handshake. The NTP server uses the cookie to recover this the NTS-KE handshake. The NTP server uses the cookie to recover this
key material and send back an authenticated response. The response key material and send back an authenticated response. The response
includes a fresh, encrypted cookie which the client then sends back in includes a fresh, encrypted cookie that the client then sends back in
the clear in a subsequent request. (This constant refreshing of the clear in a subsequent request. This constant refreshing of cookies
cookies is necessary in order to achieve NTS's unlinkability goal.) is necessary in order to achieve NTS's unlinkability goal.
</t> </t>
<t> <t>
<xref target="protocol-overview"/> provides an overview of the <xref target="protocol-overview" format="default"/> provides an overvi ew of the
high-level interaction between the client, the NTS-KE server, and 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 NTP server. Note that the cookies' data format and the exchange of
secrets between NTS-KE and NTP servers are not part of this secrets between NTS-KE and NTP servers are not part of this
specification and are implementation dependent. However, a suggested specification and are implementation dependent. However, a suggested
format for NTS cookies is provided in format for NTS cookies is provided in
<xref target="suggested-format-for-nts-cookies"/>. <xref target="suggested-format-for-nts-cookies" format="default"/>.
</t> </t>
<figure anchor="protocol-overview" <figure anchor="protocol-overview">
title="Overview of High-Level Interactions in NTS"> <name>Overview of High-Level Interactions in NTS</name>
<artwork><![CDATA[ <artwork name="" type="" align="left" alt=""><![CDATA[
+--------------+ +--------------+
| | | |
+-> | NTP Server 1 | +-> | NTP Server 1 |
| | | | | |
Shared cookie | +--------------+ Shared cookie | +--------------+
+---------------+ encryption parameters | +--------------+ +---------------+ encryption parameters | +--------------+
| | (Implementation dependent) | | | | | (Implementation dependent) | | |
| NTS-KE Server | <------------------------------+-> | NTP Server 2 | | NTS-KE Server | <------------------------------+-> | NTP Server 2 |
| | | | | | | | | |
+---------------+ | +--------------+ +---------------+ | +--------------+
skipping to change at line 337 skipping to change at line 348
| ^ | ^
| | | |
| +----------+ | | +----------+ |
| | | | | | | |
+-----------> | Client | <-------------------------+ +-----------> | Client | <-------------------------+
| | 2. Perform authenticated | | 2. Perform authenticated
+----------+ time synchronization +----------+ time synchronization
and generate new and generate new
cookies using "NTS cookies using "NTS
Extension Fields for Extension Fields for
NTPv4".]]> NTPv4".
</artwork> ]]></artwork>
</figure> </figure>
</section> </section>
</section> </section>
<section numbered="true" toc="default">
<section title="Requirements Language"> <name>Requirements Language</name>
<t> <t>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bc
"OPTIONAL" in this document are to be interpreted as described in p14>",
BCP&nbsp;14 <xref target="RFC2119" /> <xref target="RFC8174" /> when, "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDE
D</bcp14>",
"<bcp14>NOT RECOMMENDED</bcp14>", "<bcp14>MAY</bcp14>", and
"<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as desc
ribed in
BCP&nbsp;14 <xref target="RFC2119" format="default"/> <xref target="RFC8
174" format="default"/> when,
and only when, they appear in all capitals, as shown here. and only when, they appear in all capitals, as shown here.
</t> </t>
</section> </section>
<section anchor="tls-profile" numbered="true" toc="default">
<section title="TLS profile for Network Time Security" anchor="tls-profile"> <name>TLS Profile for Network Time Security</name>
<t> <t>
Network Time Security makes use of TLS for NTS key establishment. Network Time Security makes use of TLS for NTS key establishment.
</t> </t>
<t> <t>
Since the NTS protocol is new as of this publication, no Since the NTS protocol is new as of this publication, no
backward-compatibility concerns exist to justify using backward-compatibility concerns exist to justify using
obsolete, insecure, or otherwise broken TLS features or obsolete, insecure, or otherwise broken TLS features or
versions. Implementations MUST conform with <xref versions. Implementations <bcp14>MUST</bcp14> conform with
target="RFC7525">RFC 7525</xref> or with a later revision of BCP <xref target="RFC7525" format="default">RFC 7525</xref> or
195. with a later revision of BCP 195.
</t> </t>
<t> <t>
Implementations MUST NOT negotiate TLS versions earlier than 1.3 Implementations <bcp14>MUST NOT</bcp14> negotiate TLS versions earlier t
<xref target="RFC8446"/> and MAY refuse to negotiate any TLS version han 1.3
which has been superseded by a later supported version. <xref target="RFC8446" format="default"/> and <bcp14>MAY</bcp14> refuse
to negotiate any TLS version
that has been superseded by a later supported version.
</t> </t>
<t> <t>
Use of the <xref target="RFC7301">Application-Layer Protocol Use of the <xref target="RFC7301" format="default">Application-Layer Pro
Negotiation Extension</xref> is integral to NTS and support for tocol
it is REQUIRED for interoperability. Negotiation Extension</xref> is integral to NTS, and support for
it is <bcp14>REQUIRED</bcp14> for interoperability.
</t> </t>
<t> <t>
Implementations MUST follow the rules in <xref target="RFC5280"> Implementations <bcp14>MUST</bcp14> follow the rules in <xref target="RF
RFC 5280</xref> and <xref target="RFC6125">RFC 6125</xref> for the C5280" format="default">
RFC 5280</xref> and <xref target="RFC6125" format="default">RFC 6125</xr
ef> for the
representation and verification of the application's service identity. representation and verification of the application's service identity.
When NTS-KE service discovery (out of scope for this document) When NTS-KE service discovery (out of scope for this document)
produces one or more host names, use of the produces one or more host names, use of the
<xref target="RFC6125">DNS-ID identifier type</xref> is RECOMMENDED; <xref target="RFC6125" format="default">DNS-ID identifier type</xref> is <bcp14>RECOMMENDED</bcp14>;
specifications for service discovery mechanisms can provide additional specifications for service discovery mechanisms can provide additional
guidance for certificate validation based on the results of guidance for certificate validation based on the results of
discovery. <xref target="sec-cert-verification" /> of this memo discovery. <xref target="sec-cert-verification" format="default"/> of th is memo
discusses particular considerations for certificate verification in discusses particular considerations for certificate verification in
the context of NTS. the context of NTS.
</t> </t>
</section> </section>
<section anchor="nts-ke" numbered="true" toc="default">
<name>The NTS Key Establishment Protocol</name>
<section title="The NTS Key Establishment Protocol" anchor="nts-ke">
<t> <t>
The NTS key establishment protocol is conducted via TCP port [[TBD1]]. The NTS key establishment protocol is conducted via TCP port 4460.
The two endpoints carry out a TLS handshake in conformance with The two endpoints carry out a TLS handshake in conformance with
<xref target="tls-profile"/>, with the client offering (via an <xref target="tls-profile" format="default"/>, with the client offering
<xref target="RFC7301">ALPN</xref> extension), and the server accepting, (via an
an application-layer protocol of &quot;ntske/1&quot;. Immediately <xref target="RFC7301" format="default">ALPN extension</xref>), and the
following a successful handshake, the client SHALL send a single request server accepting,
an application-layer protocol of "ntske/1". Immediately
following a successful handshake, the client <bcp14>SHALL</bcp14> send a
single request
as Application Data encapsulated in the TLS-protected channel. Then, the as Application Data encapsulated in the TLS-protected channel. Then, the
server SHALL send a single response. After sending their respective server <bcp14>SHALL</bcp14> send a single response. After sending their
request and response, the client and server SHALL send TLS respective
&quot;close_notify&quot; alerts in accordance with request and response, the client and server <bcp14>SHALL</bcp14> send TL
<xref target="RFC8446">RFC 8446, Section 6.1</xref>. S
"close_notify" alerts in accordance with Section
<xref target="RFC8446" section="6.1" sectionFormat="bare" format="defaul
t"/> of
<xref target="RFC8446" format="default">RFC 8446</xref>.
</t> </t>
<t> <t>
The client's request and the server's response each SHALL consist of a The client's request and the server's response each <bcp14>SHALL</bcp14> consist of a
sequence of records formatted according to sequence of records formatted according to
<xref target="ntske-record"/>. The request and a non-error response each <xref target="ntske-record" format="default"/>. The request and a non-er
SHALL include exactly one NTS Next Protocol Negotiation record. The ror response each
sequence SHALL be terminated by a &quot;End of Message&quot; record. The <bcp14>SHALL</bcp14> include exactly one NTS Next Protocol Negotiation r
ecord. The
sequence <bcp14>SHALL</bcp14> be terminated by a "End of Message" record
. The
requirement that all NTS-KE messages be terminated by an End of Message requirement that all NTS-KE messages be terminated by an End of Message
record makes them self-delimiting. record makes them self-delimiting.
</t> </t>
<t> <t>
Clients and servers MAY enforce length limits on requests and responses, Clients and servers <bcp14>MAY</bcp14> enforce length limits on requests
however, servers MUST accept requests of at least 1024 octets and and responses;
clients SHOULD accept responses of at least 65536 octets. however, servers <bcp14>MUST</bcp14> accept requests of at least 1024 oc
tets, and
clients <bcp14>SHOULD</bcp14> accept responses of at least 65536 octets.
</t> </t>
<figure anchor="ntske-record" title="NTS-KE Record Format"> <figure anchor="ntske-record">
<artwork><![CDATA[ <name>NTS-KE Record Format</name>
<artwork name="" type="" align="left" alt=""><![CDATA[
0 1 2 3 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 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|C| Record Type | Body Length | |C| Record Type | Body Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |
. . . .
. Record Body . . Record Body .
. . . .
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork> ]]></artwork>
</figure> </figure>
<t> <t>
The fields of an NTS-KE record are defined as follows: The fields of an NTS-KE record are defined as follows:
<list> </t>
<t> <dl newline="false" spacing="normal">
C (Critical Bit): Determines the disposition of unrecognized Record <dt>C (Critical Bit):</dt> <dd>Determines the disposition of unrecognize
d Record
Types. Implementations which receive a record with an unrecognized Types. Implementations which receive a record with an unrecognized
Record Type MUST ignore the record if the Critical Bit is 0 and MUST Record Type <bcp14>MUST</bcp14> ignore the record if the Critical Bi
treat it as an error if the Critical Bit is 1 (see <xref target="nts t is 0 and <bcp14>MUST</bcp14>
-error"/>). treat it as an error if the Critical Bit is 1 (see <xref target="nts
</t> -error" format="default"/>).
<t> </dd>
Record Type Number: A 15-bit integer in network byte order. The <dt>Record Type Number:</dt> <dd>A 15-bit integer in network byte order.
semantics of record types 0&ndash;7 are specified in this memo. The
Additional type numbers SHALL be tracked through the IANA Network semantics of Record Types 0-7 are specified in this memo.
Time Security Key Establishment Record Types registry. Additional type numbers <bcp14>SHALL</bcp14> be tracked through the
</t> IANA "Network
<t> Time Security Key Establishment Record Types" registry.
Body Length: The length of the Record Body field, in octets, as a </dd>
16-bit integer in network byte order. Record bodies MAY have any <dt>Body Length:</dt> <dd>The length of the Record Body field, in octets
, as a
16-bit integer in network byte order. Record bodies <bcp14>MAY</bcp1
4> have any
representable length and need not be aligned to a word boundary. representable length and need not be aligned to a word boundary.
</t> </dd>
<t> <dt>Record Body:</dt> <dd>The syntax and semantics of this field <bcp14>
Record Body: The syntax and semantics of this field SHALL be SHALL</bcp14> be
determined by the Record Type. determined by the Record Type.
</t> </dd>
</list> </dl>
</t>
<t> <t>
For clarity regarding bit-endianness: the Critical Bit is the For clarity regarding bit-endianness: the Critical Bit is the
most-significant bit of the first octet. In the C programming language, most significant bit of the first octet. In the C programming language,
given a network buffer given a network buffer
`unsigned char b[]` containing an NTS-KE record, the critical bit is 'unsigned char b[]' containing an NTS-KE record, the critical bit is
`b[0] &gt;&gt; 7` while the record type is 'b[0] &gt;&gt; 7' while the record type is
`((b[0] &amp; 0x7f) &lt;&lt; 8) + b[1]`. '((b[0] &amp; 0x7f) &lt;&lt; 8) + b[1]'.
</t> </t>
<t> <t>
Note that, although the Type-Length-Body format of an NTS-KE record is 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 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 field differ. While the length subfield of an NTP extension field gives
the length of the entire extension field including the type and length 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 subfields, the length field of an NTS-KE record gives just the length
of the body. of the body.
</t> </t>
<t> <t>
<xref target="fig_NTSKeyEstablishment"/> provides a schematic overview o f the <xref target="fig_NTSKeyEstablishment" format="default"/> provides a sch ematic overview of the
key establishment. It displays the protocol steps to be performed by the NTS key establishment. It displays the protocol steps to be performed by the NTS
client and server and record types to be exchanged. client and server and Record Types to be exchanged.
</t> </t>
<figure anchor="fig_NTSKeyEstablishment" title="NTS Key Establishment Mess <figure anchor="fig_NTSKeyEstablishment">
ages"> <name>NTS Key Establishment Messages</name>
<artwork><![CDATA[ <artwork name="" type="" align="left" alt=""><![CDATA[
+---------------------------------------+ +---------------------------------------+
| - Verify client request message. | | - Verify client request message. |
| - Extract TLS key material. | | - Extract TLS key material. |
| - Generate KE response message. | | - Generate KE response message. |
| - Include Record Types: | | - Include Record Types: |
| o NTS Next Protocol Negotiation | | o NTS Next Protocol Negotiation |
| o AEAD Algorithm Negotiation | | o AEAD Algorithm Negotiation |
| o <NTPv4 Server Negotiation> | | o <NTPv4 Server Negotiation> |
| o <NTPv4 Port Negotiation> | | o <NTPv4 Port Negotiation> |
| o New Cookie for NTPv4 | | o New Cookie for NTPv4 |
skipping to change at line 516 skipping to change at line 529
| | | |
| | | |
+-----------+----------------------+ +------+-----------------+ +-----------+----------------------+ +------+-----------------+
|- Generate KE request message. | |- Verify server response| |- Generate KE request message. | |- Verify server response|
| - Include Record Types: | | message. | | - Include Record Types: | | message. |
| o NTS Next Protocol Negotiation | |- Extract cookie(s). | | o NTS Next Protocol Negotiation | |- Extract cookie(s). |
| o AEAD Algorithm Negotiation | +------------------------+ | o AEAD Algorithm Negotiation | +------------------------+
| o <NTPv4 Server Negotiation> | | o <NTPv4 Server Negotiation> |
| o <NTPv4 Port Negotiation> | | o <NTPv4 Port Negotiation> |
| o End of Message | | o End of Message |
+----------------------------------+]]> +----------------------------------+
</artwork> ]]></artwork>
</figure> </figure>
<section numbered="true" toc="default">
<section title="NTS-KE Record Types"> <name>NTS-KE Record Types</name>
<t>The following NTS-KE Record Types are defined:</t> <t>The following NTS-KE Record Types are defined:</t>
<section anchor="end-of-message" numbered="true" toc="default">
<section title="End of Message" anchor="end-of-message"> <name>End of Message</name>
<t> <t>
The End of Message record has a Record Type number of 0 and a The End of Message record has a Record Type number of 0 and a
zero-length body. It MUST occur exactly once as the final record of zero-length body. It <bcp14>MUST</bcp14> occur exactly once as the f
every NTS-KE request and response. The Critical Bit MUST be set. inal record of
every NTS-KE request and response. The Critical Bit <bcp14>MUST</bcp
14> be set.
</t> </t>
</section> </section>
<section anchor="nts-next-protocol-negotiation" numbered="true" toc="def
<section title="NTS Next Protocol Negotiation" ault">
anchor="nts-next-protocol-negotiation"> <name>NTS Next Protocol Negotiation</name>
<t> <t>
The NTS Next Protocol Negotiation record has a Record Type number The NTS Next Protocol Negotiation record has a Record Type number
of 1. It MUST occur exactly once in every NTS-KE request and of 1. It <bcp14>MUST</bcp14> occur exactly once in every NTS-KE requ est and
response. Its body consists of a sequence of 16-bit unsigned response. Its body consists of a sequence of 16-bit unsigned
integers in network byte order. Each integer represents a Protocol integers in network byte order. Each integer represents a Protocol
ID from the IANA Network Time Security Next Protocols registry. The ID from the IANA "Network Time Security Next Protocols" registry
Critical Bit MUST be set. (<xref target="iana-nts-next-protocols" format="default"/>). The
Critical Bit <bcp14>MUST</bcp14> be set.
</t> </t>
<t> <t>
The Protocol IDs listed in the client's NTS Next Protocol The Protocol IDs listed in the client's NTS Next Protocol
Negotiation record denote those protocols which the client wishes to Negotiation record denote those protocols that the client wishes to
speak using the key material established through this NTS-KE speak using the key material established through this NTS-KE
session. Protocol IDs listed in the NTS-KE server's response MUST session. Protocol IDs listed in the NTS-KE server's response <bcp14> MUST</bcp14>
comprise a subset of those listed in the request and comprise a subset of those listed in the request and
denote those protocols which the NTP server is willing and denote those protocols that the NTP server is willing and
able to speak using the key material established through able to speak using the key material established through
this NTS-KE session. The client MAY this NTS-KE session. The client <bcp14>MAY</bcp14>
proceed with one or more of them. The request MUST list at least one proceed with one or more of them. The request <bcp14>MUST</bcp14> li
protocol, but the response MAY be empty. st at least one
protocol, but the response <bcp14>MAY</bcp14> be empty.
</t> </t>
</section> </section>
<section anchor="nts-error" numbered="true" toc="default">
<section title="Error" anchor="nts-error"> <name>Error</name>
<t> <t>
The Error record has a Record Type number of 2. Its body is exactly The Error record has a Record Type number of 2. Its body is exactly
two octets long, consisting of an unsigned 16-bit integer in network two octets long, consisting of an unsigned 16-bit integer in network
byte order, denoting an error code. The Critical Bit MUST be set. byte order, denoting an error code. The Critical Bit <bcp14>MUST</bc p14> be set.
</t> </t>
<t> <t>
Clients MUST NOT include Error records in their request. If clients Clients <bcp14>MUST NOT</bcp14> include Error records in their reque
receive a server response which includes an Error record, they MUST st. If clients
receive a server response that includes an Error record, they <bcp14
>MUST</bcp14>
discard any key material negotiated during the initial TLS exchange discard any key material negotiated during the initial TLS exchange
and MUST NOT proceed to the Next Protocol. Requirements for retry and <bcp14>MUST NOT</bcp14> proceed to the Next Protocol. Requiremen
intervals are described in <xref target="nts-ke-retry" />. ts for retry
intervals are described in <xref target="nts-ke-retry" format="defau
lt"/>.
</t> </t>
<t> <t>
The following error codes are defined: The following error codes are defined:
<list> </t>
<t> <ul empty="true" spacing="normal">
Error code 0 means &quot;Unrecognized Critical Record&quot;. The <li>
server MUST respond with this error code if the request included Error code 0 means "Unrecognized Critical Record". The
a record which the server did not understand and which had its server <bcp14>MUST</bcp14> respond with this error code if the r
Critical Bit set. The client SHOULD NOT retry its request equest included
a record that the server did not understand and that had its
Critical Bit set. The client <bcp14>SHOULD NOT</bcp14> retry its
request
without modification. without modification.
</t> </li>
<t> <li>
Error code 1 means &quot;Bad Request&quot;. The server MUST Error code 1 means "Bad Request". The server <bcp14>MUST</bcp14>
respond with this error if the request is not complete respond with this error if the request is not complete
and syntactically well-formed, or, upon the expiration and syntactically well-formed, or, upon the expiration
of an implementation-defined timeout, it has not yet of an implementation-defined timeout, it has not yet
received such a request. The client SHOULD NOT retry its received such a request. The client <bcp14>SHOULD NOT</bcp14> re try its
request without modification. request without modification.
</t> </li>
<t> <li>
Error code 2 means &quot;Internal Server Error&quot;. The server Error code 2 means "Internal Server Error". The server
MUST respond with this error if it is unable to respond properly <bcp14>MUST</bcp14> respond with this error if it is unable to r
due to an internal condition. The client MAY retry its request. espond properly
</t> due to an internal condition. The client <bcp14>MAY</bcp14> retr
</list> y its request.
</t> </li>
</ul>
</section> </section>
<section anchor="nts-warning" numbered="true" toc="default">
<section title="Warning" anchor="nts-warning"> <name>Warning</name>
<t> <t>
The Warning record has a Record Type number of 3. Its body is The Warning record has a Record Type number of 3. Its body is
exactly two octets long, consisting of an unsigned 16-bit integer in exactly two octets long, consisting of an unsigned 16-bit integer in
network byte order, denoting a warning code. The Critical Bit MUST network byte order, denoting a warning code. The Critical Bit <bcp14 >MUST</bcp14>
be set. be set.
</t> </t>
<t> <t>
Clients MUST NOT include Warning records in their request. If Clients <bcp14>MUST NOT</bcp14> include Warning records in their req
clients receive a server response which includes a Warning record, uest. If
they MAY discard any negotiated key material and abort without clients receive a server response that includes a Warning record,
proceeding to the Next Protocol. Unrecognized warning codes MUST be they <bcp14>MAY</bcp14> discard any negotiated key material and abor
t without
proceeding to the Next Protocol. Unrecognized warning codes <bcp14>M
UST</bcp14> be
treated as errors. treated as errors.
</t> </t>
<t> <t>
This memo defines no warning codes. This memo defines no warning codes.
</t> </t>
</section> </section>
<section anchor="aead-algorithm-negotiation" numbered="true" toc="defaul
<section title="AEAD Algorithm Negotiation" t">
anchor="aead-algorithm-negotiation"> <name>AEAD Algorithm Negotiation</name>
<t> <t>
The AEAD Algorithm Negotiation record has a Record Type number of 4. The AEAD Algorithm Negotiation record has a Record Type number of 4.
Its body consists of a sequence of unsigned 16-bit integers in Its body consists of a sequence of unsigned 16-bit integers in
network byte order, denoting Numeric Identifiers from the IANA network byte order, denoting Numeric Identifiers from the IANA
<xref target="IANA-AEAD">AEAD Algorithms registry</xref>. The <xref target="IANA-AEAD" format="default">"AEAD Algorithms" registry
Critical Bit MAY be set. </xref>. The
Critical Bit <bcp14>MAY</bcp14> be set.
</t> </t>
<t> <t>
If the NTS Next Protocol Negotiation record offers Protocol ID 0 If the NTS Next Protocol Negotiation record offers Protocol ID 0
(for NTPv4), then this record MUST be included exactly once. Other (for NTPv4), then this record <bcp14>MUST</bcp14> be included exactl
protocols MAY require it as well. y once. Other
protocols <bcp14>MAY</bcp14> require it as well.
</t> </t>
<t> <t>
When included in a request, this record denotes which AEAD When included in a request, this record denotes which AEAD
algorithms the client is willing to use to secure the Next Protocol, algorithms the client is willing to use to secure the Next Protocol,
in decreasing preference order. When included in a response, this in decreasing preference order. When included in a response, this
record denotes which algorithm the server chooses to use. It is record denotes which algorithm the server chooses to use. It is
empty if the server supports none of the algorithms offered. In empty if the server supports none of the algorithms offered. In
requests, the list MUST include at least one algorithm. In requests, the list <bcp14>MUST</bcp14> include at least one algorith
responses, it MUST include at most one. Honoring the client's m. In
preference order is OPTIONAL: servers may select among any of the responses, it <bcp14>MUST</bcp14> include at most one. Honoring the
client's
preference order is <bcp14>OPTIONAL</bcp14>: servers may select amon
g any of the
client's offered choices, even if they are able to support some client's offered choices, even if they are able to support some
other algorithm which the client prefers more. other algorithm that the client prefers more.
</t> </t>
<t> <t>
Server implementations of <xref Server implementations of
target="nts-extension-fields-for-ntpv4">NTS extension fields for <xref target="nts-extension-fields-for-ntpv4" format="default">NTS E
NTPv4</xref> MUST support <xref xtension Fields for NTPv4</xref>
target="RFC5297">AEAD_AES_SIV_CMAC_256</xref> (Numeric Identifier <bcp14>MUST</bcp14> support
15). That is, if the client includes AEAD_AES_SIV_CMAC_256 in its <xref target="RFC5297" format="default">AEAD_AES_SIV_CMAC_256</xref>
AEAD Algorithm Negotiation record and the server accepts Protocol (Numeric Identifier 15). That is, if the client includes AEAD_AES_SI
V_CMAC_256 in its
AEAD Algorithm Negotiation record, and the server accepts Protocol
ID 0 (NTPv4) in its NTS Next Protocol Negotiation record, then the ID 0 (NTPv4) in its NTS Next Protocol Negotiation record, then the
server's AEAD Algorithm Negotiation record MUST NOT be empty. server's AEAD Algorithm Negotiation record <bcp14>MUST NOT</bcp14> b e empty.
</t> </t>
</section> </section>
<section anchor="new-cookie-for-ntpv4" numbered="true" toc="default">
<section title="New Cookie for NTPv4" anchor="new-cookie-for-ntpv4"> <name>New Cookie for NTPv4</name>
<t> <t>
The New Cookie for NTPv4 record has a Record Type number of 5. The The New Cookie for NTPv4 record has a Record Type number of 5. The
contents of its body SHALL be implementation-defined and clients contents of its body <bcp14>SHALL</bcp14> be implementation-defined,
MUST NOT attempt to interpret them. See <xref and clients <bcp14>MUST NOT</bcp14> attempt to interpret them.
target="suggested-format-for-nts-cookies"/> for a suggested See <xref target="suggested-format-for-nts-cookies" format="default"
/> for a suggested
construction. construction.
</t> </t>
<t> <t>
Clients MUST NOT send records of this type. Servers MUST send at Clients <bcp14>MUST NOT</bcp14> send records of this type. Servers <
least one record of this type, and SHOULD send eight of them, if the bcp14>MUST</bcp14> send at
least one record of this type, and <bcp14>SHOULD</bcp14> send eight
of them, if the
Next Protocol Negotiation response record contains Protocol ID 0 Next Protocol Negotiation response record contains Protocol ID 0
(NTPv4) and the AEAD Algorithm Negotiation response record is not (NTPv4) and the AEAD Algorithm Negotiation response record is not
empty. The Critical Bit SHOULD NOT be set. empty. The Critical Bit <bcp14>SHOULD NOT</bcp14> be set.
</t> </t>
</section> </section>
<section anchor="ntp-server-negotiation" numbered="true" toc="default">
<section title="NTPv4 Server Negotiation" <name>NTPv4 Server Negotiation</name>
anchor="ntp-server-negotiation">
<t> <t>
The NTPv4 Server Negotiation record has a Record Type number of 6. The NTPv4 Server Negotiation record has a Record Type number of 6.
Its body consists of an Its body consists of an
<xref target="RFC0020">ASCII-encoded</xref> string. The <xref target="RFC0020" format="default">ASCII-encoded</xref> string.
contents of the string SHALL be either an IPv4 address, an IPv6 The
contents of the string <bcp14>SHALL</bcp14> be either an IPv4 addres
s, an IPv6
address, or a fully qualified domain name (FQDN). IPv4 addresses address, or a fully qualified domain name (FQDN). IPv4 addresses
MUST be in dotted decimal notation. IPv6 addresses MUST conform to <bcp14>MUST</bcp14> be in dotted decimal notation. IPv6 addresses <b cp14>MUST</bcp14> conform to
the "Text Representation of Addresses" as specified in the "Text Representation of Addresses" as specified in
<xref target="RFC4291">RFC 4291</xref> and MUST NOT include zone <xref target="RFC4291" format="default">RFC 4291</xref> and <bcp14>M
identifiers <xref target="RFC6874"/>. If a label contains at least UST NOT</bcp14> include zone
one non-ASCII character, it is an internationalized domain name identifiers <xref target="RFC6874" format="default"/>. If a label co
and an A-LABEL MUST be used as defined in ntains at least
Section 2.3.2.1 of <xref target="RFC5890">RFC 5890</xref>. one non-ASCII character, it is an internationalized domain name,
If the record contains a domain name, the recipient MUST treat it and an A-LABEL <bcp14>MUST</bcp14> be used as defined in Section
as a FQDN, e.g. by making sure it ends with a dot. <xref target="RFC5890" section="2.3.2.1" sectionFormat="bare" format
="default"/>
of <xref target="RFC5890" format="default">RFC 5890</xref>.
If the record contains a domain name, the recipient <bcp14>MUST</bcp
14> treat it
as a FQDN, e.g., by making sure it ends with a dot.
</t> </t>
<t> <t>
When NTPv4 is negotiated as a Next Protocol and this When NTPv4 is negotiated as a Next Protocol and this
record is sent by the server, the body specifies the record is sent by the server, the body specifies the
hostname or IP address of the NTPv4 server with which the hostname or IP address of the NTPv4 server with which the
client should associate and which will accept the supplied client should associate and that will accept the supplied
cookies. If no record of this type is sent, the client cookies. If no record of this type is sent, the client
SHALL interpret this as a directive to associate with an <bcp14>SHALL</bcp14> interpret this as a directive to associate with an
NTPv4 server at the same IP address as the NTS-KE server. NTPv4 server at the same IP address as the NTS-KE server.
Servers MUST NOT send more than one record of this type. Servers <bcp14>MUST NOT</bcp14> send more than one record of this ty pe.
</t> </t>
<t> <t>
When this record is sent by the client, it indicates that When this record is sent by the client, it indicates that
the client wishes to associate with the specified NTP the client wishes to associate with the specified NTP
server. The NTS-KE server MAY incorporate this request when server. The NTS-KE server <bcp14>MAY</bcp14> incorporate this reques
deciding what NTPv4 Server Negotiation records to respond t when
deciding which NTPv4 Server Negotiation records to respond
with, but honoring the client's preference is with, but honoring the client's preference is
OPTIONAL. The client MUST NOT send more than one record of <bcp14>OPTIONAL</bcp14>. The client <bcp14>MUST NOT</bcp14> send mor e than one record of
this type. this type.
</t> </t>
<t> <t>
If the client has sent a record of this type, the NTS-KE server If the client has sent a record of this type, the NTS-KE server
SHOULD reply with the same record if it is valid and the server is <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 able to supply cookies for it. If the client has not sent any
record of this type, the NTS-KE server SHOULD respond with either record of this type, the NTS-KE server <bcp14>SHOULD</bcp14> respond with either
an NTP server address in the same family as the NTS-KE session or 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 a FQDN that can be resolved to an address in that family, if such
alternatives are available. alternatives are available.
</t> </t>
<t> <t>
Servers MAY set the Critical Bit on records of this type; Servers <bcp14>MAY</bcp14> set the Critical Bit on records of this t
clients SHOULD NOT. ype;
clients <bcp14>SHOULD NOT</bcp14>.
</t> </t>
</section> </section>
<section anchor="ntp-port-negotiation" numbered="true" toc="default">
<section title="NTPv4 Port Negotiation" <name>NTPv4 Port Negotiation</name>
anchor="ntp-port-negotiation">
<t> <t>
The NTPv4 Port Negotiation record has a Record Type number The NTPv4 Port Negotiation record has a Record Type number
of 7. Its body consists of a 16-bit unsigned integer in of 7. Its body consists of a 16-bit unsigned integer in
network byte order, denoting a UDP port number. network byte order, denoting a UDP port number.
</t> </t>
<t> <t>
When NTPv4 is negotiated as a Next Protocol and this When NTPv4 is negotiated as a Next Protocol, and this
record is sent by the server, the body specifies the port record is sent by the server, the body specifies the port
number of the NTPv4 server with which the client should number of the NTPv4 server with which the client should
associate and which will accept the supplied cookies. If associate and that will accept the supplied cookies. If
no record of this type is sent, the client SHALL assume no record of this type is sent, the client <bcp14>SHALL</bcp14> assu
me
a default of 123 (the registered port number for NTP). a default of 123 (the registered port number for NTP).
</t> </t>
<t> <t>
When this record is sent by the client in conjunction with When this record is sent by the client in conjunction with
a NTPv4 Server Negotiation record, it indicates that the a NTPv4 Server Negotiation record, it indicates that the
client wishes to associate with the NTP server at the client wishes to associate with the NTP server at the
specified port. The NTS-KE server MAY incorporate this specified port. The NTS-KE server <bcp14>MAY</bcp14> incorporate thi s
request when deciding what NTPv4 Server Negotiation and request when deciding what NTPv4 Server Negotiation and
NTPv4 Port Negotiation records to respond with, but NTPv4 Port Negotiation records to respond with, but
honoring the client's preference is OPTIONAL. honoring the client's preference is <bcp14>OPTIONAL</bcp14>.
</t> </t>
<t> <t>
Servers MAY set the Critical Bit on records of this type; Servers <bcp14>MAY</bcp14> set the Critical Bit on records of this t
clients SHOULD NOT. ype;
clients <bcp14>SHOULD NOT</bcp14>.
</t> </t>
</section> </section>
</section> </section>
<section anchor="nts-ke-retry" numbered="true" toc="default">
<section title="Retry Intervals" anchor="nts-ke-retry"> <name>Retry Intervals</name>
<t> <t>
A mechanism for not unnecessarily overloading the NTS-KE server is A mechanism for not unnecessarily overloading the NTS-KE server is
REQUIRED when retrying the key establishment process due to protocol, <bcp14>REQUIRED</bcp14> when retrying the key establishment process du e to protocol,
communication, or other errors. The exact workings of this will be communication, or other errors. The exact workings of this will be
dependent on the application and operational experience gathered over dependent on the application and operational experience gathered over
time. Until such experience is available, this memo provides the time. Until such experience is available, this memo provides the
following suggestion. following suggestion.
</t> </t>
<t> <t>
Clients SHOULD use exponential backoff, with an initial and minimum Clients <bcp14>SHOULD</bcp14> use exponential backoff, with an initial and minimum
retry interval of 10 seconds, a maximum retry interval of 5 days, and retry interval of 10 seconds, a maximum retry interval of 5 days, and
a base of 1.5. Thus, the minimum interval in seconds, `t`, for the nth a base of 1.5. Thus, the minimum interval in seconds, 't', for the nth
retry is calculated with retry is calculated with the following:
<list style="empty">
<t>
t = min(10 * 1.5^(n-1), 432000).
</t>
</list>
</t> </t>
<ul empty="true" spacing="normal">
<li>
t = min(10 * 1.5<sup>n-1</sup>, 432000).
</li>
</ul>
<t> <t>
Clients MUST NOT reset the retry interval until they have performed Clients <bcp14>MUST NOT</bcp14> reset the retry interval until they ha ve performed
a successful key establishment with the NTS-KE server, followed by a a successful key establishment with the NTS-KE server, followed by a
successful use of the negotiated next protocol with the keys and data successful use of the negotiated Next Protocol with the keys and data
established during that transaction. established during that transaction.
</t> </t>
</section> </section>
<section anchor="key-extraction" numbered="true" toc="default">
<section title="Key Extraction (generally)" anchor="key-extraction"> <name>Key Extraction (Generally)</name>
<t> <t>
Following a successful run of the NTS-KE protocol, key material SHALL Following a successful run of the NTS-KE protocol, key material <bcp14
be extracted using <xref target="RFC5869">the HMAC-based >SHALL</bcp14>
be extracted using <xref target="RFC5869" format="default">the HMAC-ba
sed
Extract-and-Expand Key Derivation Function (HKDF)</xref> in Extract-and-Expand Key Derivation Function (HKDF)</xref> in
accordance with <xref target="RFC8446">RFC 8446, Section 7.5</xref>. accordance with Section <xref target="RFC8446" section="7.5" sectionFo
rmat="bare" format="default"/>
of <xref target="RFC8446" format="default">RFC 8446</xref>.
Inputs to the exporter function are to be constructed in a manner Inputs to the exporter function are to be constructed in a manner
specific to the negotiated Next Protocol. However, all protocols which specific to the negotiated Next Protocol. However, all protocols that
utilize NTS-KE MUST conform to the following two rules: utilize NTS-KE <bcp14>MUST</bcp14> conform to the following two rules:
<list>
<t>
The <xref target="RFC5705">disambiguating label string</xref> MUST
be &quot;EXPORTER-network-time-security&quot;.
</t>
<t>
The <xref target="RFC5705">per-association context value</xref>
MUST be provided and MUST begin with the two-octet Protocol ID
which was negotiated as a Next Protocol.
</t>
</list>
</t> </t>
<ul empty="true" spacing="normal">
<li>
The <xref target="RFC5705" format="default">disambiguating label s
tring</xref> <bcp14>MUST</bcp14>
be "EXPORTER-network-time-security".
</li>
<li>
The <xref target="RFC5705" format="default">per-association contex
t value</xref>
<bcp14>MUST</bcp14> be provided and <bcp14>MUST</bcp14> begin with
the two-octet Protocol ID
that was negotiated as a Next Protocol.
</li>
</ul>
</section> </section>
</section> </section>
<section anchor="nts-extension-fields-for-ntpv4" numbered="true" toc="defaul
<section title="NTS Extension Fields for NTPv4" t">
anchor="nts-extension-fields-for-ntpv4"> <name>NTS Extension Fields for NTPv4</name>
<section title="Key Extraction (for NTPv4)"> <section numbered="true" toc="default">
<name>Key Extraction (for NTPv4)</name>
<t> <t>
Following a successful run of the NTS-KE protocol wherein Protocol Following a successful run of the NTS-KE protocol wherein Protocol
ID 0 (NTPv4) is selected as a Next Protocol, two AEAD keys SHALL be ID 0 (NTPv4) is selected as a Next Protocol, two AEAD keys <bcp14>SHAL L</bcp14> be
extracted: a client-to-server (C2S) key and a server-to-client (S2C) extracted: a client-to-server (C2S) key and a server-to-client (S2C)
key. These keys SHALL be computed with the HKDF defined in key. These keys <bcp14>SHALL</bcp14> be computed with the HKDF defined
<xref target="RFC8446">RFC 8446, Section 7.5</xref> using the in
following inputs. Section <xref target="RFC8446" section="7.5" sectionFormat="bare" form
<list> at="default"/>
of <xref target="RFC8446" format="default">RFC 8446</xref> using the
following inputs:
</t>
<ul empty="true" spacing="normal">
<li>
The <xref target="RFC5705" format="default">disambiguating label s
tring</xref>
<bcp14>SHALL</bcp14> be "EXPORTER-network-time-security".
</li>
<li>
<t> <t>
The <xref target="RFC5705">disambiguating label string</xref> The <xref target="RFC5705" format="default">per-association contex
SHALL be &quot;EXPORTER-network-time-security&quot;. t value</xref>
<bcp14>SHALL</bcp14> consist of the following five octets:
</t> </t>
<t> <ul spacing="normal">
The <xref target="RFC5705">per-association context value</xref> <li>
SHALL consist of the following five octets: The first two octets <bcp14>SHALL</bcp14> be zero (the Protoco
<list> l ID for
<t>
The first two octets SHALL be zero (the Protocol ID for
NTPv4). NTPv4).
</t> </li>
<t> <li>
The next two octets SHALL be the Numeric Identifier of the The next two octets <bcp14>SHALL</bcp14> be the Numeric Identi
negotiated AEAD Algorithm in network byte order. fier of the
</t> negotiated AEAD algorithm in network byte order.
<t> </li>
The final octet SHALL be 0x00 for the C2S key and 0x01 for the <li>
The final octet <bcp14>SHALL</bcp14> be 0x00 for the C2S key a
nd 0x01 for the
S2C key. S2C key.
</t> </li>
</list> </ul>
</t> </li>
</list> </ul>
<t>
Implementations wishing to derive additional keys for private or Implementations wishing to derive additional keys for private or
experimental use MUST NOT do so by extending the above-specified experimental use <bcp14>MUST NOT</bcp14> do so by extending the above-
syntax for per-association context values. Instead, they SHOULD use specified
their own disambiguating label string. Note that <xref syntax for per-association context values. Instead, they <bcp14>SHOULD
target="RFC5705">RFC 5705</xref> provides that disambiguating label </bcp14> use
strings beginning with &quot;EXPERIMENTAL&quot; MAY be used without their own disambiguating label string. Note that <xref target="RFC5705
" format="default">RFC 5705</xref> provides that disambiguating label
strings beginning with "EXPERIMENTAL" <bcp14>MAY</bcp14> be used witho
ut
IANA registration. IANA registration.
</t> </t>
</section> </section>
<section numbered="true" toc="default">
<section title="Packet Structure Overview"> <name>Packet Structure Overview</name>
<t> <t>
In general, an NTS-protected NTPv4 packet consists of: In general, an NTS-protected NTPv4 packet consists of the following:
<list> </t>
<t> <ul empty="true" spacing="normal">
The usual 48-octet NTP header which is authenticated but not <li>
The usual 48-octet NTP header, which is authenticated but not
encrypted. encrypted.
</t> </li>
<t> <li>
Some extension fields which are authenticated but not encrypted. Some extension fields, which are authenticated but not encrypted.
</t> </li>
<t> <li>
An extension field which contains AEAD output (i.e., an An extension field that contains AEAD output (i.e., an
authentication tag and possible ciphertext). The corresponding authentication tag and possible ciphertext). The corresponding
plaintext, if non-empty, consists of some extension fields which plaintext, if non-empty, consists of some extension fields that
benefit from both encryption and authentication. benefit from both encryption and authentication.
</t> </li>
<t> <li>
Possibly, some additional extension fields which are neither Possibly, some additional extension fields that are neither
encrypted nor authenticated. In general, these are discarded by th e encrypted nor authenticated. In general, these are discarded by th e
receiver. receiver.
</t> </li>
</list> </ul>
</t>
<t> <t>
Always included among the authenticated or authenticated-and-encrypted Always included among the authenticated or authenticated-and-encrypted
extension fields are a cookie extension field and a unique identifier extension fields are a cookie extension field and a unique identifier
extension field, as described in Section 5.7. The purpose of the extension field, as described in <xref target="protocol-details" forma t="default"/>. The purpose of the
cookie extension field is to enable the server to offload storage of cookie extension field is to enable the server to offload storage of
session state onto the client. The purpose of the unique identifier session state onto the client. The purpose of the unique identifier
extension field is to protect the client from replay attacks. extension field is to protect the client from replay attacks.
</t> </t>
</section> </section>
<section anchor="unique-identifier-extension-field" numbered="true" toc="d
<section title="The Unique Identifier Extension Field" efault">
anchor="unique-identifier-extension-field"> <name>The Unique Identifier Extension Field</name>
<t> <t>
The Unique Identifier extension field provides the client with a The Unique Identifier extension field provides the client with a
cryptographically strong means of detecting replayed packets. It has a cryptographically strong means of detecting replayed packets. It has a
Field Type of [[TBD2]]. When the extension field is included in a Field Type of 0x0104. When the extension field is included in a
client packet (mode 3), its body SHALL consist of a string of octets client packet (mode 3), its body <bcp14>SHALL</bcp14> consist of a str
generated by a <xref target="RFC4086">cryptographically secure random ing of octets
number generator</xref>. The string MUST be at least 32 octets generated by a <xref target="RFC4086" format="default">cryptographical
ly secure random
number generator</xref>. The string <bcp14>MUST</bcp14> be at least 32
octets
long. When the extension field is included in a server packet long. When the extension field is included in a server packet
(mode 4), its body SHALL contain the same octet string as was provided (mode 4), its body <bcp14>SHALL</bcp14> contain the same octet string as was provided
in the client packet to which the server is responding. All server in the client packet to which the server is responding. All server
packets generated by NTS-implementing servers in response to client packets generated by NTS-implementing servers in response to client
packets containing this extension field MUST also contain this field packets containing this extension field <bcp14>MUST</bcp14> also conta in this field
with the same content as in the client's request. The field's use in with the same content as in the client's request. The field's use in
modes other than client-server is not defined. modes other than client-server is not defined.
</t> </t>
<t> <t>
This extension field MAY also be used standalone, without NTS, in This extension field <bcp14>MAY</bcp14> also be used standalone, witho ut NTS, in
which case it provides the client with a means of detecting spoofed which case it provides the client with a means of detecting spoofed
packets from off-path attackers. Historically, NTP's origin timestamp packets from off-path attackers. Historically, NTP's origin timestamp
field has played both these roles, but for cryptographic purposes this field has played both these roles, but this
is suboptimal because it is only 64 bits long and, depending on is suboptimal for cryptographic purposes because it is only 64 bits lo
ng, and depending on
implementation details, most of those bits may be predictable. In implementation details, most of those bits may be predictable. In
contrast, the Unique Identifier extension field enables a degree of contrast, the Unique Identifier extension field enables a degree of
unpredictability and collision resistance more consistent with unpredictability and collision resistance more consistent with
cryptographic best practice. cryptographic best practice.
</t> </t>
</section> </section>
<section anchor="nts-cookie-extension-field" numbered="true" toc="default"
<section title="The NTS Cookie Extension Field" >
anchor="nts-cookie-extension-field"> <name>The NTS Cookie Extension Field</name>
<t> <t>
The NTS Cookie extension field has a Field Type of [[TBD3]]. Its The NTS Cookie extension field has a Field Type of 0x0204. Its
purpose is to carry information which enables the server to recompute purpose is to carry information that enables the server to recompute
keys and other session state without having to store any per-client keys and other session state without having to store any per-client
state. The contents of its body SHALL be implementation-defined and state. The contents of its body <bcp14>SHALL</bcp14> be implementation
clients MUST NOT attempt to interpret them. See <xref -defined, and
target="suggested-format-for-nts-cookies"/> for a suggested clients <bcp14>MUST NOT</bcp14> attempt to interpret them.
construction. The NTS Cookie extension field MUST NOT be included in See <xref target="suggested-format-for-nts-cookies" format="default"/>
for a suggested
construction. The NTS Cookie extension field <bcp14>MUST NOT</bcp14>
be included in
NTP packets whose mode is other than 3 (client) or 4 (server). NTP packets whose mode is other than 3 (client) or 4 (server).
</t> </t>
</section> </section>
<section anchor="nts-cookie-placeholder-extension-field" numbered="true" t
<section title="The NTS Cookie Placeholder Extension Field" oc="default">
anchor="nts-cookie-placeholder-extension-field"> <name>The NTS Cookie Placeholder Extension Field</name>
<t> <t>
The NTS Cookie Placeholder extension field has a Field Type of The NTS Cookie Placeholder extension field has a Field Type of
[[TBD4]]. When this extension field is included in a client packet 0x0304. When this extension field is included in a client packet
(mode 3), it communicates to the server that the client wishes it to (mode 3), it communicates to the server that the client wishes it to
send additional cookies in its response. This extension field MUST NOT send additional cookies in its response. This extension field <bcp14>M UST NOT</bcp14>
be included in NTP packets whose mode is other than 3. be included in NTP packets whose mode is other than 3.
</t> </t>
<t> <t>
Whenever an NTS Cookie Placeholder extension field is present, it MUST Whenever an NTS Cookie Placeholder extension field is present, it <bcp 14>MUST</bcp14>
be accompanied by an NTS Cookie extension field. The body length of be accompanied by an NTS Cookie extension field. The body length of
the NTS Cookie Placeholder extension field MUST be the same as the the NTS Cookie Placeholder extension field <bcp14>MUST</bcp14> be the same as the
body length of the NTS Cookie extension field. This length requirement body length of the NTS Cookie extension field. This length requirement
serves to ensure that the response will not be larger than the serves to ensure that the response will not be larger than the
request, in order to improve timekeeping precision and prevent DDoS request, in order to improve timekeeping precision and prevent DDoS
amplification. The contents of the NTS Cookie Placeholder extension amplification. The contents of the NTS Cookie Placeholder extension
field's body SHOULD be all zeros and, aside from checking its length, field's body <bcp14>SHOULD</bcp14> be all zeros and, aside from checki
MUST be ignored by the server. ng its length,
<bcp14>MUST</bcp14> be ignored by the server.
</t> </t>
</section> </section>
<section anchor="nts-aeef-extension-field" numbered="true" toc="default">
<section title="The NTS Authenticator and Encrypted Extension Fields Exten <name>The NTS Authenticator and Encrypted Extension Fields Extension Fie
sion Field" ld</name>
anchor="nts-aeef-extension-field">
<t> <t>
The NTS Authenticator and Encrypted Extension Fields extension field The NTS Authenticator and Encrypted Extension Fields extension field
is the central cryptographic element of an NTS-protected NTP packet. is the central cryptographic element of an NTS-protected NTP packet.
Its Field Type is [[TBD5]]. It SHALL be formatted according to Its Field Type is 0x0404. It <bcp14>SHALL</bcp14> be formatted accordi
<xref target="fig-aeef-field"/> and include the following fields: ng to
<list> <xref target="fig-aeef-field" format="default"/> and include the follo
<t> wing fields:
Nonce Length: Two octets in network byte order, giving the length </t>
<dl newline="false" spacing="normal">
<dt>Nonce Length:</dt> <dd>Two octets in network byte order, giving th
e length
of the Nonce field, excluding any padding, interpreted as an of the Nonce field, excluding any padding, interpreted as an
unsigned integer. unsigned integer.
</t> </dd>
<t> <dt>Ciphertext Length:</dt> <dd>Two octets in network byte order, givi
Ciphertext Length: Two octets in network byte order, giving the ng the
length of the Ciphertext field, excluding any padding, interpreted length of the Ciphertext field, excluding any padding, interpreted
as an unsigned integer. as an unsigned integer.
</t> </dd>
<t> <dt>Nonce:</dt> <dd>A nonce as required by the negotiated AEAD algorit
Nonce: A nonce as required by the negotiated AEAD Algorithm. The hm. The
end of the field is zero-padded to a word (four octets) boundary. end of the field is zero-padded to a word (four octets) boundary.
</t> </dd>
<t> <dt>Ciphertext:</dt> <dd>The output of the negotiated AEAD algorithm.
Ciphertext: The output of the negotiated AEAD Algorithm. The The
structure of this field is determined by the negotiated algorithm, structure of this field is determined by the negotiated algorithm,
but it typically contains an authentication tag in addition to the but it typically contains an authentication tag in addition to the
actual ciphertext. The end of the field is zero-padded to a word actual ciphertext. The end of the field is zero-padded to a word
(four octets) boundary. (four octets) boundary.
</t> </dd>
<t> <dt>Additional Padding:</dt> <dd>Clients that use a nonce length short
Additional Padding: Clients which use a nonce length shorter than er than
the maximum allowed by the negotiated AEAD algorithm may be requir ed the maximum allowed by the negotiated AEAD algorithm may be requir ed
to include additional zero-padding. The necessary length of this to include additional zero-padding. The necessary length of this
field is specified below. field is specified below.
</t> </dd>
</list> </dl>
</t> <figure anchor="fig-aeef-field">
<figure anchor="fig-aeef-field" <name>NTS Authenticator and Encrypted Extension Fields Extension Field
title="NTS Authenticator and Encrypted Extension Fields Extension Fiel Format</name>
d Format"> <artwork name="" type="" align="left" alt=""><![CDATA[
<artwork><![CDATA[
0 1 2 3 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 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 Length | Ciphertext Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |
. . . .
. Nonce, including up to 3 octets padding . . Nonce, including up to 3 octets padding .
. . . .
| | | |
skipping to change at line 1012 skipping to change at line 1019
. . . .
. Ciphertext, including up to 3 octets padding . . Ciphertext, including up to 3 octets padding .
. . . .
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |
. . . .
. Additional Padding . . Additional Padding .
. . . .
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork> ]]></artwork>
</figure> </figure>
<t> <t>
The Ciphertext field SHALL be formed by providing the following inputs The Ciphertext field <bcp14>SHALL</bcp14> be formed by providing the f
to the negotiated AEAD Algorithm: ollowing inputs
<list> to the negotiated AEAD algorithm:
<t> </t>
K: For packets sent from the client to the server, the C2S key <dl newline="false" spacing="normal" indent="4">
SHALL be used. For packets sent from the server to the client, the <dt>K:</dt> <dd>For packets sent from the client to the server, the C2
S2C key SHALL be used. S key
</t> <bcp14>SHALL</bcp14> be used. For packets sent from the server to
<t> the client, the
A: The associated data SHALL consist of the portion of the NTP S2C key <bcp14>SHALL</bcp14> be used.
</dd>
<dt>A:</dt> <dd>The associated data <bcp14>SHALL</bcp14> consist of th
e portion of the NTP
packet beginning from the start of the NTP header and ending at packet beginning from the start of the NTP header and ending at
the end of the last extension field which precedes the NTS the end of the last extension field that precedes the NTS
Authenticator and Encrypted Extension Fields extension field. Authenticator and Encrypted Extension Fields extension field.
</t> </dd>
<t> <dt>P:</dt> <dd>The plaintext <bcp14>SHALL</bcp14> consist of all (if
P: The plaintext SHALL consist of all (if any) NTP extension field any) NTP extension fields to
s to be encrypted; if multiple extension fields are present, they <bcp1
be encrypted; if multiple extension fields are present they SHALL 4>SHALL</bcp14> be
be joined by concatenation. Each such field <bcp14>SHALL</bcp14> be f
joined by concatenation. Each such field SHALL be formatted in ormatted in
accordance with RFC 7822 [RFC7822], except that, contrary to the R accordance with <xref target="RFC7822" format="default">RFC 7822</
FC xref>, except that, contrary to the RFC
7822 requirement that fields have a minimum length of 16 or 28 oct ets, 7822 requirement that fields have a minimum length of 16 or 28 oct ets,
encrypted extension fields MAY be arbitrarily short (but still MUS T be encrypted extension fields <bcp14>MAY</bcp14> be arbitrarily short (but still <bcp14>MUST</bcp14> be
a multiple of 4 octets in length). a multiple of 4 octets in length).
</t> </dd>
<t> <dt>N:</dt> <dd>The nonce <bcp14>SHALL</bcp14> be formed however requi
N: The nonce SHALL be formed however required by the negotiated red by the negotiated
AEAD algorithm. AEAD algorithm.
</t> </dd>
</list> </dl>
</t>
<t> <t>
The purpose of the Additional Padding field is to ensure The purpose of the Additional Padding field is to ensure
that servers can always choose a nonce whose length is that servers can always choose a nonce whose length is
adequate to ensure its uniqueness, even if the client adequate to ensure its uniqueness, even if the client
chooses a shorter one, and still ensure that the overall chooses a shorter one, and still ensure that the overall
length of the server's response packet does not exceed the length of the server's response packet does not exceed the
length of the request. For mode 4 (server) packets, no length of the request. For mode 4 (server) packets, no
Additional Padding field is ever required. For mode 3 Additional Padding field is ever required. For mode 3
(client) packets, the length of the Additional Padding field (client) packets, the length of the Additional Padding field
SHALL be computed as follows. Let `N_LEN` be the padded <bcp14>SHALL</bcp14> be computed as follows. Let 'N_LEN' be the padde
length of the Nonce field. Let `N_MAX` be, as specified d
by <xref target="RFC5116">RFC 5116</xref>, the maximum length of the Nonce field. Let 'N_MAX' be, as specified
by <xref target="RFC5116" format="default">RFC 5116</xref>, the maximu
m
permitted nonce length for the negotiated AEAD permitted nonce length for the negotiated AEAD
algorithm. Let `N_REQ` be the lesser of 16 and N_MAX, algorithm. Let 'N_REQ' be the lesser of 16 and N_MAX,
rounded up to the nearest multiple of 4. If N_LEN is rounded up to the nearest multiple of 4. If N_LEN is
greater than or equal to N_REQ, then no Additional Padding greater than or equal to N_REQ, then no Additional Padding
field is required. Otherwise, the Additional Padding field field is required. Otherwise, the Additional Padding field
SHALL be at least N_REQ - N_LEN octets in length. Servers <bcp14>SHALL</bcp14> be at least N_REQ - N_LEN octets in length. Serve
MUST enforce this requirement by discarding any packet which rs
<bcp14>MUST</bcp14> enforce this requirement by discarding any packet
that
does not conform to it. does not conform to it.
</t> </t>
<t> <t>
Senders are always free to include more Additional Padding Senders are always free to include more Additional Padding
than mandated by the above paragraph. Theoretically, it than mandated by the above paragraph. Theoretically, it
could be necessary to do so in order to bring the extension could be necessary to do so in order to bring the extension
field to the minimum length required by <xref field to the minimum length required by <xref target="RFC7822" format=
target="RFC7822">RFC 7822</xref>. This should never happen in "default">RFC 7822</xref>. This should never happen in
practice because any reasonable AEAD algorithm will have a nonce and practice because any reasonable AEAD algorithm will have a nonce and
an authenticator long enough to bring the extension field to an authenticator long enough to bring the extension field to
its required length already. Nonetheless, implementers are its required length already. Nonetheless, implementers are
advised to explicitly handle this case and ensure that the advised to explicitly handle this case and ensure that the
extension field they emit is of legal length. extension field they emit is of legal length.
</t> </t>
<t> <t>
The NTS Authenticator and Encrypted Extension Fields extension field The NTS Authenticator and Encrypted Extension Fields extension field
MUST NOT be included in NTP packets whose mode is other than 3 <bcp14>MUST NOT</bcp14> be included in NTP packets whose mode is other than 3
(client) or 4 (server). (client) or 4 (server).
</t> </t>
</section> </section>
<section anchor="protocol-details" numbered="true" toc="default">
<section title="Protocol Details" anchor="protocol-details"> <name>Protocol Details</name>
<t> <t>
A client sending an NTS-protected request SHALL include the following A client sending an NTS-protected request <bcp14>SHALL</bcp14> include
extension fields as displayed in <xref the following
target="fig_NTSTimeSyncMessage"/>: extension fields as displayed in <xref target="fig_NTSTimeSyncMessage
<list> " format="default"/>:
<t> </t>
Exactly one Unique Identifier extension field which MUST be <ul empty="true" spacing="normal">
authenticated, MUST NOT be encrypted, and whose contents MUST be <li>
the output of a cryptographically secure random number generator. Exactly one Unique Identifier extension field that <bcp14>MUST</bc
<xref target="RFC4086"/> p14> be
</t> authenticated, <bcp14>MUST NOT</bcp14> be encrypted, and whose con
<t> tents <bcp14>MUST</bcp14> be
Exactly one NTS Cookie extension field which MUST be authenticated the output of a <xref target="RFC4086" format="default">cryptograp
and MUST NOT be encrypted. The cookie MUST be one which has been hically secure random number generator
</xref>.
</li>
<li>
Exactly one NTS Cookie extension field that <bcp14>MUST</bcp14> be
authenticated
and <bcp14>MUST NOT</bcp14> be encrypted. The cookie <bcp14>MUST</
bcp14> be one which has been
previously provided to the client, either from the key establishme nt previously provided to the client, either from the key establishme nt
server during the NTS-KE handshake or from the NTP server in server during the NTS-KE handshake or from the NTP server in
response to a previous NTS-protected NTP request. response to a previous NTS-protected NTP request.
</t> </li>
<t> <li>
Exactly one NTS Authenticator and Encrypted Extension Fields Exactly one NTS Authenticator and Encrypted Extension Fields
extension field, generated using an AEAD Algorithm and C2S key extension field, generated using an AEAD algorithm and C2S key
established through NTS-KE. established through NTS-KE.
</t> </li>
</list> </ul>
</t>
<t> <t>
To protect the client's privacy, the client SHOULD avoid reusing To protect the client's privacy, the client <bcp14>SHOULD</bcp14> avoi d reusing
a cookie. If the client does not have any cookies that it has not a cookie. If the client does not have any cookies that it has not
already sent, it SHOULD initiate a re-run of the NTS-KE protocol. The already sent, it <bcp14>SHOULD</bcp14> initiate a rerun of the NTS-KE
client MAY reuse cookies in order to prioritize resilience over protocol. The
client <bcp14>MAY</bcp14> reuse cookies in order to prioritize resilie
nce over
unlinkability. Which of the two that should be prioritized in any unlinkability. Which of the two that should be prioritized in any
particular case is dependent on the application and the user's particular case is dependent on the application and the user's
preference. <xref target="Unlinkability"/> describes the privacy preference. <xref target="Unlinkability" format="default"/> describes the privacy
considerations of this in further detail. considerations of this in further detail.
</t> </t>
<t> <t>
The client MAY include one or more NTS Cookie Placeholder extension The client <bcp14>MAY</bcp14> include one or more NTS Cookie Placehold
fields which MUST be authenticated and MAY be encrypted. The number of er extension
fields that <bcp14>MUST</bcp14> be authenticated and <bcp14>MAY</bcp14
> be encrypted. The number of
NTS Cookie Placeholder extension fields that the client includes NTS Cookie Placeholder extension fields that the client includes
SHOULD be such that if the client includes N placeholders and the serv er <bcp14>SHOULD</bcp14> be such that if the client includes N placeholde rs and the server
sends back N+1 cookies, the number of unused cookies stored by the sends back N+1 cookies, the number of unused cookies stored by the
client will come to eight. The client SHOULD NOT include more than sev en client will come to eight. The client <bcp14>SHOULD NOT</bcp14> includ e more than seven
NTS Cookie Placeholder extension fields in a request. When both the NTS Cookie Placeholder extension fields in a request. When both the
client and server adhere to all cookie-management guidance provided in client and server adhere to all cookie-management guidance provided in
this memo, the number of placeholder extension fields will equal the this memo, the number of placeholder extension fields will equal the
number of dropped packets since the last successful volley. number of dropped packets since the last successful volley.
</t> </t>
<t> <t>
In rare circumstances, it may be necessary to include fewer In rare circumstances, it may be necessary to include fewer
NTS Cookie Placeholder extensions than recommended above in NTS Cookie Placeholder extensions than recommended above in
order to prevent datagram fragmentation. When cookies adhere order to prevent datagram fragmentation. When cookies adhere
the format recommended in <xref to the format recommended in <xref target="suggested-format-for-nts-co
target="suggested-format-for-nts-cookies"/> and the AEAD in okies" format="default"/> and the AEAD in
use is the mandatory-to-implement AEAD_AES_SIV_CMAC_256, use is the mandatory-to-implement AEAD_AES_SIV_CMAC_256,
senders can include a cookie and seven placeholders and senders can include a cookie and seven placeholders and
still have packet size fall comfortably below 1280 octets if still have packet size fall comfortably below 1280 octets if
no non-NTS-related extensions are used; 1280 octets is the no non-NTS-related extensions are used; 1280 octets is the
minimum prescribed MTU for IPv6 and is generally safe minimum prescribed MTU for IPv6 and is generally safe
for avoiding IPv4 fragmentation. Nonetheless, for avoiding IPv4 fragmentation. Nonetheless,
senders SHOULD include fewer cookies and placeholders than senders <bcp14>SHOULD</bcp14> include fewer cookies and placeholders t han
otherwise indicated if doing so is necessary to prevent otherwise indicated if doing so is necessary to prevent
fragmentation. fragmentation.
</t> </t>
<figure anchor="fig_NTSTimeSyncMessage" <figure anchor="fig_NTSTimeSyncMessage">
title="NTS-protected NTP Time Synchronization Messages"> <name>NTS-Protected NTP Time Synchronization Messages</name>
<artwork><![CDATA[ <artwork name="" type="" align="left" alt=""><![CDATA[
+---------------------------------------+ +---------------------------------------+
| - Verify time request message | | - Verify time request message. |
| - Generate time response message | | - Generate time response message. |
| - Included NTPv4 extension fields | | - Included NTPv4 extension fields: |
| o Unique Identifier EF | | o Unique Identifier EF |
| o NTS Authentication and | | o NTS Authentication and |
| Encrypted Extension Fields EF | | Encrypted Extension Fields EF |
| - NTS Cookie EF | | - NTS Cookie EF |
| - <NTS Cookie EF> | | - <NTS Cookie EF> |
| - Transmit time request packet | | - Transmit time request packet. |
+-----------------+---------------------+ +-----------------+---------------------+
| |
| |
Server -----------+---------------+-----+-----------------------> Server -----------+---------------+-----+----------------------->
^ \ ^ \
/ \ / \
Time request / \ Time response Time request / \ Time response
(mode 3) / \ (mode 4) (mode 3) / \ (mode 4)
/ \ / \
/ V / V
Client -----+---------------------------------+-----------------> Client -----+---------------------------------+----------------->
| | | |
| | | |
| | | |
+-----------+----------------------+ +------+-----------------+ +-----------+-----------------------+ +-----+------------------+
|- Generate time request message | |- Verify time response | |- Generate time request message. | |- Verify time response |
| - Include NTPv4 Extension fields | | message | | - Include NTPv4 Extension fields: | | message. |
| o Unique Identifier EF | |- Extract cookie(s) | | o Unique Identifier EF | |- Extract cookie(s). |
| o NTS Cookie EF | |- Time synchronization | | o NTS Cookie EF | |- Time synchronization |
| o <NTS Cookie Placeholder EF> | | processing | | o <NTS Cookie Placeholder EF> | | processing. |
| | +------------------------+ | | +------------------------+
|- Generate AEAD tag of NTP message| |- Generate AEAD tag of NTP message.|
|- Add NTS Authentication and | |- Add NTS Authentication and |
| Encrypted Extension Fields EF | | Encrypted Extension Fields EF. |
|- Transmit time request packet | |- Transmit time request packet. |
+----------------------------------+]]> +-----------------------------------+
</artwork> ]]></artwork>
</figure> </figure>
<t> <t>
The client MAY include additional (non-NTS-related) extension fields The client <bcp14>MAY</bcp14> include additional (non-NTS-related) ext
which MAY appear prior to the NTS Authenticator and Encrypted Extensio ension fields
n that <bcp14>MAY</bcp14> appear prior to the NTS Authenticator and Encr
ypted Extension
Fields extension fields (therefore authenticated but not encrypted), Fields extension fields (therefore authenticated but not encrypted),
within it (therefore encrypted and authenticated), or after it within it (therefore encrypted and authenticated), or after it
(therefore neither encrypted nor authenticated). (therefore neither encrypted nor authenticated).
The server MUST discard any unauthenticated extension The server <bcp14>MUST</bcp14> discard any unauthenticated extension
fields. Future specifications of extension fields MAY provide fields. Future specifications of extension fields <bcp14>MAY</bcp14> p
rovide
exceptions to this rule. exceptions to this rule.
</t> </t>
<t> <t>
Upon receiving an NTS-protected request, the server SHALL (through som e Upon receiving an NTS-protected request, the server <bcp14>SHALL</bcp1 4> (through some
implementation-defined mechanism) use the cookie to recover the AEAD implementation-defined mechanism) use the cookie to recover the AEAD
Algorithm, C2S key, and S2C key associated with the request, and then algorithm, C2S key, and S2C key associated with the request, and then
use the C2S key to authenticate the packet and decrypt the ciphertext. use the C2S key to authenticate the packet and decrypt the ciphertext.
If the cookie is valid and authentication and decryption succeed, the If the cookie is valid and authentication and decryption succeed, the
server SHALL include the following extension fields in its response: server <bcp14>SHALL</bcp14> include the following extension fields in
<list> its response:
<t> </t>
Exactly one Unique Identifier extension field which MUST be <ul empty="true" spacing="normal">
authenticated, MUST NOT be encrypted, and whose contents SHALL ech <li>
o Exactly one Unique Identifier extension field that <bcp14>MUST</bc
p14> be
authenticated, <bcp14>MUST NOT</bcp14> be encrypted, and whose con
tents <bcp14>SHALL</bcp14> echo
those provided by the client. those provided by the client.
</t> </li>
<t> <li>
Exactly one NTS Authenticator and Encrypted Extension Fields Exactly one NTS Authenticator and Encrypted Extension Fields
extension field, generated using the AEAD algorithm and S2C key extension field, generated using the AEAD algorithm and S2C key
recovered from the cookie provided by the client. recovered from the cookie provided by the client.
</t> </li>
<t> <li>
One or more NTS Cookie extension fields which MUST be authenticate One or more NTS Cookie extension fields that <bcp14>MUST</bcp14> b
d e authenticated
and encrypted. The number of NTS Cookie extension fields included and encrypted. The number of NTS Cookie extension fields included
SHOULD be equal to, and MUST NOT exceed, one plus the number of <bcp14>SHOULD</bcp14> be equal to, and <bcp14>MUST NOT</bcp14> exc eed, one plus the number of
valid NTS Cookie Placeholder extension fields included in the valid NTS Cookie Placeholder extension fields included in the
request. The cookies returned in those fields MUST be valid for us request. The cookies returned in those fields <bcp14>MUST</bcp14>
e be valid for use
with the NTP server that sent them. They MAY be valid for other NT with the NTP server that sent them. They <bcp14>MAY</bcp14> be val
P id for other NTP
servers as well, but there is no way for the server to indicate servers as well, but there is no way for the server to indicate
this. this.
</t> </li>
</list> </ul>
</t>
<t> <t>
We emphasize the contrast that NTS Cookie extension fields MUST NOT be We emphasize the contrast that NTS Cookie extension fields <bcp14>MUST
encrypted when sent from client to server, but MUST be encrypted when NOT</bcp14> be
encrypted when sent from client to server but <bcp14>MUST</bcp14> be e
ncrypted when
sent from server to client. The former is necessary in order for the 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 server to be able to recover the C2S and S2C keys, while the latter is
necessary to satisfy the unlinkability goals discussed in <xref necessary to satisfy the unlinkability goals discussed in <xref target
target="Unlinkability"/>. We emphasize also that &quot;encrypted&quot; ="Unlinkability" format="default"/>. We emphasize also that "encrypted"
means encapsulated within the NTS Authenticator and Encrypted means encapsulated within the NTS Authenticator and Encrypted
Extensions extension field. While the body of an NTS Cookie extension Extensions extension field. While the body of an NTS Cookie extension
field will generally consist of some sort of AEAD output (regardless o f field will generally consist of some sort of AEAD output (regardless o f
whether the recommendations of <xref whether the recommendations of <xref target="suggested-format-for-nts-
target="suggested-format-for-nts-cookies"/> are precisely followed), cookies" format="default"/> are precisely followed),
this is not sufficient to make the extension field this is not sufficient to make the extension field
&quot;encrypted&quot;. "encrypted".
</t> </t>
<t> <t>
The server MAY include additional (non-NTS-related) extension fields The server <bcp14>MAY</bcp14> include additional (non-NTS-related) ext
which MAY appear prior to the NTS Authenticator and Encrypted Extensio ension fields
n that <bcp14>MAY</bcp14> appear prior to the NTS Authenticator and Encr
ypted Extension
Fields extension field (therefore authenticated but not encrypted), Fields extension field (therefore authenticated but not encrypted),
within it (therefore encrypted and authenticated), or after it within it (therefore encrypted and authenticated), or after it
(therefore neither encrypted nor authenticated). (therefore neither encrypted nor authenticated).
The client MUST discard any unauthenticated extension fields. The client <bcp14>MUST</bcp14> discard any unauthenticated extension f
Future specifications of extension fields MAY provide exceptions to ields.
Future specifications of extension fields <bcp14>MAY</bcp14> provide e
xceptions to
this rule. this rule.
</t> </t>
<t> <t>
Upon receiving an NTS-protected response, the client MUST verify that Upon receiving an NTS-protected response, the client <bcp14>MUST</bcp1 4> verify that
the Unique Identifier matches that of an outstanding request, and that the Unique Identifier matches that of an outstanding request, and that
the packet is authentic under the S2C key associated with that the packet is authentic under the S2C key associated with that
request. If either of these checks fails, the packet MUST be discarded request. If either of these checks fails, the packet <bcp14>MUST</bcp1
without further processing. In particular, the client MUST discard 4> be discarded
without further processing. In particular, the client <bcp14>MUST</bcp
14> discard
unprotected responses to NTS-protected requests. unprotected responses to NTS-protected requests.
</t> </t>
<t> <t>
If the server is unable to validate the cookie or authenticate the If the server is unable to validate the cookie or authenticate the
request, it SHOULD respond with a Kiss-o'-Death (KoD) packet (see request, it <bcp14>SHOULD</bcp14> respond with a Kiss-o'-Death (KoD) p
<xref target="RFC5905">RFC 5905, Section 7.4</xref>) with kiss code acket (see
&quot;NTSN&quot;, meaning &quot;NTS NAK&quot; (NTS negative-acknowledg Section <xref target="RFC5905" section="7.4" sectionFormat="bare" form
ment). at="default"/>
It MUST NOT include any NTS Cookie or NTS Authenticator and of <xref target="RFC5905" format="default">RFC 5905</xref>) with kiss
code
"NTSN", meaning "NTS NAK" (NTS negative-acknowledgment).
It <bcp14>MUST NOT</bcp14> include any NTS Cookie or NTS Authenticator
and
Encrypted Extension Fields extension fields. Encrypted Extension Fields extension fields.
</t> </t>
<t> <t>
If the NTP server has previously responded with authentic NTS-protecte d If the NTP server has previously responded with authentic NTS-protecte d
NTP packets, the client MUST verify that NTP packets, the client <bcp14>MUST</bcp14> verify that
any KoD packets received from the server contain the Unique Identifier any KoD packets received from the server contain the Unique Identifier
extension field and that the Unique Identifier matches that of an extension field and that the Unique Identifier matches that of an
outstanding request. If this check fails, the packet MUST be discarded outstanding request. If this check fails, the packet <bcp14>MUST</bcp1
without further processing. If this check passes, the client MUST comp 4> be discarded
ly without further processing. If this check passes, the client <bcp14>MU
with <xref target="RFC5905">RFC 5905, Section 7.4</xref> where require ST</bcp14> comply
d. with Section <xref target="RFC5905" section="7.4" sectionFormat="bare"
format="default"/>
of <xref target="RFC5905" format="default">RFC 5905</xref> where requi
red.
</t> </t>
<t> <t>
A client MAY automatically re-run the NTS-KE protocol upon forced A client <bcp14>MAY</bcp14> automatically rerun the NTS-KE protocol up
disassociation from an NTP server. In that case, it MUST avoid quickly on forced
disassociation from an NTP server. In that case, it <bcp14>MUST</bcp14
> avoid quickly
looping between the NTS-KE and NTP servers by rate limiting the looping between the NTS-KE and NTP servers by rate limiting the
retries. Requirements for retry intervals in NTS-KE are described in retries. Requirements for retry intervals in NTS-KE are described in
<xref target="nts-ke-retry" />. <xref target="nts-ke-retry" format="default"/>.
</t> </t>
<t> <t>
Upon reception of the NTS NAK kiss code, the client SHOULD wait until Upon reception of the NTS NAK kiss code, the client <bcp14>SHOULD</bcp
the next poll for a valid NTS-protected response and if none is 14> wait until
the next poll for a valid NTS-protected response, and if none is
received, initiate a fresh NTS-KE handshake to try to renegotiate new received, initiate a fresh NTS-KE handshake to try to renegotiate new
cookies, AEAD keys, and parameters. If the NTS-KE handshake succeeds, cookies, AEAD keys, and parameters. If the NTS-KE handshake succeeds,
the client MUST discard all old cookies and parameters and use the new the client <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 ones instead. As long as the NTS-KE handshake has not succeeded, the
client SHOULD continue polling the NTP server using the cookies and client <bcp14>SHOULD</bcp14> continue polling the NTP server using the cookies and
parameters it has. parameters it has.
</t> </t>
<t> <t>
To allow for NTP session restart when the NTS-KE server is unavailable To allow for NTP session restart when the NTS-KE server is unavailable
and to reduce NTS-KE server load, the client SHOULD keep at least one and to reduce NTS-KE server load, the client <bcp14>SHOULD</bcp14> kee p at least one
unused but recent cookie, AEAD keys, negotiated AEAD algorithm, and unused but recent cookie, AEAD keys, negotiated AEAD algorithm, and
other necessary parameters on persistent storage. This way, the client other necessary parameters in persistent storage. This way, the client
is able to resume the NTP session without performing renewed NTS-KE is able to resume the NTP session without performing renewed NTS-KE
negotiation. negotiation.
</t> </t>
</section> </section>
</section> </section>
<section anchor="suggested-format-for-nts-cookies" numbered="true" toc="defa
<section title="Suggested Format for NTS Cookies" ult">
anchor="suggested-format-for-nts-cookies"> <name>Suggested Format for NTS Cookies</name>
<t> <t>
This section is non-normative. It gives a suggested way for servers to This section is non-normative. It gives a suggested way for servers to
construct NTS cookies. All normative requirements are stated in construct NTS cookies. All normative requirements are stated in
<xref target="new-cookie-for-ntpv4"/> and <xref <xref target="new-cookie-for-ntpv4" format="default"/> and <xref target=
target="nts-cookie-extension-field"/>. "nts-cookie-extension-field" format="default"/>.
</t> </t>
<t> <t>
The role of cookies in NTS is closely analogous to that of session The role of cookies in NTS is closely analogous to that of session
cookies in TLS. Accordingly, the thematic resemblance of this section to tickets in TLS. Accordingly, the thematic resemblance of this section to
<xref target="RFC5077">RFC 5077</xref> is deliberate and the reader <xref target="RFC5077" format="default">RFC 5077</xref> is deliberate, a
nd the reader
should likewise take heed of its security considerations. should likewise take heed of its security considerations.
</t> </t>
<t> <t>
Servers should select an AEAD algorithm which they will use to encrypt Servers should select an AEAD algorithm that they will use to encrypt
and authenticate cookies. The chosen algorithm should be one such as and authenticate cookies. The chosen algorithm should be one such as
<xref target="RFC5297">AEAD_AES_SIV_CMAC_256</xref> which resists <xref target="RFC5297" format="default">AEAD_AES_SIV_CMAC_256</xref>, wh ich resists
accidental nonce reuse. It need not be the same as the one that was 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 negotiated with the client. Servers should randomly generate and store a
secret master AEAD key `K`. Servers should additionally choose a non-sec secret master AEAD key 'K'. Servers should additionally choose a non-sec
ret, ret,
unique value `I` as key-identifier for `K`. unique value 'I' as key identifier for 'K'.
</t> </t>
<t> <t>
Servers should periodically (e.g., once daily) generate a new pair `(I,K )` Servers should periodically (e.g., once daily) generate a new pair '(I,K )'
and immediately switch to using these values for all newly-generated and immediately switch to using these values for all newly-generated
cookies. Following each such key rotation, servers should cookies. Following each such key rotation, servers should
securely erase any previously generated keys that should now be expired. securely erase any previously generated keys that should now be expired.
Servers should continue to accept any cookie generated using keys that Servers should continue to accept any cookie generated using keys that
they have not yet erased, even if those keys are no longer current. they have not yet erased, even if those keys are no longer current.
Erasing old keys provides for forward secrecy, limiting the scope of Erasing old keys provides for forward secrecy, limiting the scope of
what old information can be stolen if a master key is somehow what old information can be stolen if a master key is somehow
compromised. Holding on to a limited number of old keys allows clients compromised. Holding on to a limited number of old keys allows clients
to seamlessly transition from one generation to the next without having to seamlessly transition from one generation to the next without having
to perform a new NTS-KE handshake. to perform a new NTS-KE handshake.
</t> </t>
<t> <t>
The need to keep keys synchronized between NTS-KE and NTP servers as The need to keep keys synchronized between NTS-KE and NTP servers as
well as across load-balanced clusters can make automatic key rotation well as across load-balanced clusters can make automatic key rotation
challenging. However, the task can be accomplished without the need for challenging. However, the task can be accomplished without the need for
central key-management infrastructure by using a ratchet, i.e., making central key-management infrastructure by using a ratchet, i.e., making
each new key a deterministic, cryptographically pseudo-random function each new key a deterministic, cryptographically pseudorandom function
of its predecessor. A recommended concrete implementation of this of its predecessor. A recommended concrete implementation of this
approach is to use <xref target="RFC5869">HKDF</xref> to derive new approach is to use <xref target="RFC5869" format="default">HKDF</xref> t o derive new
keys, using the key's predecessor as Input Keying Material and its key keys, using the key's predecessor as Input Keying Material and its key
identifier as a salt. identifier as a salt.
</t> </t>
<t> <t>
To form a cookie, servers should first form a plaintext `P` consisting To form a cookie, servers should first form a plaintext 'P' consisting
of the following fields: of the following fields:
<list>
<t>The AEAD algorithm negotiated during NTS-KE.</t>
<t>The S2C key.</t>
<t>The C2S key.</t>
</list>
</t> </t>
<ul empty="true" spacing="normal">
<li>The AEAD algorithm negotiated during NTS-KE.</li>
<li>The S2C key.</li>
<li>The C2S key.</li>
</ul>
<t> <t>
Servers should then generate a nonce `N` uniformly at random, and form Servers should then generate a nonce 'N' uniformly at random, and form
AEAD output `C` by encrypting `P` under key `K` with nonce `N` and no AEAD output 'C' by encrypting 'P' under key 'K' with nonce 'N' and no
associated data. associated data.
</t> </t>
<t> <t>
The cookie should consist of the tuple `(I,N,C)`. The cookie should consist of the tuple '(I,N,C)'.
</t> </t>
<t> <t>
To verify and decrypt a cookie provided by the client, first parse it To verify and decrypt a cookie provided by the client, first parse it
into its components `I`, `N`, and `C`. Use `I` to look up its decryption into its components 'I', 'N', and 'C'. Use 'I' to look up its decryption
key `K`. If the key whose identifier is `I` has been erased or never key 'K'. If the key whose identifier is 'I' has been erased or never
existed, decryption fails; reply with an NTS NAK. Otherwise, attempt to existed, decryption fails; reply with an NTS NAK. Otherwise, attempt to
decrypt and verify ciphertext `C` using key `K` and nonce `N` with no decrypt and verify ciphertext 'C' using key 'K' and nonce 'N' with no
associated data. If decryption or verification fails, reply with an NTS associated data. If decryption or verification fails, reply with an NTS
NAK. Otherwise, parse out the contents of the resulting plaintext `P` to NAK. Otherwise, parse out the contents of the resulting plaintext 'P' to
obtain the negotiated AEAD algorithm, S2C key, and C2S key. obtain the negotiated AEAD algorithm, S2C key, and C2S key.
</t> </t>
</section> </section>
<section anchor="iana-considerations" numbered="true" toc="default">
<section title="IANA Considerations" anchor="iana-considerations"> <name>IANA Considerations</name>
<section title="Service Name and Transport Protocol Port Number Registry"> <section numbered="true" toc="default">
<t> <name>Service Name and Transport Protocol Port Number Registry</name>
IANA is requested to allocate the following entry in the
<xref target="RFC6335">Service Name and Transport Protocol
Port Number Registry</xref>:
<list>
<t>Service Name: ntske</t>
<t>Transport Protocol: tcp</t>
<t>Assignee: IESG &lt;iesg@ietf.org&gt;</t>
<t>Contact: IETF Chair &lt;chair@ietf.org&gt;</t>
<t>Description: Network Time Security Key Establishment</t>
<t>Reference: [[this memo]]</t>
<t>Port Number: [[TBD1]], selected by IANA from the User Port
range</t>
</list>
</t>
<t> <t>
[[RFC EDITOR: Replace all instances of [[TBD1]] in this IANA has allocated the following entry in the
document with the IANA port assignment.]] "Service Name and Transport Protocol
Port Number Registry" <xref target="RFC6335" format="default"/>:
</t> </t>
</section>
<section title="TLS Application-Layer Protocol Negotiation (ALPN) Protocol <dl newline="false" spacing="normal">
IDs Registry"> <dt>Service Name:</dt> <dd>ntske</dd>
<t> <dt>Port Number:</dt> <dd>4460</dd>
IANA is requested to allocate the following entry in the <dt>Transport Protocol:</dt> <dd>tcp</dd>
<xref target="RFC7301">TLS Application-Layer Protocol Negotiation <dt>Description:</dt> <dd>Network Time Security Key Establishme
(ALPN) Protocol IDs registry</xref>: nt</dd>
<list> <dt>Assignee:</dt> <dd>IESG &lt;iesg@ietf.org&gt;</dd>
<t>Protocol: Network Time Security Key Establishment, version 1</t> <dt>Contact:</dt> <dd>IETF Chair &lt;chair@ietf.org&gt;</dd
<t> >
Identification Sequence:<vspace/> <dt>Registration Date:</dt> <dd>2020-04-07</dd>
&nbsp;&nbsp;0x6E&nbsp;0x74&nbsp;0x73&nbsp;0x6B&nbsp;0x65&nbsp;0x2F <dt>Reference:</dt> <dd>RFC 8915</dd>
&nbsp;0x31&nbsp;(&quot;ntske/1&quot;) </dl>
</t>
<t>Reference: [[this memo]], <xref target="nts-ke"/></t>
</list>
</t>
</section> </section>
<section numbered="true" toc="default">
<section title="TLS Exporter Labels Registry"> <name>TLS Application-Layer Protocol Negotiation (ALPN) Protocol IDs Reg
istry</name>
<t> <t>
IANA is requested to allocate the following entry in the IANA has allocated the following entry in the
<xref target="RFC5705">TLS Exporter Labels Registry</xref>: "TLS Application-Layer Protocol Negotiation
(ALPN) Protocol IDs" registry <xref target="RFC7301" format="default
"/>:
</t> </t>
<texttable> <dl newline="false" spacing="normal">
<ttcol>Value</ttcol> <dt>Protocol:</dt> <dd>Network Time Security Key Establishment, versio
<ttcol>DTLS-OK</ttcol> n 1</dd>
<ttcol>Recommended</ttcol> <dt>Identification Sequence:</dt> <dd>0x6E 0x74 0x73 0x6B 0x65 0x2F 0x
<ttcol>Reference</ttcol> 31 ("ntske/1")</dd>
<ttcol>Note</ttcol> <dt>Reference:</dt><dd>RFC 8915, <xref target="nts-ke" format="default
"/></dd>
<c>EXPORTER-network- time-security</c> </dl>
<c>Y</c>
<c>Y</c>
<c>[[this memo]], <xref target="key-extraction"/></c>
<c/>
</texttable>
</section> </section>
<section numbered="true" toc="default">
<section title="NTP Kiss-o'-Death Codes Registry"> <name>TLS Exporter Labels Registry</name>
<t> <t>
IANA is requested to allocate the following entry in the IANA has allocated the following entry in the
<xref target="RFC5905">registry of NTP Kiss-o'-Death Codes</xref>: <xref target="RFC5705" format="default">TLS Exporter Labels registry</
xref>:
</t> </t>
<texttable>
<ttcol>Code</ttcol>
<ttcol>Meaning</ttcol>
<ttcol>Reference</ttcol>
<c>NTSN</c> <table align="center">
<c>Network Time Security (NTS) negative-acknowledgment (NAK)</c> <thead>
<c>[[this memo]], <xref target="protocol-details"/></c> <tr>
</texttable> <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="d
efault"/></td>
<td align="left"/>
</tr>
</tbody>
</table>
</section> </section>
<section numbered="true" toc="default">
<section title="NTP Extension Field Types Registry"> <name>NTP Kiss-o'-Death Codes Registry</name>
<t> <t>
IANA is requested to allocate the following entries in the IANA has allocated the following entry in the
<xref target="RFC5905">NTP Extension Field Types registry</xref>: "NTP Kiss-o'-Death Codes"
registry <xref target="RFC5905" format="default"/>:
</t> </t>
<texttable> <table align="center">
<ttcol>Field Type</ttcol> <thead>
<ttcol>Meaning</ttcol> <tr>
<ttcol>Reference</ttcol> <th align="left">Code</th>
<th align="left">Meaning</th>
<c>[[TBD2]]</c> <th align="left">Reference</th>
<c>Unique Identifier</c> </tr>
<c>[[this memo]], </thead>
<xref target="unique-identifier-extension-field"/></c> <tbody>
<tr>
<c>[[TBD3]]</c> <td align="left">NTSN</td>
<c>NTS Cookie</c> <td align="left">Network Time Security (NTS) negative-acknowledgme
<c>[[this memo]], <xref target="nts-cookie-extension-field"/></c> nt (NAK)</td>
<td align="left">RFC 8915, <xref target="protocol-details" format=
<c>[[TBD4]]</c> "default"/></td>
<c>NTS Cookie Placeholder</c> </tr>
<c>[[this memo]], </tbody>
<xref target="nts-cookie-placeholder-extension-field"/></c> </table>
</section>
<section numbered="true" toc="default">
<c>[[TBD5]]</c> <name>NTP Extension Field Types Registry</name>
<c>NTS Authenticator and Encrypted Extension Fields</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> <t>
[[RFC EDITOR: Replace all instances of [[TBD2]], [[TBD3]], [[TBD4]], a IANA has allocated the following entries in the
nd "NTP Extension Field Types" registry <xref target="RFC5905" format="de
[[TBD5]] in this document with the respective IANA assignments.]] fault"/>:
</t> </t>
<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-fiel
d" format="default"/></td>
</tr>
<tr>
<td align="left">0x0304</td>
<td align="left">NTS Cookie Placeholder</td>
<td align="left">RFC 8915,
<xref target="nts-cookie-placeholder-extension-field" format="defaul
t"/></td>
</tr>
<tr>
<td align="left">0x0404</td>
<td align="left">NTS Authenticator and Encrypted Extension Fields<
/td>
<td align="left">RFC 8915, <xref target="nts-aeef-extension-field"
format="default"/></td>
</tr>
</tbody>
</table>
</section> </section>
<section numbered="true" toc="default">
<section title="Network Time Security Key Establishment Record Types Regis <name>Network Time Security Key Establishment Record Types Registry</nam
try"> e>
<t> <t>
IANA is requested to create a new registry entitled IANA has created a new registry entitled
&quot;Network Time Security Key Establishment Record Types&quot;. "Network Time Security Key Establishment Record Types".
Entries SHALL have the following fields: Entries have the following fields:
<list> </t>
<t> <dl newline="false" spacing="normal">
Record Type Number (REQUIRED): An integer in the range <dt>Record Type Number (<bcp14>REQUIRED</bcp14>):</dt> <dd>An integer
0&ndash;32767 inclusive. in the range
</t> 0-32767 inclusive.
<t> </dd>
Description (REQUIRED): A short text description of the purpose of <dt>Description (<bcp14>REQUIRED</bcp14>):</dt> <dd>A short text descr
iption of the purpose of
the field. the field.
</t> </dd>
<t> <dt>Reference (<bcp14>REQUIRED</bcp14>):</dt> <dd>A reference to a doc
Reference (REQUIRED): A reference to a document specifying the ument specifying the
semantics of the record. semantics of the record.
</t> </dd>
</list> </dl>
</t>
<t> <t>
The policy for allocation of new entries in this registry SHALL vary The registration policy varies by Record Type Number, as follows:
by the Record Type Number, as follows:
<list>
<t>0&ndash;1023: IETF Review</t>
<t>1024&ndash;16383: Specification Required</t>
<t>16384&ndash;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> <t>
The initial contents of this registry SHALL be as follows: The initial contents of this registry are as follows:
</t> </t>
<texttable>
<ttcol>Record Type Number</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>NTS Next Protocol Negotiation</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>AEAD Algorithm Negotiation</c>
<c>[[this memo]], <xref target="aead-algorithm-negotiation"/></c>
<c>5</c>
<c>New Cookie for NTPv4</c>
<c>[[this memo]], <xref target="new-cookie-for-ntpv4"/></c>
<c>6</c>
<c>NTPv4 Server Negotiation</c>
<c>[[this memo]], <xref target="ntp-server-negotiation"/></c>
<c>7</c> <table align="center">
<c>NTPv4 Port Negotiation</c> <thead>
<c>[[this memo]], <xref target="ntp-port-negotiation"/></c> <tr>
<th align="left">Record Type Number</th>
<c>16384&ndash;32767</c> <th align="left">Description</th>
<c>Reserved for Private &amp; Experimental Use</c> <th align="left">Reference</th>
<c>[[this memo]]</c> </tr>
</texttable> </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="d
efault"/></td>
</tr>
<tr>
<td align="left">1</td>
<td align="left">NTS Next Protocol Negotiation</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="defaul
t"/></td>
</tr>
<tr>
<td align="left">3</td>
<td align="left">Warning</td>
<td align="left">RFC 8915, <xref target="nts-warning" format="defa
ult"/></td>
</tr>
<tr>
<td align="left">4</td>
<td align="left">AEAD Algorithm Negotiation</td>
<td align="left">RFC 8915, <xref target="aead-algorithm-negotiatio
n" format="default"/></td>
</tr>
<tr>
<td align="left">5</td>
<td align="left">New Cookie for NTPv4</td>
<td align="left">RFC 8915, <xref target="new-cookie-for-ntpv4" for
mat="default"/></td>
</tr>
<tr>
<td align="left">6</td>
<td align="left">NTPv4 Server Negotiation</td>
<td align="left">RFC 8915, <xref target="ntp-server-negotiation" f
ormat="default"/></td>
</tr>
<tr>
<td align="left">7</td>
<td align="left">NTPv4 Port Negotiation</td>
<td align="left">RFC 8915, <xref target="ntp-port-negotiation" for
mat="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 Experimental Use</td>
<td align="left">RFC 8915</td>
</tr>
</tbody>
</table>
</section> </section>
<section numbered="true" anchor="iana-nts-next-protocols" toc="default">
<section title="Network Time Security Next Protocols Registry"> <name>Network Time Security Next Protocols Registry</name>
<t> <t>
IANA is requested to create a new registry entitled IANA has created a new registry entitled
&quot;Network Time Security Next Protocols&quot;. Entries SHALL have "Network Time Security Next Protocols". Entries have
the following fields: the following fields:
<list> </t>
<t> <dl newline="false" spacing="normal">
Protocol ID (REQUIRED): An integer in the range 0-65535 inclusive, <dt>Protocol ID (<bcp14>REQUIRED</bcp14>):</dt> <dd>An integer in the
range 0-65535 inclusive,
functioning as an identifier. functioning as an identifier.
</t> </dd>
<t> <dt>Protocol Name (<bcp14>REQUIRED</bcp14>):</dt> <dd>A short text str
Protocol Name (REQUIRED): A short text string naming the protocol ing naming the protocol
being identified. being identified.
</t> </dd>
<t> <dt>Reference (<bcp14>REQUIRED</bcp14>):</dt> <dd> A reference to a re
Reference (REQUIRED): A reference to a relevant specification levant specification
document. document.
</t> </dd>
</list> </dl>
The policy for allocation of new entries in these registries <t>
SHALL vary by their Protocol ID, as follows: The registration policy varies by Protocol ID, as follows:
<list>
<t>0&ndash;1023: IETF Review</t>
<t>1024&ndash;32767: Specification Required</t>
<t>32768&ndash;65535: Private and Experimental Use</t>
</list>
</t> </t>
<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> <t>
The initial contents of this registry SHALL be as follows: The initial contents of this registry are as follows:
</t> </t>
<texttable>
<ttcol>Protocol ID</ttcol>
<ttcol>Protocol Name</ttcol>
<ttcol>Reference</ttcol>
<c>0</c> <table align="center">
<c>Network Time Protocol version 4 (NTPv4)</c> <thead>
<c>[[this memo]]</c> <tr>
<th align="left">Protocol ID</th>
<c>32768-65535</c> <th align="left">Protocol Name</th>
<c>Reserved for Private or Experimental Use</c> <th align="left">Reference</th>
<c>Reserved by [[this memo]]</c> </tr>
</texttable> </thead>
<tbody>
<tr>
<td align="left">0</td>
<td align="left">Network Time Protocol version 4 (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>
<section numbered="true" toc="default">
<section title="Network Time Security Error and Warning Codes Registries"> <name>Network Time Security Error and Warning Codes Registries</name>
<t> <t>
IANA is requested to create two new registries entitled IANA has created two new registries entitled
&quot;Network Time Security Error Codes&quot; and "Network Time Security Error Codes" and
&quot;Network Time Security Warning Codes&quot;. Entries in each SHALL "Network Time Security Warning Codes". Entries in each
have the following fields: 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&ndash;1023: IETF Review</t>
<t>1024&ndash;32767: Specification Required</t>
<t>32768&ndash;65535: Private and Experimental Use</t>
</list>
</t> </t>
<dl newline="false" spacing="normal">
<dt>Number (<bcp14>REQUIRED</bcp14>):</dt> <dd>An integer in the
range 0-65535 inclusive</dd>
<dt>Description (<bcp14>REQUIRED</bcp14>):</dt> <dd>A short text descr
iption of the
condition.</dd>
<dt>Reference (<bcp14>REQUIRED</bcp14>):</dt> <dd>A reference to a r
elevant specification
document.</dd>
</dl>
<t> <t>
The initial contents of the Network Time Security Error Codes Registry The registration policy varies by Number, as follows:
SHALL be as follows:
</t> </t>
<texttable> <dl newline="false" spacing="normal">
<ttcol>Number</ttcol> <dt>0-1023:</dt> <dd>IETF Review</dd>
<ttcol>Description</ttcol> <dt>1024-32767:</dt> <dd>Specification Required</dd>
<ttcol>Reference</ttcol> <dt>32768-65535:</dt> <dd>Private or Experimental Use</dd>
</dl>
<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> <t>
The Network Time Security Warning Codes Registry SHALL The initial contents of the "Network Time Security Error Codes" regist
initially be empty except for the reserved range, i.e.: ry
</t> are as follows:
<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 PUBLICATIO
N">
<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 in this section is intended to assist the
IETF in its decision processes in progressing drafts to RFCs. Please
note that the listing of any individual implementation here does not
imply endorsement by the IETF. Furthermore, no effort has been spent to
verify the information presented here that was supplied by IETF
contributors. This is not intended as, and must not be construed to be,
a catalog of available implementations or their features. Readers are
advised to note that other implementations may exist.</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 information as they 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. </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 4 pairwise interoperability of
the NTS key establishment protocol and exchange
of NTS protected NTP messages have been verified successfully.
The implementation 2 was able to successfully perform the key establishm
ent
protocol against the server side of the implementation 5.
</t> </t>
<t>These tests successfully <table align="center">
demonstrate that there are at least four running implementations <thead>
of this draft which are able to interoperate. <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="defaul
t"/></td>
</tr>
<tr>
<td align="left">1</td>
<td align="left">Bad Request</td>
<td align="left">RFC 8915, <xref target="nts-error" format="defaul
t"/></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="defaul
t"/></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> </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>
</section> </section>
<section title="Security Considerations"> <section numbered="true" toc="default">
<section title="Protected Modes"> <name>Security Considerations</name>
<section numbered="true" toc="default">
<name>Protected Modes</name>
<t> <t>
NTP provides many different operating modes in order to support differ ent NTP provides many different operating modes in order to support differ ent
network topologies and to adapt to various requirements. This memo onl y network topologies and to adapt to various requirements. This memo onl y
specifies NTS for NTP modes 3 (client) and 4 (server) (see specifies NTS for NTP modes 3 (client) and 4 (server) (see
<xref target="sec-protocol-overview" />). The best current practice fo r <xref target="sec-protocol-overview" format="default"/>). The best cur rent practice for
authenticating the other NTP modes is using the symmetric message authenticating the other NTP modes is using the symmetric message
authentication code feature as described in authentication code feature as described in
<xref target="RFC5905">RFC 5905</xref> and <xref target="RFC5905" format="default">RFC 5905</xref> and
<xref target="RFC8573">RFC 8573</xref>. <xref target="RFC8573" format="default">RFC 8573</xref>.
</t> </t>
</section> </section>
<section title="Cookie Encryption Key Compromise"> <section numbered="true" toc="default">
<name>Cookie Encryption Key Compromise</name>
<t> <t>
If the suggested format If the suggested format
for NTS cookies in <xref target="suggested-format-for-nts-cookies" /> for NTS cookies in <xref target="suggested-format-for-nts-cookies" for
of this draft is used, an attacker who has gained mat="default"/>
access to the secret cookie encryption key `K` can impersonate of this document is used, an attacker who has gained
access to the secret cookie encryption key 'K' can impersonate
the NTP server, including generating new cookies. the NTP server, including generating new cookies.
NTP and NTS-KE server operators SHOULD remove compromised keys as soon NTP and NTS-KE server operators <bcp14>SHOULD</bcp14> remove compromis ed keys as soon
as the compromise is discovered. This will cause the NTP servers to as the compromise is discovered. This will cause the NTP servers to
respond with NTS NAK, thus forcing key renegotiation. Note that this respond with NTS NAK, thus forcing key renegotiation. Note that this
measure does not protect against MITM attacks where the attacker has a ccess measure does not protect against MITM attacks where the attacker has a ccess
to a compromised cookie encryption key. If another cookie scheme is us ed, to a compromised cookie encryption key. If another cookie scheme is us ed,
there are likely similar considerations for that particular scheme. there are likely similar considerations for that particular scheme.
</t> </t>
</section> </section>
<section title="Sensitivity to DDoS Attacks"> <section numbered="true" toc="default">
<name>Sensitivity to DDoS Attacks</name>
<t> <t>
The introduction of NTS brings with it the introduction of asymmetric The introduction of NTS brings with it the introduction of asymmetric
cryptography to NTP. Asymmetric cryptography is necessary for initial cryptography to NTP. Asymmetric cryptography is necessary for initial
server authentication and AEAD key extraction. Asymmetric server authentication and AEAD key extraction. Asymmetric
cryptosystems are generally orders of magnitude slower than their cryptosystems are generally orders of magnitude slower than their
symmetric counterparts. This makes it much harder to build systems symmetric counterparts. This makes it much harder to build systems
that can serve requests at a rate corresponding to the full line speed 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 of the network connection. This, in turn, opens up a new possibility
for DDoS attacks on NTP services. for DDoS attacks on NTP services.
</t> </t>
skipping to change at line 1954 skipping to change at line 1805
phase of the protocol. Since the protocol design enables separation of 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 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 server separated from the NTP service it supports will not affect NTP
users that have already performed initial authentication, AEAD key users that have already performed initial authentication, AEAD key
extraction, and cookie exchange. extraction, and cookie exchange.
</t> </t>
<t> <t>
NTS users should also consider that they are not fully protected NTS users should also consider that they are not fully protected
against DoS attacks by on-path adversaries. In addition to dropping against DoS attacks by on-path adversaries. In addition to dropping
packets and attacks such as those described in packets and attacks such as those described in
<xref target="DelayAttack"/>, an on-path attacker can send spoofed <xref target="DelayAttack" format="default"/>, an on-path attacker can
kiss-o'-death replies, which are not authenticated, in response to NTP send spoofed
Kiss-o'-Death replies, which are not authenticated, in response to NTP
requests. This could result in significantly increased load on the requests. This could result in significantly increased load on the
NTS-KE server. Implementers have to weigh the user's need for NTS-KE server. Implementers have to weigh the user's need for
unlinkability against the added resilience that comes with cookie unlinkability against the added resilience that comes with cookie
reuse in cases of NTS-KE server unavailability. reuse in cases of NTS-KE server unavailability.
</t> </t>
</section> </section>
<section numbered="true" toc="default">
<section title="Avoiding DDoS Amplification"> <name>Avoiding DDoS Amplification</name>
<t> <t>
Certain non-standard and/or deprecated features of the Network Time Certain nonstandard and/or deprecated features of the Network Time
Protocol enable clients to send a request to a server which causes the Protocol enable clients to send a request to a server that causes the
server to send a response much larger than the request. Servers which server to send a response much larger than the request. Servers that
enable these features can be abused in order to amplify traffic volume enable these features can be abused in order to amplify traffic volume
in DDoS attacks by sending them a request with a spoofed source IP. In in DDoS attacks by sending them a request with a spoofed source IP add
recent years, attacks of this nature have become an endemic nuisance. ress.
In recent years, attacks of this nature have become an endemic nuisanc
e.
</t> </t>
<t> <t>
NTS is designed to avoid contributing any further to this problem by NTS is designed to avoid contributing any further to this problem by
ensuring that NTS-related extension fields included in server ensuring that NTS-related extension fields included in server
responses will be the same size as the NTS-related extension fields responses will be the same size as the NTS-related extension fields
sent by the client. In particular, this is why the client is required sent by the client. In particular, this is why the client is required
to send a separate and appropriately padded-out NTS Cookie Placeholder to send a separate and appropriately padded-out NTS Cookie Placeholder
extension field for every cookie it wants to get back, rather than extension field for every cookie it wants to get back, rather than
being permitted simply to specify a desired quantity. being permitted simply to specify a desired quantity.
</t> </t>
<t> <t>
Due to the <xref target="RFC7822">RFC 7822</xref> requirement that Due to the <xref target="RFC7822" format="default">RFC 7822</xref> req uirement that
extensions be padded and aligned to four-octet boundaries, response extensions be padded and aligned to four-octet boundaries, response
size may still in some cases exceed request size by up to three size may still in some cases exceed request size by up to three
octets. This is sufficiently inconsequential that we have declined to octets. This is sufficiently inconsequential that we have declined to
address it. address it.
</t> </t>
</section> </section>
<section anchor="sec-cert-verification" numbered="true" toc="default">
<section title="Initial Verification of Server Certificates" <name>Initial Verification of Server Certificates</name>
anchor="sec-cert-verification">
<t> <t>
NTS's security goals are undermined if the client fails to verify that 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 the X.509 certificate chain presented by the NTS-KE server is valid
and rooted in a trusted certificate authority. <xref and rooted in a trusted certificate authority. <xref target="RFC5280"
target="RFC5280">RFC 5280</xref> and <xref target="RFC6125"> RFC format="default">RFC 5280</xref> and <xref target="RFC6125" format="default"> RF
C
6125</xref> specify how such verification is to be performed in 6125</xref> specify how such verification is to be performed in
general. However, the expectation that the client does not yet have a general. However, the expectation that the client does not yet have a
correctly-set system clock at the time of certificate verification correctly-set system clock at the time of certificate verification
presents difficulties with verifying that the certificate is within presents difficulties with verifying that the certificate is within
its validity period, i.e., that the current time lies between the its validity period, i.e., that the current time lies between the
times specified in the certificate's notBefore and notAfter fields. It times specified in the certificate's notBefore and notAfter fields. It
may be operationally necessary in some cases for a client to accept a may be operationally necessary in some cases for a client to accept a
certificate which appears to be expired or not yet valid. While there certificate that appears to be expired or not yet valid. While there
is no perfect solution to this problem, there are several mitigations is no perfect solution to this problem, there are several mitigations
the client can implement to make it more difficult for an adversary to the client can implement to make it more difficult for an adversary to
successfully present an expired certificate: 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 Check whether the system time is in fact unreliable. On systems
with the ntp_adjtime() system call, a return code other than with the ntp_adjtime() system call, a return code other than
TIME_ERROR indicates that some trusted software has already set TIME_ERROR indicates that some trusted software has already set
the time and certificates can be strictly validated. the time and certificates can be strictly validated.
</t> </li>
<t> <li>
Allow the system administrator to specify that certificates should Allow the system administrator to specify that certificates should
*always* be strictly validated. Such a configuration is <em>always</em> be strictly validated. Such a configuration is
appropriate on systems which have a battery-backed clock and which appropriate on systems that have a battery-backed clock or that
can reasonably prompt the user to manually set an can reasonably prompt the user to manually set an
approximately-correct time if it appears to be needed. approximately correct time if it appears to be needed.
</t> </li>
<t> <li>
Once the clock has been synchronized, periodically write the Once the clock has been synchronized, periodically write the
current system time to persistent storage. Do not accept any current system time to persistent storage. Do not accept any
certificate whose notAfter field is earlier than the last recorded certificate whose notAfter field is earlier than the last recorded
time. time.
</t> </li>
<t> <li>
NTP time replies are expected to be consistent with the NTS-KE TLS NTP time replies are expected to be consistent with the NTS-KE TLS
certificate validity period, i.e. time replies received immediatel y after certificate validity period, i.e. time replies received immediatel y after
an NTS-KE handshake are expected to lie within the certificate val idity an NTS-KE handshake are expected to lie within the certificate val idity
period. period.
Implementations are recommended to check that this is the case. Implementations are recommended to check that this is the case.
Performing a new NTS-KE handshake based solely on the fact that th e Performing a new NTS-KE handshake based solely on the fact that th e
certificate used by the NTS-KE server in a previous handshake has expired certificate used by the NTS-KE server in a previous handshake has expired
is normally not necessary. is normally not necessary.
Clients that still wish to do this must take care not to cause an 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 exa mple by inadvertent denial-of-service attack on the NTS-KE server, for exa mple by
picking a random time in the week preceding certificate expiry to perform picking a random time in the week preceding certificate expiry to perform
the new handshake. the new handshake.
</t> </li>
<t> <li>
Use multiple time sources. The ability to pass off an expired Use multiple time sources. The ability to pass off an expired
certificate is only useful to an adversary who has compromised the certificate is only useful to an adversary who has compromised the
corresponding private key. If the adversary has compromised only a corresponding private key. If the adversary has compromised only a
minority of servers, NTP's selection algorithm (<xref minority of servers, NTP's selection algorithm (Section
target="RFC5905">RFC 5905 section 11.2.1</xref>) will protect the <xref target="RFC5905" section="11.2.1" sectionFormat="bare" forma
t="default"/>
of <xref target="RFC5905" format="default">RFC 5905</xref>) will p
rotect the
client from accepting bad time from the adversary-controlled client from accepting bad time from the adversary-controlled
servers. servers.
</t> </li>
</list> </ul>
</t>
</section> </section>
<section anchor="DelayAttack" numbered="true" toc="default">
<section anchor="DelayAttack" title="Delay Attacks"> <name>Delay Attacks</name>
<t> <t>
In a packet delay attack, an adversary with the ability to act as a In a packet delay attack, an adversary with the ability to act as a
man-in-the-middle delays time synchronization packets between client man-in-the-middle delays time synchronization packets between client
and server asymmetrically <xref target="RFC7384"/>. Since NTP's and server asymmetrically <xref target="RFC7384" format="default"/>. S ince NTP's
formula for computing time offset relies on the assumption that formula for computing time offset relies on the assumption that
network latency is roughly symmetrical, this leads to the client to network latency is roughly symmetrical, this leads to the client to
compute an inaccurate value <xref target="Mizrahi"/>. The delay attack compute an inaccurate value <xref target="Mizrahi" format="default"/>. The delay attack
does not reorder or modify the content of the exchanged does not reorder or modify the content of the exchanged
synchronization packets. Therefore, cryptographic means do not provide synchronization packets. Therefore, cryptographic means do not provide
a feasible way to mitigate this attack. However, the maximum error a feasible way to mitigate this attack. However, the maximum error
that an adversary can introduce is bounded by half of the round trip that an adversary can introduce is bounded by half of the round-trip
delay. delay.
</t> </t>
<t> <t>
<xref target="RFC5905">RFC 5905</xref> specifies a parameter called <xref target="RFC5905" format="default">RFC 5905</xref> specifies a pa
MAXDIST which denotes the maximum round-trip latency (including not rameter called
MAXDIST, which denotes the maximum round-trip latency (including not
only the immediate round trip between client and server, but the whole only the immediate round trip between client and server, but the whole
distance back to the reference clock as reported in the Root Delay distance back to the reference clock as reported in the Root Delay
field) that a client will tolerate before concluding that the server field) that a client will tolerate before concluding that the server
is unsuitable for synchronization. The standard value for MAXDIST is is unsuitable for synchronization. The standard value for MAXDIST is
one second, although some implementations use larger values. Whatever one second, although some implementations use larger values. Whatever
value a client chooses, the maximum error which can be introduced by a value a client chooses, the maximum error that can be introduced by a
delay attack is MAXDIST/2. delay attack is MAXDIST/2.
</t> </t>
<t> <t>
Usage of multiple time sources, or multiple network paths to a given Usage of multiple time sources, or multiple network paths to a given
time source <xref target="Shpiner"/>, may also serve to mitigate delay time source <xref target="Shpiner" format="default"/>, may also serve to mitigate delay
attacks if the adversary is in control of only some of the paths. attacks if the adversary is in control of only some of the paths.
</t> </t>
</section> </section>
<section title="NTS Stripping"> <section numbered="true" toc="default">
<name>NTS Stripping</name>
<t> <t>
Implementers must be aware of the possibility of "NTS stripping" Implementers must be aware of the possibility of "NTS stripping"
attacks, where an attacker attempts to trick clients into reverting to plain attacks, where an attacker attempts to trick clients into reverting to plain
NTP. Naive client implementations might, for example, revert NTP. Naive client implementations might, for example, revert
automatically to plain NTP if the NTS-KE handshake fails. A man-in-the -middle 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 attacker can easily cause this to happen. Even clients that already
hold valid cookies can be vulnerable, since an attacker can force a 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 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 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. NTS-KE handshake can also be the first step in more advanced attacks.
</t> </t>
<t> <t>
For the reasons described here, implementations SHOULD NOT revert For the reasons described here, implementations <bcp14>SHOULD NOT</bcp 14> revert
from NTS-protected to unprotected NTP with any server without from NTS-protected to unprotected NTP with any server without
explicit user action. explicit user action.
</t> </t>
</section> </section>
</section> </section>
<section numbered="true" toc="default">
<section title="Privacy Considerations"> <name>Privacy Considerations</name>
<section title="Unlinkability" anchor="Unlinkability"> <section anchor="Unlinkability" numbered="true" toc="default">
<name>Unlinkability</name>
<t>Unlinkability prevents a device from being tracked when it changes <t>Unlinkability prevents a device from being tracked when it changes
network addresses (e.g. because said device moved between different network addresses (e.g., because said device moved between different
networks). In other words, unlinkability thwarts an attacker that networks). In other words, unlinkability thwarts an attacker that
seeks to link a new network address used by a device with a network seeks to link a new network address used by a device with a network
address that it was formerly using, because of recognizable data that address that it was formerly using because of recognizable data that
the device persistently sends as part of an NTS-secured NTP the device persistently sends as part of an NTS-secured NTP
association. This is the justification for continually supplying the association. This is the justification for continually supplying the
client with fresh cookies, so that a cookie never represents client with fresh cookies, so that a cookie never represents
recognizable data in the sense outlined above. </t> recognizable data in the sense outlined above. </t>
<t>NTS's unlinkability objective is merely to not leak any additional <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 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. not rectify legacy linkability issues that are already present in NTP.
Thus, a client that requires unlinkability must also minimize Thus, a client that requires unlinkability must also minimize
information transmitted in a client query (mode 3) packet as described information transmitted in a client query (mode 3) packet as described
in the draft <xref target="I-D.ietf-ntp-data-minimization"/>. in the document <xref target="I-D.ietf-ntp-data-minimization" format="de
fault">
NTP Client Data Minimization</xref>.
</t> </t>
<t>The unlinkability objective only holds for time synchronization <t>The unlinkability objective only holds for time synchronization
traffic, as opposed to key establishment traffic. This implies that it traffic, as opposed to key establishment traffic. This implies that it
cannot be guaranteed for devices that function not only as time cannot be guaranteed for devices that function not only as time
clients, but also as time servers (because the latter can be externally clients, but also as time servers (because the latter can be externally
triggered to send linkable data, such as the TLS certificate).</t> 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 <t>It should also be noted that it could be possible to link devices
that operate as time servers from their time synchronization traffic, that operate as time servers from their time synchronization traffic,
using information exposed in (mode 4) server response packets (e.g. using information exposed in (mode 4) server response packets (e.g.
reference ID, reference time, stratum, poll).&nbsp; Also, devices that reference ID, reference time, stratum, poll). Also, devices that
respond to NTP control queries could be linked using the information respond to NTP control queries could be linked using the information
revealed by control queries. </t> revealed by control queries. </t>
<t>Note that the unlinkability objective does not prevent a client devic e <t>Note that the unlinkability objective does not prevent a client devic e
to be tracked by its time servers.</t> from being tracked by its time servers.</t>
</section> </section>
<section title="Confidentiality"> <section numbered="true" toc="default">
<t> <name>Confidentiality</name>
<t>
NTS does not protect the confidentiality of information in NTS does not protect the confidentiality of information in
NTP's header fields. When clients implement <xref NTP's header fields. When clients implement
target="I-D.ietf-ntp-data-minimization"/>, client packet <xref target="I-D.ietf-ntp-data-minimization" format="default">
headers do not contain any information which the client NTP Client Data Minimization</xref>, client packet
headers do not contain any information that the client
could conceivably wish to keep secret: one field is random, could conceivably wish to keep secret: one field is random,
and all others are fixed. Information in server packet and all others are fixed. Information in server packet
headers is likewise public: the origin timestamp is copied headers is likewise public: the origin timestamp is copied
from the client's (random) transmit timestamp, and all other from the client's (random) transmit timestamp, and all other
fields are set the same regardless of the identity of the fields are set the same regardless of the identity of the
client making the request. client making the request.
</t> </t>
<t> <t>
Future extension fields could hypothetically contain Future extension fields could hypothetically contain
sensitive information, in which case NTS provides a sensitive information, in which case NTS provides a
mechanism for encrypting them. mechanism for encrypting them.
</t> </t>
</section> </section>
</section>
<section anchor="Acknowledgements" title="Acknowledgements">
<t>The authors would like to thank Richard Barnes, Steven
Bellovin, Scott Fluhrer, Patrik F&auml;ltstr&ouml;m (Faltstrom),
Sharon Goldberg, Russ Housley, Benjamin Kaduk, Suresh Krishnan, Mirja
K&uuml;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&ouml;mbergsson (Strombergsson), Martin
Thomson, &Eacute;ric (Eric) Vyncke, Richard Welty, Christer Weinigel, and
Magnus Westerlund for contributions to this document and comments on the
design of NTS.</t>
</section> </section>
</middle> </middle>
<back> <back>
<references title="Normative References">
<reference anchor="IANA-AEAD" target="https://www.iana.org/assignments/aea
d-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'?>
</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'?>
<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"> <displayreference target="I-D.ietf-ntp-data-minimization" to="NTP-DATA-MIN"/>
<organization abbrev=""/>
</author>
<date day="" month="September" year="2012"/> <references>
</front> <name>References</name>
<references>
<name>Normative References</name>
<seriesInfo name="in Proceedings of" <reference anchor="IANA-AEAD" target="https://www.iana.org/assignments/a
value="Precision Clock Synchronization for Measurement Contr ead-parameters/">
ol and Communication, ISPCS 2012, pp. 1-6, DOI&nbsp;10.1109/ISPCS.2012.6336612"/ <front>
> <title>
</reference> Authenticated Encryption with Associated Data (AEAD) Parameters
</title>
<author>
<organization>IANA</organization>
</author>
</front>
</reference>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
ence.RFC.0020.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
ence.RFC.2119.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
ence.RFC.4291.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
ence.RFC.5116.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
ence.RFC.5280.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
ence.RFC.5297.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
ence.RFC.5705.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
ence.RFC.5869.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
ence.RFC.5890.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
ence.RFC.5905.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
ence.RFC.6125.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
ence.RFC.6335.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
ence.RFC.6874.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
ence.RFC.7301.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
ence.RFC.7525.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
ence.RFC.7822.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
ence.RFC.8174.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
ence.RFC.8446.xml"/>
</references>
<references>
<name>Informative References</name>
<reference anchor="Shpiner"> <xi:include href="https://datatracker.ietf.org/doc/bibxml3/reference.I-D
<front> .draft-ietf-ntp-data-minimization.xml"/>
<title>Multi-path Time Protocols</title>
<author fullname="Alexander Shpiner" initials="A" surname="Shpiner"> <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
<organization/> ence.RFC.4086.xml"/>
</author> <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
<author fullname="Yoram Revah" initials="Y" surname="Revah"> ence.RFC.5077.xml"/>
<organization/> <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
</author> ence.RFC.7384.xml"/>
<author fullname="Tal Mizrahi" initials="T" surname="Mizrahi"> <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/refer
<organization/> ence.RFC.8573.xml"/>
</author>
<date month="September" year="2013"/> <reference anchor="Mizrahi" target="">
</front> <front>
<title>A game theoretic analysis of delay attacks against time
synchronization protocols</title>
<author fullname="Tal Mizrahi" initials="T" surname="Mizrahi">
<organization/>
</author>
<date day="" month="September" year="2012"/>
</front>
<seriesInfo name="DOI" value="10.1109/ISPCS.2012.6336612"/>
<refcontent>2012 IEEE International Symposium on Precision Clock Synch
ronization
for Measurement, Control and Communication Proceedings, pp
. 1-6</refcontent>
</reference>
<seriesInfo name="in Proceedings of" <reference anchor="Shpiner">
value="IEEE International Symposium on Precision Clock Synch <front>
ronization for Measurement, Control and Communication (ISPCS), DOI&nbsp;10.1109/ <title>Multi-path Time Protocols</title>
ISPCS.2013.6644754"/> <author fullname="Alexander Shpiner" initials="A" surname="Shpiner">
</reference> <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>
<seriesInfo name="DOI" value="10.1109/ISPCS.2013.6644754"/>
<refcontent>2013 IEEE International Symposium on Precision Clock Synch
ronization
for Measurement, Control and Communication (ISPCS) Proceed
ings, pp. 1-6</refcontent>
</reference>
</references>
</references> </references>
<section title="Terms and Abbreviations"> <section anchor="Acknowledgments" numbered="false" toc="default">
<t> <name>Acknowledgments</name>
<list style="hanging"> <t>The authors would like to thank <contact fullname="Richard Barnes"/>,
<t hangText="AEAD "><xref target="RFC5116">Authenticated Encryption <contact fullname="Steven Bellovin"/>, <contact fullname="Scott Fluhrer"/>
with Associated Data</xref></t> ,
<t hangText="ALPN "><xref target="RFC7301">Application-Layer Protoco <contact fullname="Patrik Fältström"/>,
l <contact fullname="Sharon Goldberg"/>, <contact fullname="Russ Housley"/>,
Negotiation</xref></t> <contact fullname="Benjamin Kaduk"/>, <contact fullname="Suresh Krishnan"/
<t hangText="C2S ">Client-to-server</t> >,
<t hangText="DoS ">Denial-of-Service</t> <contact fullname="Mirja Kühlewind"/>, <contact fullname="Martin Langer"/>
<t hangText="DDoS ">Distributed Denial-of-Service</t> ,
<t hangText="EF "><xref target="RFC5905">Extension Field</xref></t <contact fullname="Barry Leiba"/>, <contact fullname="Miroslav Lichvar"/>,
> <contact fullname="Aanchal Malhotra"/>, <contact fullname="Danny Mayer"/>,
<t hangText="HKDF "><xref target="RFC5869">Hashed Message <contact fullname="Dave Mills"/>, <contact fullname="Sandra Murphy"/>,
Authentication Code-based Key Derivation Function</xref></t> <contact fullname="Hal Murray"/>, <contact fullname="Karen O'Donoghue"/>,
<t hangText="KoD "><xref target="RFC5905">Kiss-o'-Death</xref></t> <contact fullname="Eric K. Rescorla"/>, <contact fullname="Kurt Roeckx"/>,
<t hangText="NTP "><xref target="RFC5905">Network Time Protocol <contact fullname="Stephen Roettger"/>, <contact fullname="Dan Romascanu"/
</xref></t> >,
<t hangText="NTS ">Network Time Security</t> <contact fullname="Kyle Rose"/>, <contact fullname="Rich Salz"/>,
<t hangText="NTS NAK">NTS negative-acknowledgment</t> <contact fullname="Brian Sniffen"/>, <contact fullname="Susan Sons"/>,
<t hangText="NTS-KE ">Network Time Security Key Establishment</t> <contact fullname="Douglas Stebila"/>, <contact fullname="Harlan Stenn"/>,
<t hangText="S2C ">Server-to-client</t> <contact fullname="Joachim Strömbergsson"/>,
<t hangText="TLS "><xref target="RFC8446">Transport Layer <contact fullname="Martin Thomson"/>, <contact fullname="Éric Vyncke"/>,
Security</xref></t> <contact fullname="Richard Welty"/>, <contact fullname="Christer Weinigel"
</list> />, and
</t> <contact fullname="Magnus Westerlund"/> for contributions to this document
and comments on the design of NTS.</t>
</section> </section>
</back> </back>
</rfc> </rfc>
 End of changes. 370 change blocks. 
1309 lines changed or deleted 1364 lines changed or added

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