<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" category="std" consensus="true" docName="draft-ietf-ntp-using-nts-for-ntp-28" indexInclude="true" ipr="trust200902" number="8915" prepTime="2020-09-30T22:27:10" scripts="Common,Latin" sortRefs="true" submissionType="IETF" symRefs="true" tocDepth="3" tocInclude="true" xml:lang="en">
  <link href="https://datatracker.ietf.org/doc/draft-ietf-ntp-using-nts-for-ntp-28" rel="prev"/>
  <link href="https://dx.doi.org/10.17487/rfc8915" rel="alternate"/>
  <link href="urn:issn:2070-1721" rel="alternate"/>
  <front>
    <title abbrev="Network Time Security for NTP">Network Time Security for the Network Time Protocol</title>
    <seriesInfo name="RFC" value="8915" stream="IETF"/>
    <author fullname="Daniel Fox Franke" initials="D." surname="Franke">
      <organization abbrev="Akamai" showOnFrontPage="true">Akamai Technologies</organization>
      <address>
        <postal>
          <street>145 Broadway</street>
          <city>Cambridge</city>
          <region>MA</region>
          <code>02142</code>
          <country>United States of America</country>
        </postal>
        <email>dafranke@akamai.com</email>
      </address>
    </author>
    <author fullname="Dieter Sibold" initials="D." surname="Sibold">
      <organization abbrev="PTB" showOnFrontPage="true">Physikalisch-Technische Bundesanstalt</organization>
      <address>
        <postal>
          <street>Bundesallee 100</street>
          <city>Braunschweig</city>
          <code>D-38116</code>
          <country>Germany</country>
        </postal>
        <phone>+49-(0)531-592-8462</phone>
        <email>dieter.sibold@ptb.de</email>
      </address>
    </author>
    <author fullname="Kristof Teichel" initials="K." surname="Teichel">
      <organization abbrev="PTB" showOnFrontPage="true">Physikalisch-Technische Bundesanstalt</organization>
      <address>
        <postal>
          <street>Bundesallee 100</street>
          <city>Braunschweig</city>
          <code>D-38116</code>
          <country>Germany</country>
        </postal>
        <phone>+49-(0)531-592-4471</phone>
        <email>kristof.teichel@ptb.de</email>
        <uri/>
      </address>
    </author>
    <author fullname="Marcus Dansarie" initials="M." surname="Dansarie">
      <address>
        <postal>
          <country>Sweden</country>
        </postal>
        <email>marcus@dansarie.se</email>
        <uri>https://orcid.org/0000-0001-9246-0263</uri>
      </address>
    </author>
    <author fullname="Ragnar Sundblad" initials="R." surname="Sundblad">
      <organization showOnFrontPage="true">Netnod</organization>
      <address>
        <postal>
          <country>Sweden</country>
        </postal>
        <email>ragge@netnod.se</email>
      </address>
    </author>
    <date month="09" year="2020"/>
    <area>Internet Area</area>
    <workgroup>NTP Working Group</workgroup>
    <keyword>Integrity</keyword>
    <keyword>Authentication</keyword>
    <keyword>NTP</keyword>
    <keyword>Security</keyword>
    <abstract pn="section-abstract">
      <t indent="0" pn="section-abstract-1">
        This memo specifies Network Time Security (NTS), a mechanism
        for using Transport Layer Security (TLS) and Authenticated
        Encryption with Associated Data (AEAD) to provide
        cryptographic security for the client-server mode of the
        Network Time Protocol (NTP).
      </t>
      <t indent="0" pn="section-abstract-2">
        NTS is structured as a suite of two loosely coupled sub-protocols.
        The first (NTS Key Establishment (NTS-KE)) handles initial authentication and key
        establishment over TLS. The second (NTS Extension Fields for NTPv4) handles encryption and
        authentication during NTP time synchronization via extension fields in the
        NTP packets, and holds all required state only on the
        client via opaque cookies.
      </t>
    </abstract>
    <boilerplate>
      <section anchor="status-of-memo" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.1">
        <name slugifiedName="name-status-of-this-memo">Status of This Memo</name>
        <t indent="0" pn="section-boilerplate.1-1">
            This is an Internet Standards Track document.
        </t>
        <t indent="0" pn="section-boilerplate.1-2">
            This document is a product of the Internet Engineering Task Force
            (IETF).  It represents the consensus of the IETF community.  It has
            received public review and has been approved for publication by
            the Internet Engineering Steering Group (IESG).  Further
            information on Internet Standards is available in Section 2 of 
            RFC 7841.
        </t>
        <t indent="0" pn="section-boilerplate.1-3">
            Information about the current status of this document, any
            errata, and how to provide feedback on it may be obtained at
            <eref target="https://www.rfc-editor.org/info/rfc8915" brackets="none"/>.
        </t>
      </section>
      <section anchor="copyright" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.2">
        <name slugifiedName="name-copyright-notice">Copyright Notice</name>
        <t indent="0" pn="section-boilerplate.2-1">
            Copyright (c) 2020 IETF Trust and the persons identified as the
            document authors. All rights reserved.
        </t>
        <t indent="0" pn="section-boilerplate.2-2">
            This document is subject to BCP 78 and the IETF Trust's Legal
            Provisions Relating to IETF Documents
            (<eref target="https://trustee.ietf.org/license-info" brackets="none"/>) in effect on the date of
            publication of this document. Please review these documents
            carefully, as they describe your rights and restrictions with
            respect to this document. Code Components extracted from this
            document must include Simplified BSD License text as described in
            Section 4.e of the Trust Legal Provisions and are provided without
            warranty as described in the Simplified BSD License.
        </t>
      </section>
    </boilerplate>
    <toc>
      <section anchor="toc" numbered="false" removeInRFC="false" toc="exclude" pn="section-toc.1">
        <name slugifiedName="name-table-of-contents">Table of Contents</name>
        <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1">
          <li pn="section-toc.1-1.1">
            <t indent="0" pn="section-toc.1-1.1.1"><xref derivedContent="1" format="counter" sectionFormat="of" target="section-1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-introduction">Introduction</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.1.2">
              <li pn="section-toc.1-1.1.2.1">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.1.1"><xref derivedContent="1.1" format="counter" sectionFormat="of" target="section-1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-objectives">Objectives</xref></t>
              </li>
              <li pn="section-toc.1-1.1.2.2">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.2.1"><xref derivedContent="1.2" format="counter" sectionFormat="of" target="section-1.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-terms-and-abbreviations">Terms and Abbreviations</xref></t>
              </li>
              <li pn="section-toc.1-1.1.2.3">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.3.1"><xref derivedContent="1.3" format="counter" sectionFormat="of" target="section-1.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-protocol-overview">Protocol Overview</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.2">
            <t indent="0" pn="section-toc.1-1.2.1"><xref derivedContent="2" format="counter" sectionFormat="of" target="section-2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-requirements-language">Requirements Language</xref></t>
          </li>
          <li pn="section-toc.1-1.3">
            <t indent="0" pn="section-toc.1-1.3.1"><xref derivedContent="3" format="counter" sectionFormat="of" target="section-3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-tls-profile-for-network-tim">TLS Profile for Network Time Security</xref></t>
          </li>
          <li pn="section-toc.1-1.4">
            <t indent="0" pn="section-toc.1-1.4.1"><xref derivedContent="4" format="counter" sectionFormat="of" target="section-4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-nts-key-establishment-p">The NTS Key Establishment Protocol</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2">
              <li pn="section-toc.1-1.4.2.1">
                <t indent="0" pn="section-toc.1-1.4.2.1.1"><xref derivedContent="4.1" format="counter" sectionFormat="of" target="section-4.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-nts-ke-record-types">NTS-KE Record Types</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2.1.2">
                  <li pn="section-toc.1-1.4.2.1.2.1">
                    <t indent="0" pn="section-toc.1-1.4.2.1.2.1.1"><xref derivedContent="4.1.1" format="counter" sectionFormat="of" target="section-4.1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-end-of-message">End of Message</xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.1.2.2">
                    <t indent="0" pn="section-toc.1-1.4.2.1.2.2.1"><xref derivedContent="4.1.2" format="counter" sectionFormat="of" target="section-4.1.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-nts-next-protocol-negotiati">NTS Next Protocol Negotiation</xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.1.2.3">
                    <t indent="0" pn="section-toc.1-1.4.2.1.2.3.1"><xref derivedContent="4.1.3" format="counter" sectionFormat="of" target="section-4.1.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-error">Error</xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.1.2.4">
                    <t indent="0" pn="section-toc.1-1.4.2.1.2.4.1"><xref derivedContent="4.1.4" format="counter" sectionFormat="of" target="section-4.1.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-warning">Warning</xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.1.2.5">
                    <t indent="0" pn="section-toc.1-1.4.2.1.2.5.1"><xref derivedContent="4.1.5" format="counter" sectionFormat="of" target="section-4.1.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-aead-algorithm-negotiation">AEAD Algorithm Negotiation</xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.1.2.6">
                    <t indent="0" pn="section-toc.1-1.4.2.1.2.6.1"><xref derivedContent="4.1.6" format="counter" sectionFormat="of" target="section-4.1.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-new-cookie-for-ntpv4">New Cookie for NTPv4</xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.1.2.7">
                    <t indent="0" pn="section-toc.1-1.4.2.1.2.7.1"><xref derivedContent="4.1.7" format="counter" sectionFormat="of" target="section-4.1.7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-ntpv4-server-negotiation">NTPv4 Server Negotiation</xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.1.2.8">
                    <t indent="0" pn="section-toc.1-1.4.2.1.2.8.1"><xref derivedContent="4.1.8" format="counter" sectionFormat="of" target="section-4.1.8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-ntpv4-port-negotiation">NTPv4 Port Negotiation</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.4.2.2">
                <t indent="0" pn="section-toc.1-1.4.2.2.1"><xref derivedContent="4.2" format="counter" sectionFormat="of" target="section-4.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-retry-intervals">Retry Intervals</xref></t>
              </li>
              <li pn="section-toc.1-1.4.2.3">
                <t indent="0" pn="section-toc.1-1.4.2.3.1"><xref derivedContent="4.3" format="counter" sectionFormat="of" target="section-4.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-key-extraction-generally">Key Extraction (Generally)</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.5">
            <t indent="0" pn="section-toc.1-1.5.1"><xref derivedContent="5" format="counter" sectionFormat="of" target="section-5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-nts-extension-fields-for-nt">NTS Extension Fields for NTPv4</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.5.2">
              <li pn="section-toc.1-1.5.2.1">
                <t indent="0" pn="section-toc.1-1.5.2.1.1"><xref derivedContent="5.1" format="counter" sectionFormat="of" target="section-5.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-key-extraction-for-ntpv4">Key Extraction (for NTPv4)</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.2">
                <t indent="0" pn="section-toc.1-1.5.2.2.1"><xref derivedContent="5.2" format="counter" sectionFormat="of" target="section-5.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-packet-structure-overview">Packet Structure Overview</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.3">
                <t indent="0" pn="section-toc.1-1.5.2.3.1"><xref derivedContent="5.3" format="counter" sectionFormat="of" target="section-5.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-unique-identifier-exten">The Unique Identifier Extension Field</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.4">
                <t indent="0" pn="section-toc.1-1.5.2.4.1"><xref derivedContent="5.4" format="counter" sectionFormat="of" target="section-5.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-nts-cookie-extension-fi">The NTS Cookie Extension Field</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.5">
                <t indent="0" pn="section-toc.1-1.5.2.5.1"><xref derivedContent="5.5" format="counter" sectionFormat="of" target="section-5.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-nts-cookie-placeholder-">The NTS Cookie Placeholder Extension Field</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.6">
                <t indent="0" pn="section-toc.1-1.5.2.6.1"><xref derivedContent="5.6" format="counter" sectionFormat="of" target="section-5.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-nts-authenticator-and-e">The NTS Authenticator and Encrypted Extension Fields Extension Field</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.7">
                <t indent="0" pn="section-toc.1-1.5.2.7.1"><xref derivedContent="5.7" format="counter" sectionFormat="of" target="section-5.7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-protocol-details">Protocol Details</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.6">
            <t indent="0" pn="section-toc.1-1.6.1"><xref derivedContent="6" format="counter" sectionFormat="of" target="section-6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-suggested-format-for-nts-co">Suggested Format for NTS Cookies</xref></t>
          </li>
          <li pn="section-toc.1-1.7">
            <t indent="0" pn="section-toc.1-1.7.1"><xref derivedContent="7" format="counter" sectionFormat="of" target="section-7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-iana-considerations">IANA Considerations</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.7.2">
              <li pn="section-toc.1-1.7.2.1">
                <t indent="0" pn="section-toc.1-1.7.2.1.1"><xref derivedContent="7.1" format="counter" sectionFormat="of" target="section-7.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-service-name-and-transport-">Service Name and Transport Protocol Port Number Registry</xref></t>
              </li>
              <li pn="section-toc.1-1.7.2.2">
                <t indent="0" pn="section-toc.1-1.7.2.2.1"><xref derivedContent="7.2" format="counter" sectionFormat="of" target="section-7.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-tls-application-layer-proto">TLS Application-Layer Protocol Negotiation (ALPN) Protocol IDs Registry</xref></t>
              </li>
              <li pn="section-toc.1-1.7.2.3">
                <t indent="0" pn="section-toc.1-1.7.2.3.1"><xref derivedContent="7.3" format="counter" sectionFormat="of" target="section-7.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-tls-exporter-labels-registr">TLS Exporter Labels Registry</xref></t>
              </li>
              <li pn="section-toc.1-1.7.2.4">
                <t indent="0" pn="section-toc.1-1.7.2.4.1"><xref derivedContent="7.4" format="counter" sectionFormat="of" target="section-7.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-ntp-kiss-o-death-codes-regi">NTP Kiss-o'-Death Codes Registry</xref></t>
              </li>
              <li pn="section-toc.1-1.7.2.5">
                <t indent="0" pn="section-toc.1-1.7.2.5.1"><xref derivedContent="7.5" format="counter" sectionFormat="of" target="section-7.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-ntp-extension-field-types-r">NTP Extension Field Types Registry</xref></t>
              </li>
              <li pn="section-toc.1-1.7.2.6">
                <t indent="0" pn="section-toc.1-1.7.2.6.1"><xref derivedContent="7.6" format="counter" sectionFormat="of" target="section-7.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-network-time-security-key-e">Network Time Security Key Establishment Record Types Registry</xref></t>
              </li>
              <li pn="section-toc.1-1.7.2.7">
                <t indent="0" pn="section-toc.1-1.7.2.7.1"><xref derivedContent="7.7" format="counter" sectionFormat="of" target="section-7.7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-network-time-security-next-">Network Time Security Next Protocols Registry</xref></t>
              </li>
              <li pn="section-toc.1-1.7.2.8">
                <t indent="0" pn="section-toc.1-1.7.2.8.1"><xref derivedContent="7.8" format="counter" sectionFormat="of" target="section-7.8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-network-time-security-error">Network Time Security Error and Warning Codes Registries</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.8">
            <t indent="0" pn="section-toc.1-1.8.1"><xref derivedContent="8" format="counter" sectionFormat="of" target="section-8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-security-considerations">Security Considerations</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.8.2">
              <li pn="section-toc.1-1.8.2.1">
                <t indent="0" pn="section-toc.1-1.8.2.1.1"><xref derivedContent="8.1" format="counter" sectionFormat="of" target="section-8.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-protected-modes">Protected Modes</xref></t>
              </li>
              <li pn="section-toc.1-1.8.2.2">
                <t indent="0" pn="section-toc.1-1.8.2.2.1"><xref derivedContent="8.2" format="counter" sectionFormat="of" target="section-8.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-cookie-encryption-key-compr">Cookie Encryption Key Compromise</xref></t>
              </li>
              <li pn="section-toc.1-1.8.2.3">
                <t indent="0" pn="section-toc.1-1.8.2.3.1"><xref derivedContent="8.3" format="counter" sectionFormat="of" target="section-8.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-sensitivity-to-ddos-attacks">Sensitivity to DDoS Attacks</xref></t>
              </li>
              <li pn="section-toc.1-1.8.2.4">
                <t indent="0" pn="section-toc.1-1.8.2.4.1"><xref derivedContent="8.4" format="counter" sectionFormat="of" target="section-8.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-avoiding-ddos-amplification">Avoiding DDoS Amplification</xref></t>
              </li>
              <li pn="section-toc.1-1.8.2.5">
                <t indent="0" pn="section-toc.1-1.8.2.5.1"><xref derivedContent="8.5" format="counter" sectionFormat="of" target="section-8.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-initial-verification-of-ser">Initial Verification of Server Certificates</xref></t>
              </li>
              <li pn="section-toc.1-1.8.2.6">
                <t indent="0" pn="section-toc.1-1.8.2.6.1"><xref derivedContent="8.6" format="counter" sectionFormat="of" target="section-8.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-delay-attacks">Delay Attacks</xref></t>
              </li>
              <li pn="section-toc.1-1.8.2.7">
                <t indent="0" pn="section-toc.1-1.8.2.7.1"><xref derivedContent="8.7" format="counter" sectionFormat="of" target="section-8.7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-nts-stripping">NTS Stripping</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.9">
            <t indent="0" pn="section-toc.1-1.9.1"><xref derivedContent="9" format="counter" sectionFormat="of" target="section-9"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-privacy-considerations">Privacy Considerations</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.9.2">
              <li pn="section-toc.1-1.9.2.1">
                <t indent="0" pn="section-toc.1-1.9.2.1.1"><xref derivedContent="9.1" format="counter" sectionFormat="of" target="section-9.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-unlinkability">Unlinkability</xref></t>
              </li>
              <li pn="section-toc.1-1.9.2.2">
                <t indent="0" pn="section-toc.1-1.9.2.2.1"><xref derivedContent="9.2" format="counter" sectionFormat="of" target="section-9.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-confidentiality">Confidentiality</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.10">
            <t indent="0" pn="section-toc.1-1.10.1"><xref derivedContent="10" format="counter" sectionFormat="of" target="section-10"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-references">References</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.10.2">
              <li pn="section-toc.1-1.10.2.1">
                <t indent="0" pn="section-toc.1-1.10.2.1.1"><xref derivedContent="10.1" format="counter" sectionFormat="of" target="section-10.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-normative-references">Normative References</xref></t>
              </li>
              <li pn="section-toc.1-1.10.2.2">
                <t indent="0" pn="section-toc.1-1.10.2.2.1"><xref derivedContent="10.2" format="counter" sectionFormat="of" target="section-10.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-informative-references">Informative References</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.11">
            <t indent="0" pn="section-toc.1-1.11.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.a"/><xref derivedContent="" format="title" sectionFormat="of" target="name-acknowledgments">Acknowledgments</xref></t>
          </li>
          <li pn="section-toc.1-1.12">
            <t indent="0" pn="section-toc.1-1.12.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.b"/><xref derivedContent="" format="title" sectionFormat="of" target="name-authors-addresses">Authors' Addresses</xref></t>
          </li>
        </ul>
      </section>
    </toc>
  </front>
  <middle>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-1">
      <name slugifiedName="name-introduction">Introduction</name>
      <t indent="0" pn="section-1-1">
	This memo specifies Network Time Security (NTS), a
	cryptographic security mechanism for network time
	synchronization. A complete specification is provided for
	application of NTS to the client-server mode of the
        <xref target="RFC5905" format="default" sectionFormat="of" derivedContent="RFC5905">Network Time Protocol (NTP)</xref>.
      </t>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-1.1">
        <name slugifiedName="name-objectives">Objectives</name>
        <t indent="0" pn="section-1.1-1">
	  The objectives of NTS are as follows:

        </t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-1.1-2">
          <li pn="section-1.1-2.1">
        Identity: Through the use of a X.509 public key infrastructure,
        implementations can cryptographically establish the identity of
        the parties they are communicating with.
	    </li>
          <li pn="section-1.1-2.2">
	      Authentication: Implementations can cryptographically
	      verify that any time synchronization packets are
	      authentic, i.e., that they were produced by an
	      identified party and have not been modified in transit.
	    </li>
          <li pn="section-1.1-2.3">
	      Confidentiality: Although basic time synchronization
	      data is considered nonconfidential and sent in the
	      clear, NTS includes support for encrypting NTP extension
	      fields.
	    </li>
          <li pn="section-1.1-2.4">
	      Replay prevention: Client implementations can detect when
	      a received time synchronization packet is a replay of
	      a previous packet.
	    </li>
          <li pn="section-1.1-2.5">
	      Request-response consistency: Client implementations can
	      verify that a time synchronization packet received from
	      a server was sent in response to a particular request from
	      the client.
	    </li>
          <li pn="section-1.1-2.6">
	      Unlinkability: For mobile clients, NTS will not leak any
	      information additional to NTP which would permit a
	      passive adversary to determine that two packets sent
	      over different networks came from the same client.
	    </li>
          <li pn="section-1.1-2.7">
              Non-amplification: Implementations (especially server
              implementations) can avoid acting as distributed
              denial-of-service (DDoS) amplifiers by never responding to a
              request with a packet larger than the request packet.
	    </li>
          <li pn="section-1.1-2.8">
	      Scalability: Server implementations can serve large
	      numbers of clients without having to retain any
	      client-specific state.
	    </li>
          <li pn="section-1.1-2.9">
	      Performance: NTS must not significantly degrade the
	      quality of the time transfer. The encryption and
	      authentication used when actually transferring time
	      should be lightweight (see Section
              <xref target="RFC7384" section="5.7" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7384#section-5.7" derivedContent="RFC7384"/>
              of <xref target="RFC7384" format="default" sectionFormat="of" derivedContent="RFC7384">RFC 7384</xref>).
	    </li>
        </ul>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-1.2">
        <name slugifiedName="name-terms-and-abbreviations">Terms and Abbreviations</name>
        <dl newline="false" spacing="normal" indent="11" pn="section-1.2-1">
          <dt pn="section-1.2-1.1">AEAD   </dt>
          <dd pn="section-1.2-1.2">
            <xref target="RFC5116" format="default" sectionFormat="of" derivedContent="RFC5116">Authenticated Encryption
            with Associated Data</xref></dd>
          <dt pn="section-1.2-1.3">ALPN   </dt>
          <dd pn="section-1.2-1.4">
            <xref target="RFC7301" format="default" sectionFormat="of" derivedContent="RFC7301">Application-Layer Protocol
            Negotiation</xref></dd>
          <dt pn="section-1.2-1.5">C2S    </dt>
          <dd pn="section-1.2-1.6">Client-to-server</dd>
          <dt pn="section-1.2-1.7">DoS    </dt>
          <dd pn="section-1.2-1.8">Denial-of-Service</dd>
          <dt pn="section-1.2-1.9">DDoS   </dt>
          <dd pn="section-1.2-1.10">Distributed Denial-of-Service</dd>
          <dt pn="section-1.2-1.11">EF     </dt>
          <dd pn="section-1.2-1.12">
            <xref target="RFC5905" format="default" sectionFormat="of" derivedContent="RFC5905">Extension Field</xref></dd>
          <dt pn="section-1.2-1.13">HKDF   </dt>
          <dd pn="section-1.2-1.14">
            <xref target="RFC5869" format="default" sectionFormat="of" derivedContent="RFC5869">Hashed Message
            Authentication Code-based Key Derivation Function</xref></dd>
          <dt pn="section-1.2-1.15">KoD    </dt>
          <dd pn="section-1.2-1.16">
            <xref target="RFC5905" format="default" sectionFormat="of" derivedContent="RFC5905">Kiss-o'-Death</xref></dd>
          <dt pn="section-1.2-1.17">NTP    </dt>
          <dd pn="section-1.2-1.18">
            <xref target="RFC5905" format="default" sectionFormat="of" derivedContent="RFC5905">Network Time Protocol
            </xref></dd>
          <dt pn="section-1.2-1.19">NTS    </dt>
          <dd pn="section-1.2-1.20">Network Time Security</dd>
          <dt pn="section-1.2-1.21">NTS NAK</dt>
          <dd pn="section-1.2-1.22">NTS negative-acknowledgment</dd>
          <dt pn="section-1.2-1.23">NTS-KE </dt>
          <dd pn="section-1.2-1.24">Network Time Security Key Establishment</dd>
          <dt pn="section-1.2-1.25">S2C    </dt>
          <dd pn="section-1.2-1.26">Server-to-client</dd>
          <dt pn="section-1.2-1.27">TLS    </dt>
          <dd pn="section-1.2-1.28">
            <xref target="RFC8446" format="default" sectionFormat="of" derivedContent="RFC8446">Transport Layer
            Security</xref></dd>
        </dl>
      </section>
      <section anchor="sec-protocol-overview" numbered="true" toc="include" removeInRFC="false" pn="section-1.3">
        <name slugifiedName="name-protocol-overview">Protocol Overview</name>
        <t indent="0" pn="section-1.3-1">
          The Network Time Protocol includes many different operating modes to
          support various network topologies (see Section
          <xref target="RFC5905" section="3" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5905#section-3" derivedContent="RFC5905"/> of
          <xref target="RFC5905" format="default" sectionFormat="of" derivedContent="RFC5905">RFC 5905</xref>). In addition to its best-known and
          most-widely-used client-server mode, it also includes modes for
          synchronization between symmetric peers, a control mode for server
          monitoring and administration, and a broadcast mode. These various
          modes have differing and partly contradictory requirements for
          security and performance. Symmetric and control modes demand mutual
          authentication and mutual replay protection. Additionally, for certain
          message types, the control mode may require confidentiality as well as
          authentication. Client-server mode places more stringent requirements
          on resource utilization than other modes because servers may have a
          vast number of clients and be unable to afford to maintain per-client
          state. However, client-server mode also has more relaxed security
          needs because only the client requires replay protection: it is
          harmless for stateless servers to process replayed packets. The
          security demands of symmetric and control modes, on the other hand,
          are in conflict with the resource-utilization demands of client-server
          mode: any scheme that provides replay protection inherently involves
          maintaining some state to keep track of which messages have already
          been seen.
        </t>
        <t indent="0" pn="section-1.3-2">
          This memo specifies NTS exclusively for the client-server mode of NTP.
          To this end, NTS is structured as a suite of two protocols:

        </t>
        <ul empty="true" spacing="normal" bare="false" indent="3" pn="section-1.3-3">
          <li pn="section-1.3-3.1">
              The "NTS Extension Fields for NTPv4" define a collection of NTP
              extension fields for cryptographically securing NTPv4 using
              previously established key material. They are suitable for
              securing client-server mode because the server can implement them
              without retaining per-client state. All state is kept by the
              client and provided to the server in the form of an encrypted
              cookie supplied with each request. On the other hand, the NTS
              Extension Fields are suitable <em>only</em> for client-server mode
              because only the client, and not the server, is protected from
              replay.
            </li>
          <li pn="section-1.3-3.2">
              The "NTS Key Establishment" protocol (NTS-KE) is a
              mechanism for establishing key material for use with the NTS
              Extension Fields for NTPv4. It uses TLS to establish keys, to provide
              the client with an initial supply of cookies, and to negotiate some
              additional protocol options. After this, the TLS channel
              is closed with no per-client state remaining on the server side.
            </li>
        </ul>
        <t indent="0" pn="section-1.3-4">
          The typical protocol flow is as follows: The client connects to an
          NTS-KE server on the NTS TCP port and the two parties perform a TLS
          handshake. Via the TLS channel, the parties negotiate some additional
          protocol parameters, and the server sends the client a supply of
          cookies along with an address and port of an NTP server
          for which the cookies are valid. The parties use
          <xref target="RFC5705" format="default" sectionFormat="of" derivedContent="RFC5705">TLS key export</xref> to extract key material,
          which will be used in the next phase of the protocol. This negotiation
          takes only a single round trip, after which the server closes the
          connection and discards all associated state. At this point, the NTS-KE
          phase of the protocol is complete. Ideally, the client never needs to
          connect to the NTS-KE server again.
        </t>
        <t indent="0" pn="section-1.3-5">
          Time synchronization proceeds with the indicated NTP server.
          The client sends the server an NTP client
          packet that includes several extension fields. Included among these
          fields are a cookie (previously provided by the key establishment server)
          and an authentication tag, computed using key material extracted from
          the NTS-KE handshake.  The NTP server uses the cookie to recover this
          key material and send back an authenticated response. The response
          includes a fresh, encrypted cookie that the client then sends back in
          the clear in a subsequent request. This constant refreshing of cookies
          is necessary in order to achieve NTS's unlinkability goal.
        </t>
        <t indent="0" pn="section-1.3-6">
          <xref target="protocol-overview" format="default" sectionFormat="of" derivedContent="Figure 1"/> provides an overview of the
          high-level interaction between the client, the NTS-KE server, and the
          NTP server. Note that the cookies' data format and the exchange of
          secrets between NTS-KE and NTP servers are not part of this
          specification and are implementation dependent. However, a suggested
          format for NTS cookies is provided in
          <xref target="suggested-format-for-nts-cookies" format="default" sectionFormat="of" derivedContent="Section 6"/>.
        </t>
        <figure anchor="protocol-overview" align="left" suppress-title="false" pn="figure-1">
          <name slugifiedName="name-overview-of-high-level-inte">Overview of High-Level Interactions in NTS</name>
          <artwork name="" type="" align="left" alt="" pn="section-1.3-7.1">
                                                     +--------------+
                                                     |              |
                                                 +-&gt; | NTP Server 1 |
                                                 |   |              |
                           Shared cookie         |   +--------------+
+---------------+      encryption parameters     |   +--------------+
|               |    (Implementation dependent)  |   |              |
| NTS-KE Server | &lt;------------------------------+-&gt; | NTP Server 2 |
|               |                                |   |              |
+---------------+                                |   +--------------+
       ^                                         |          .
       |                                         |          .
       | 1. Negotiate parameters,                |          .
       |    receive initial cookie               |   +--------------+
       |    supply, generate AEAD keys,          |   |              |
       |    and receive NTP server IP            +-&gt; | NTP Server N |
       |    addresses using "NTS Key                 |              |
       |    Establishment" protocol.                 +--------------+
       |                                                    ^
       |                                                    |
       |             +----------+                           |
       |             |          |                           |
       +-----------&gt; |  Client  | &lt;-------------------------+
                     |          |  2. Perform authenticated
                     +----------+     time synchronization
                                      and generate new
                                      cookies using "NTS
                                      Extension Fields for
                                      NTPv4".
</artwork>
        </figure>
      </section>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-2">
      <name slugifiedName="name-requirements-language">Requirements Language</name>
      <t indent="0" pn="section-2-1">
        The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
        "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>",
        "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>",
        "<bcp14>NOT RECOMMENDED</bcp14>", "<bcp14>MAY</bcp14>", and
        "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as described in
        BCP 14 <xref target="RFC2119" format="default" sectionFormat="of" derivedContent="RFC2119"/> <xref target="RFC8174" format="default" sectionFormat="of" derivedContent="RFC8174"/> when,
        and only when, they appear in all capitals, as shown here.
      </t>
    </section>
    <section anchor="tls-profile" numbered="true" toc="include" removeInRFC="false" pn="section-3">
      <name slugifiedName="name-tls-profile-for-network-tim">TLS Profile for Network Time Security</name>
      <t indent="0" pn="section-3-1">
        Network Time Security makes use of TLS for NTS key establishment.
      </t>
      <t indent="0" pn="section-3-2">
        Since the NTS protocol is new as of this publication, no
        backward-compatibility concerns exist to justify using
        obsolete, insecure, or otherwise broken TLS features or
        versions. Implementations <bcp14>MUST</bcp14> conform with
        <xref target="RFC7525" format="default" sectionFormat="of" derivedContent="RFC7525">RFC 7525</xref> or
        with a later revision of BCP 195.
      </t>
      <t indent="0" pn="section-3-3">
        Implementations <bcp14>MUST NOT</bcp14> negotiate TLS versions earlier than 1.3
        <xref target="RFC8446" format="default" sectionFormat="of" derivedContent="RFC8446"/> and <bcp14>MAY</bcp14> refuse to negotiate any TLS version
        that has been superseded by a later supported version.
      </t>
      <t indent="0" pn="section-3-4">
        Use of the <xref target="RFC7301" format="default" sectionFormat="of" derivedContent="RFC7301">Application-Layer Protocol
        Negotiation Extension</xref> is integral to NTS, and support for
        it is <bcp14>REQUIRED</bcp14> for interoperability.
      </t>
      <t indent="0" pn="section-3-5">
        Implementations <bcp14>MUST</bcp14> follow the rules in <xref target="RFC5280" format="default" sectionFormat="of" derivedContent="RFC5280">
        RFC 5280</xref> and <xref target="RFC6125" format="default" sectionFormat="of" derivedContent="RFC6125">RFC 6125</xref> for the
        representation and verification of the application's service identity.
        When NTS-KE service discovery (out of scope for this document)
        produces one or more host names, use of the
        <xref target="RFC6125" format="default" sectionFormat="of" derivedContent="RFC6125">DNS-ID identifier type</xref> is <bcp14>RECOMMENDED</bcp14>;
        specifications for service discovery mechanisms can provide additional
        guidance for certificate validation based on the results of
        discovery. <xref target="sec-cert-verification" format="default" sectionFormat="of" derivedContent="Section 8.5"/> of this memo
        discusses particular considerations for certificate verification in
        the context of NTS.
      </t>
    </section>
    <section anchor="nts-ke" numbered="true" toc="include" removeInRFC="false" pn="section-4">
      <name slugifiedName="name-the-nts-key-establishment-p">The NTS Key Establishment Protocol</name>
      <t indent="0" pn="section-4-1">
        The NTS key establishment protocol is conducted via TCP port 4460.
        The two endpoints carry out a TLS handshake in conformance with
        <xref target="tls-profile" format="default" sectionFormat="of" derivedContent="Section 3"/>, with the client offering (via an
        <xref target="RFC7301" format="default" sectionFormat="of" derivedContent="RFC7301">ALPN extension</xref>), and the 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
        server <bcp14>SHALL</bcp14> send a single response. After sending their respective
        request and response, the client and server <bcp14>SHALL</bcp14> send TLS
        "close_notify" alerts in accordance with Section
        <xref target="RFC8446" section="6.1" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8446#section-6.1" derivedContent="RFC8446"/> of
        <xref target="RFC8446" format="default" sectionFormat="of" derivedContent="RFC8446">RFC 8446</xref>.
      </t>
      <t indent="0" pn="section-4-2">
        The client's request and the server's response each <bcp14>SHALL</bcp14> consist of a
        sequence of records formatted according to
        <xref target="ntske-record" format="default" sectionFormat="of" derivedContent="Figure 2"/>. The request and a non-error response each
        <bcp14>SHALL</bcp14> include exactly one NTS Next Protocol Negotiation record. 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
        record makes them self-delimiting.
      </t>
      <t indent="0" pn="section-4-3">
        Clients and servers <bcp14>MAY</bcp14> enforce length limits on requests and responses;
        however, servers <bcp14>MUST</bcp14> accept requests of at least 1024 octets, and
        clients <bcp14>SHOULD</bcp14> accept responses of at least 65536 octets.
      </t>
      <figure anchor="ntske-record" align="left" suppress-title="false" pn="figure-2">
        <name slugifiedName="name-nts-ke-record-format">NTS-KE Record Format</name>
        <artwork name="" type="" align="left" alt="" pn="section-4-4.1">
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|C|         Record Type         |          Body Length          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
.                                                               .
.                           Record Body                         .
.                                                               .
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork>
      </figure>
      <t indent="0" pn="section-4-5">
        The fields of an NTS-KE record are defined as follows:
      </t>
      <dl newline="false" spacing="normal" indent="3" pn="section-4-6">
        <dt pn="section-4-6.1">C (Critical Bit):</dt>
        <dd pn="section-4-6.2">Determines the disposition of unrecognized Record
            Types. Implementations which receive a record with an unrecognized
            Record Type <bcp14>MUST</bcp14> ignore the record if the Critical Bit is 0 and <bcp14>MUST</bcp14>
            treat it as an error if the Critical Bit is 1 (see <xref target="nts-error" format="default" sectionFormat="of" derivedContent="Section 4.1.3"/>).
          </dd>
        <dt pn="section-4-6.3">Record Type Number:</dt>
        <dd pn="section-4-6.4">A 15-bit integer in network byte order. The
            semantics of Record Types 0-7 are specified in this memo.
            Additional type numbers <bcp14>SHALL</bcp14> be tracked through the IANA "Network
            Time Security Key Establishment Record Types" registry.
          </dd>
        <dt pn="section-4-6.5">Body Length:</dt>
        <dd pn="section-4-6.6">The length of the Record Body field, in octets, as a
            16-bit integer in network byte order. Record bodies <bcp14>MAY</bcp14> have any
            representable length and need not be aligned to a word boundary.
          </dd>
        <dt pn="section-4-6.7">Record Body:</dt>
        <dd pn="section-4-6.8">The syntax and semantics of this field <bcp14>SHALL</bcp14> be
           determined by the Record Type.
          </dd>
      </dl>
      <t indent="0" pn="section-4-7">
        For clarity regarding bit-endianness: the Critical Bit is the
        most significant bit of the first octet. In the C programming language,
        given a network buffer
        'unsigned char b[]' containing an NTS-KE record, the critical bit is
        'b[0] &gt;&gt; 7' while the record type is
        '((b[0] &amp; 0x7f) &lt;&lt; 8) + b[1]'.
      </t>
      <t indent="0" pn="section-4-8">
        Note that, although the Type-Length-Body format of an NTS-KE record is
        similar to that of an NTP extension field, the semantics of the length
        field differ. While the length subfield of an NTP extension field gives
        the length of the entire extension field including the type and length
        subfields, the length field of an NTS-KE record gives just the length
        of the body.
      </t>
      <t indent="0" pn="section-4-9">
        <xref target="fig_NTSKeyEstablishment" format="default" sectionFormat="of" derivedContent="Figure 3"/> provides a schematic overview of the
        key establishment. It displays the protocol steps to be performed by the NTS
        client and server and Record Types to be exchanged.
      </t>
      <figure anchor="fig_NTSKeyEstablishment" align="left" suppress-title="false" pn="figure-3">
        <name slugifiedName="name-nts-key-establishment-messa">NTS Key Establishment Messages</name>
        <artwork name="" type="" align="left" alt="" pn="section-4-10.1">
                +---------------------------------------+
                | - Verify client request message.      |
                | - Extract TLS key material.           |
                | - Generate KE response message.       |
                |   - Include Record Types:             |
                |       o NTS Next Protocol Negotiation |
                |       o AEAD Algorithm Negotiation    |
                |       o &lt;NTPv4 Server Negotiation&gt;    |
                |       o &lt;NTPv4 Port Negotiation&gt;      |
                |       o New Cookie for NTPv4          |
                |       o &lt;New Cookie for NTPv4&gt;        |
                |       o End of Message                |
                +-----------------+---------------------+
                                  |
                                  |
Server -----------+---------------+-----+-----------------------&gt;
                  ^                      \
                 /                        \
                /    TLS application       \
               /     data                   \
              /                              \
             /                                V
Client -----+---------------------------------+-----------------&gt;
            |                                 |
            |                                 |
            |                                 |
+-----------+----------------------+   +------+-----------------+
|- Generate KE request message.    |   |- Verify server response|
| - Include Record Types:          |   |  message.              |
|  o NTS Next Protocol Negotiation |   |- Extract cookie(s).    |
|  o AEAD Algorithm Negotiation    |   +------------------------+
|  o &lt;NTPv4 Server Negotiation&gt;    |
|  o &lt;NTPv4 Port Negotiation&gt;      |
|  o End of Message                |
+----------------------------------+
</artwork>
      </figure>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-4.1">
        <name slugifiedName="name-nts-ke-record-types">NTS-KE Record Types</name>
        <t indent="0" pn="section-4.1-1">The following NTS-KE Record Types are defined:</t>
        <section anchor="end-of-message" numbered="true" toc="include" removeInRFC="false" pn="section-4.1.1">
          <name slugifiedName="name-end-of-message">End of Message</name>
          <t indent="0" pn="section-4.1.1-1">
            The End of Message record has a Record Type number of 0 and a
            zero-length body. It <bcp14>MUST</bcp14> occur exactly once as the final record of
            every NTS-KE request and response. The Critical Bit <bcp14>MUST</bcp14> be set.
          </t>
        </section>
        <section anchor="nts-next-protocol-negotiation" numbered="true" toc="include" removeInRFC="false" pn="section-4.1.2">
          <name slugifiedName="name-nts-next-protocol-negotiati">NTS Next Protocol Negotiation</name>
          <t indent="0" pn="section-4.1.2-1">
            The NTS Next Protocol Negotiation record has a Record Type number
            of 1. It <bcp14>MUST</bcp14> occur exactly once in every NTS-KE request and
            response. Its body consists of a sequence of 16-bit unsigned
            integers in network byte order. Each integer represents a Protocol
            ID from the IANA "Network Time Security Next Protocols" registry
            (<xref target="iana-nts-next-protocols" format="default" sectionFormat="of" derivedContent="Section 7.7"/>). The
            Critical Bit <bcp14>MUST</bcp14> be set.
          </t>
          <t indent="0" pn="section-4.1.2-2">

            The Protocol IDs listed in the client's NTS Next Protocol
            Negotiation record denote those protocols that the client wishes to
            speak using the key material established through this NTS-KE
            session. Protocol IDs listed in the NTS-KE server's response <bcp14>MUST</bcp14>
            comprise a subset of those listed in the request and
            denote those protocols that the NTP server is willing and
            able to speak using the key material established through
            this NTS-KE session. The client <bcp14>MAY</bcp14>
            proceed with one or more of them. The request <bcp14>MUST</bcp14> list at least one
            protocol, but the response <bcp14>MAY</bcp14> be empty.
          </t>
        </section>
        <section anchor="nts-error" numbered="true" toc="include" removeInRFC="false" pn="section-4.1.3">
          <name slugifiedName="name-error">Error</name>
          <t indent="0" pn="section-4.1.3-1">
            The Error record has a Record Type number of 2. Its body is exactly
            two octets long, consisting of an unsigned 16-bit integer in network
            byte order, denoting an error code. The Critical Bit <bcp14>MUST</bcp14> be set.
          </t>
          <t indent="0" pn="section-4.1.3-2">
            Clients <bcp14>MUST NOT</bcp14> include Error records in their request. 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
            and <bcp14>MUST NOT</bcp14> proceed to the Next Protocol. Requirements for retry
            intervals are described in <xref target="nts-ke-retry" format="default" sectionFormat="of" derivedContent="Section 4.2"/>.
          </t>
          <t indent="0" pn="section-4.1.3-3">
            The following error codes are defined:
          </t>
          <ul empty="true" spacing="normal" bare="false" indent="3" pn="section-4.1.3-4">
            <li pn="section-4.1.3-4.1">
                Error code 0 means "Unrecognized Critical Record". The
                server <bcp14>MUST</bcp14> respond with this error code if the request 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.
              </li>
            <li pn="section-4.1.3-4.2">
                Error code 1 means "Bad Request". The server <bcp14>MUST</bcp14>
                respond with this error if the request is not complete
                and syntactically well-formed, or, upon the expiration
                of an implementation-defined timeout, it has not yet
                received such a request. The client <bcp14>SHOULD NOT</bcp14> retry its
                request without modification.
              </li>
            <li pn="section-4.1.3-4.3">
                Error code 2 means "Internal Server Error". The server
                <bcp14>MUST</bcp14> respond with this error if it is unable to respond properly
                due to an internal condition. The client <bcp14>MAY</bcp14> retry its request.
              </li>
          </ul>
        </section>
        <section anchor="nts-warning" numbered="true" toc="include" removeInRFC="false" pn="section-4.1.4">
          <name slugifiedName="name-warning">Warning</name>
          <t indent="0" pn="section-4.1.4-1">
            The Warning record has a Record Type number of 3. Its body is
            exactly two octets long, consisting of an unsigned 16-bit integer in
            network byte order, denoting a warning code. The Critical Bit <bcp14>MUST</bcp14>
            be set.
          </t>
          <t indent="0" pn="section-4.1.4-2">
            Clients <bcp14>MUST NOT</bcp14> include Warning records in their request. If
            clients receive a server response that includes a Warning record,
            they <bcp14>MAY</bcp14> discard any negotiated key material and abort without
            proceeding to the Next Protocol. Unrecognized warning codes <bcp14>MUST</bcp14> be
            treated as errors.
          </t>
          <t indent="0" pn="section-4.1.4-3">
            This memo defines no warning codes.
          </t>
        </section>
        <section anchor="aead-algorithm-negotiation" numbered="true" toc="include" removeInRFC="false" pn="section-4.1.5">
          <name slugifiedName="name-aead-algorithm-negotiation">AEAD Algorithm Negotiation</name>
          <t indent="0" pn="section-4.1.5-1">
            The AEAD Algorithm Negotiation record has a Record Type number of 4.
            Its body consists of a sequence of unsigned 16-bit integers in
            network byte order, denoting Numeric Identifiers from the IANA
            <xref target="IANA-AEAD" format="default" sectionFormat="of" derivedContent="IANA-AEAD">"AEAD Algorithms" registry</xref>. The
            Critical Bit <bcp14>MAY</bcp14> be set.
          </t>
          <t indent="0" pn="section-4.1.5-2">
            If the NTS Next Protocol Negotiation record offers Protocol ID 0
            (for NTPv4), then this record <bcp14>MUST</bcp14> be included exactly once. Other
            protocols <bcp14>MAY</bcp14> require it as well.
          </t>
          <t indent="0" pn="section-4.1.5-3">
            When included in a request, this record denotes which AEAD
            algorithms the client is willing to use to secure the Next Protocol,
            in decreasing preference order. When included in a response, this
            record denotes which algorithm the server chooses to use. It is
            empty if the server supports none of the algorithms offered. In
            requests, the list <bcp14>MUST</bcp14> include at least one algorithm. In
            responses, it <bcp14>MUST</bcp14> include at most one. Honoring the client's
            preference order is <bcp14>OPTIONAL</bcp14>: servers may select among any of the
            client's offered choices, even if they are able to support some
            other algorithm that the client prefers more.
          </t>
          <t indent="0" pn="section-4.1.5-4">
            Server implementations of
            <xref target="nts-extension-fields-for-ntpv4" format="default" sectionFormat="of" derivedContent="Section 5">NTS Extension Fields for NTPv4</xref>
            <bcp14>MUST</bcp14> support
            <xref target="RFC5297" format="default" sectionFormat="of" derivedContent="RFC5297">AEAD_AES_SIV_CMAC_256</xref>
            (Numeric Identifier 15). That is, if the client includes AEAD_AES_SIV_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
            server's AEAD Algorithm Negotiation record <bcp14>MUST NOT</bcp14> be empty.
          </t>
        </section>
        <section anchor="new-cookie-for-ntpv4" numbered="true" toc="include" removeInRFC="false" pn="section-4.1.6">
          <name slugifiedName="name-new-cookie-for-ntpv4">New Cookie for NTPv4</name>
          <t indent="0" pn="section-4.1.6-1">
            The New Cookie for NTPv4 record has a Record Type number of 5. The
            contents of its body <bcp14>SHALL</bcp14> be implementation-defined,
            and clients <bcp14>MUST NOT</bcp14> attempt to interpret them.
            See <xref target="suggested-format-for-nts-cookies" format="default" sectionFormat="of" derivedContent="Section 6"/> for a suggested
            construction.
          </t>
          <t indent="0" pn="section-4.1.6-2">
            Clients <bcp14>MUST NOT</bcp14> send records of this type. Servers <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
            (NTPv4) and the AEAD Algorithm Negotiation response record is not
            empty. The Critical Bit <bcp14>SHOULD NOT</bcp14> be set.
          </t>
        </section>
        <section anchor="ntp-server-negotiation" numbered="true" toc="include" removeInRFC="false" pn="section-4.1.7">
          <name slugifiedName="name-ntpv4-server-negotiation">NTPv4 Server Negotiation</name>
          <t indent="0" pn="section-4.1.7-1">
            The NTPv4 Server Negotiation record has a Record Type number of 6.
            Its body consists of an
            <xref target="RFC0020" format="default" sectionFormat="of" derivedContent="RFC0020">ASCII-encoded</xref> string. The
            contents of the string <bcp14>SHALL</bcp14> be either an IPv4 address, an IPv6
            address, or a fully qualified domain name (FQDN). IPv4 addresses
            <bcp14>MUST</bcp14> be in dotted decimal notation. IPv6 addresses <bcp14>MUST</bcp14> conform to
            the "Text Representation of Addresses" as specified in
            <xref target="RFC4291" format="default" sectionFormat="of" derivedContent="RFC4291">RFC 4291</xref> and <bcp14>MUST NOT</bcp14> include zone
            identifiers <xref target="RFC6874" format="default" sectionFormat="of" derivedContent="RFC6874"/>. If a label contains at least
            one non-ASCII character, it is an internationalized domain name,
            and an A-LABEL <bcp14>MUST</bcp14> be used as defined in Section
            <xref target="RFC5890" section="2.3.2.1" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5890#section-2.3.2.1" derivedContent="RFC5890"/>
            of <xref target="RFC5890" format="default" sectionFormat="of" derivedContent="RFC5890">RFC 5890</xref>.
            If the record contains a domain name, the recipient <bcp14>MUST</bcp14> treat it
            as a FQDN, e.g., by making sure it ends with a dot.
          </t>
          <t indent="0" pn="section-4.1.7-2">
            When NTPv4 is negotiated as a Next Protocol and this
            record is sent by the server, the body specifies the
            hostname or IP address of the NTPv4 server with which the
            client should associate and that will accept the supplied
            cookies. If no record of this type is sent, the client
            <bcp14>SHALL</bcp14> interpret this as a directive to associate with an
            NTPv4 server at the same IP address as the NTS-KE server.
            Servers <bcp14>MUST NOT</bcp14> send more than one record of this type.
          </t>
          <t indent="0" pn="section-4.1.7-3">
            When this record is sent by the client, it indicates that
            the client wishes to associate with the specified NTP
            server. The NTS-KE server <bcp14>MAY</bcp14> incorporate this request when
            deciding which NTPv4 Server Negotiation records to respond
            with, but honoring the client's preference is
            <bcp14>OPTIONAL</bcp14>. The client <bcp14>MUST NOT</bcp14> send more than one record of
            this type.
          </t>
          <t indent="0" pn="section-4.1.7-4">
            If the client has sent a record of this type, the NTS-KE server
            <bcp14>SHOULD</bcp14> reply with the same record if it is valid and the server is
            able to supply cookies for it. If the client has not sent any
            record of this type, the NTS-KE server <bcp14>SHOULD</bcp14> respond with either
            an NTP server address in the same family as the NTS-KE session or
            a FQDN that can be resolved to an address in that family, if such
            alternatives are available.
          </t>
          <t indent="0" pn="section-4.1.7-5">
            Servers <bcp14>MAY</bcp14> set the Critical Bit on records of this type;
            clients <bcp14>SHOULD NOT</bcp14>.
          </t>
        </section>
        <section anchor="ntp-port-negotiation" numbered="true" toc="include" removeInRFC="false" pn="section-4.1.8">
          <name slugifiedName="name-ntpv4-port-negotiation">NTPv4 Port Negotiation</name>
          <t indent="0" pn="section-4.1.8-1">
            The NTPv4 Port Negotiation record has a Record Type number
            of 7. Its body consists of a 16-bit unsigned integer in
            network byte order, denoting a UDP port number.
          </t>
          <t indent="0" pn="section-4.1.8-2">
            When NTPv4 is negotiated as a Next Protocol, and this
            record is sent by the server, the body specifies the port
            number of the NTPv4 server with which the client should
            associate and that will accept the supplied cookies. If
            no record of this type is sent, the client <bcp14>SHALL</bcp14> assume
            a default of 123 (the registered port number for NTP).
          </t>
          <t indent="0" pn="section-4.1.8-3">
            When this record is sent by the client in conjunction with
            a NTPv4 Server Negotiation record, it indicates that the
            client wishes to associate with the NTP server at the
            specified port. The NTS-KE server <bcp14>MAY</bcp14> incorporate this
            request when deciding what NTPv4 Server Negotiation and
            NTPv4 Port Negotiation records to respond with, but
            honoring the client's preference is <bcp14>OPTIONAL</bcp14>.
          </t>
          <t indent="0" pn="section-4.1.8-4">
            Servers <bcp14>MAY</bcp14> set the Critical Bit on records of this type;
            clients <bcp14>SHOULD NOT</bcp14>.
          </t>
        </section>
      </section>
      <section anchor="nts-ke-retry" numbered="true" toc="include" removeInRFC="false" pn="section-4.2">
        <name slugifiedName="name-retry-intervals">Retry Intervals</name>
        <t indent="0" pn="section-4.2-1">
          A mechanism for not unnecessarily overloading the NTS-KE server is
          <bcp14>REQUIRED</bcp14> when retrying the key establishment process due to protocol,
          communication, or other errors. The exact workings of this will be
          dependent on the application and operational experience gathered over
          time. Until such experience is available, this memo provides the
          following suggestion.
        </t>
        <t indent="0" pn="section-4.2-2">
          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
          a base of 1.5. Thus, the minimum interval in seconds, 't', for the nth
          retry is calculated with the following:
        </t>
        <ul empty="true" spacing="normal" bare="false" indent="3" pn="section-4.2-3">
          <li pn="section-4.2-3.1">
              t = min(10 * 1.5<sup>n-1</sup>, 432000).
            </li>
        </ul>
        <t indent="0" pn="section-4.2-4">
          Clients <bcp14>MUST NOT</bcp14> reset the retry interval until they have performed
          a successful key establishment with the NTS-KE server, followed by a
          successful use of the negotiated Next Protocol with the keys and data
          established during that transaction.
        </t>
      </section>
      <section anchor="key-extraction" numbered="true" toc="include" removeInRFC="false" pn="section-4.3">
        <name slugifiedName="name-key-extraction-generally">Key Extraction (Generally)</name>
        <t indent="0" pn="section-4.3-1">
          Following a successful run of the NTS-KE protocol, key material <bcp14>SHALL</bcp14>
          be extracted using <xref target="RFC5869" format="default" sectionFormat="of" derivedContent="RFC5869">the HMAC-based
          Extract-and-Expand Key Derivation Function (HKDF)</xref> in
          accordance with Section <xref target="RFC8446" section="7.5" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8446#section-7.5" derivedContent="RFC8446"/>
          of <xref target="RFC8446" format="default" sectionFormat="of" derivedContent="RFC8446">RFC 8446</xref>.

          Inputs to the exporter function are to be constructed in a manner
          specific to the negotiated Next Protocol. However, all protocols that
          utilize NTS-KE <bcp14>MUST</bcp14> conform to the following two rules:
        </t>
        <ul empty="true" spacing="normal" bare="false" indent="3" pn="section-4.3-2">
          <li pn="section-4.3-2.1">
              The <xref target="RFC5705" format="default" sectionFormat="of" derivedContent="RFC5705">disambiguating label string</xref> <bcp14>MUST</bcp14>
              be "EXPORTER-network-time-security".
            </li>
          <li pn="section-4.3-2.2">
              The <xref target="RFC5705" format="default" sectionFormat="of" derivedContent="RFC5705">per-association context 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 anchor="nts-extension-fields-for-ntpv4" numbered="true" toc="include" removeInRFC="false" pn="section-5">
      <name slugifiedName="name-nts-extension-fields-for-nt">NTS Extension Fields for NTPv4</name>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-5.1">
        <name slugifiedName="name-key-extraction-for-ntpv4">Key Extraction (for NTPv4)</name>
        <t indent="0" pn="section-5.1-1">
          Following a successful run of the NTS-KE protocol wherein Protocol
          ID 0 (NTPv4) is selected as a Next Protocol, two AEAD keys <bcp14>SHALL</bcp14> be
          extracted: a client-to-server (C2S) key and a server-to-client (S2C)
          key. These keys <bcp14>SHALL</bcp14> be computed with the HKDF defined in
          Section <xref target="RFC8446" section="7.5" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8446#section-7.5" derivedContent="RFC8446"/>
          of <xref target="RFC8446" format="default" sectionFormat="of" derivedContent="RFC8446">RFC 8446</xref> using the
          following inputs:
        </t>
        <ul empty="true" spacing="normal" bare="false" indent="3" pn="section-5.1-2">
          <li pn="section-5.1-2.1">
              The <xref target="RFC5705" format="default" sectionFormat="of" derivedContent="RFC5705">disambiguating label string</xref>
            <bcp14>SHALL</bcp14> be "EXPORTER-network-time-security".
            </li>
          <li pn="section-5.1-2.2">
            <t indent="0" pn="section-5.1-2.2.1">
              The <xref target="RFC5705" format="default" sectionFormat="of" derivedContent="RFC5705">per-association context value</xref>
              <bcp14>SHALL</bcp14> consist of the following five octets:
            </t>
            <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.1-2.2.2">
              <li pn="section-5.1-2.2.2.1">
                  The first two octets <bcp14>SHALL</bcp14> be zero (the Protocol ID for
                  NTPv4).
                </li>
              <li pn="section-5.1-2.2.2.2">
                  The next two octets <bcp14>SHALL</bcp14> be the Numeric Identifier of the
                  negotiated AEAD algorithm in network byte order.
                </li>
              <li pn="section-5.1-2.2.2.3">
                  The final octet <bcp14>SHALL</bcp14> be 0x00 for the C2S key and 0x01 for the
                  S2C key.
                </li>
            </ul>
          </li>
        </ul>
        <t indent="0" pn="section-5.1-3">
          Implementations wishing to derive additional keys for private or
          experimental use <bcp14>MUST NOT</bcp14> do so by extending the above-specified
          syntax for per-association context values. Instead, they <bcp14>SHOULD</bcp14> use
          their own disambiguating label string. Note that <xref target="RFC5705" format="default" sectionFormat="of" derivedContent="RFC5705">RFC 5705</xref> provides that disambiguating label
          strings beginning with "EXPERIMENTAL" <bcp14>MAY</bcp14> be used without
          IANA registration.
        </t>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-5.2">
        <name slugifiedName="name-packet-structure-overview">Packet Structure Overview</name>
        <t indent="0" pn="section-5.2-1">
          In general, an NTS-protected NTPv4 packet consists of the following:
        </t>
        <ul empty="true" spacing="normal" bare="false" indent="3" pn="section-5.2-2">
          <li pn="section-5.2-2.1">
              The usual 48-octet NTP header, which is authenticated but not
              encrypted.
            </li>
          <li pn="section-5.2-2.2">
              Some extension fields, which are authenticated but not encrypted.
            </li>
          <li pn="section-5.2-2.3">
              An extension field that contains AEAD output (i.e., an
              authentication tag and possible ciphertext). The corresponding
              plaintext, if non-empty, consists of some extension fields that
              benefit from both encryption and authentication.
            </li>
          <li pn="section-5.2-2.4">
              Possibly, some additional extension fields that are neither
              encrypted nor authenticated. In general, these are discarded by the
              receiver.
            </li>
        </ul>
        <t indent="0" pn="section-5.2-3">
          Always included among the authenticated or authenticated-and-encrypted
          extension fields are a cookie extension field and a unique identifier
          extension field, as described in <xref target="protocol-details" format="default" sectionFormat="of" derivedContent="Section 5.7"/>. The purpose of the
          cookie extension field is to enable the server to offload storage of
          session state onto the client. The purpose of the unique identifier
          extension field is to protect the client from replay attacks.
        </t>
      </section>
      <section anchor="unique-identifier-extension-field" numbered="true" toc="include" removeInRFC="false" pn="section-5.3">
        <name slugifiedName="name-the-unique-identifier-exten">The Unique Identifier Extension Field</name>
        <t indent="0" pn="section-5.3-1">
          The Unique Identifier extension field provides the client with a
          cryptographically strong means of detecting replayed packets. It has a
          Field Type of 0x0104. When the extension field is included in a
          client packet (mode 3), its body <bcp14>SHALL</bcp14> consist of a string of octets
          generated by a <xref target="RFC4086" format="default" sectionFormat="of" derivedContent="RFC4086">cryptographically 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
          (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
          packets generated by NTS-implementing servers in response to client
          packets containing this extension field <bcp14>MUST</bcp14> also contain this field
          with the same content as in the client's request. The field's use in
          modes other than client-server is not defined.
        </t>
        <t indent="0" pn="section-5.3-2">
          This extension field <bcp14>MAY</bcp14> also be used standalone, without NTS, in
          which case it provides the client with a means of detecting spoofed
          packets from off-path attackers. Historically, NTP's origin timestamp
          field has played both these roles, but this
          is suboptimal for cryptographic purposes because it is only 64 bits long, and depending on
          implementation details, most of those bits may be predictable. In
          contrast, the Unique Identifier extension field enables a degree of
          unpredictability and collision resistance more consistent with
          cryptographic best practice.
        </t>
      </section>
      <section anchor="nts-cookie-extension-field" numbered="true" toc="include" removeInRFC="false" pn="section-5.4">
        <name slugifiedName="name-the-nts-cookie-extension-fi">The NTS Cookie Extension Field</name>
        <t indent="0" pn="section-5.4-1">
          The NTS Cookie extension field has a Field Type of 0x0204. Its
          purpose is to carry information that enables the server to recompute
          keys and other session state without having to store any per-client
          state. The contents of its body <bcp14>SHALL</bcp14> be implementation-defined, and
          clients <bcp14>MUST NOT</bcp14> attempt to interpret them.
          See <xref target="suggested-format-for-nts-cookies" format="default" sectionFormat="of" derivedContent="Section 6"/> 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).
        </t>
      </section>
      <section anchor="nts-cookie-placeholder-extension-field" numbered="true" toc="include" removeInRFC="false" pn="section-5.5">
        <name slugifiedName="name-the-nts-cookie-placeholder-">The NTS Cookie Placeholder Extension Field</name>
        <t indent="0" pn="section-5.5-1">
          The NTS Cookie Placeholder extension field has a Field Type of
          0x0304.  When this extension field is included in a client packet
          (mode 3), it communicates to the server that the client wishes it to
          send additional cookies in its response. This extension field <bcp14>MUST NOT</bcp14>
          be included in NTP packets whose mode is other than 3.
        </t>
        <t indent="0" pn="section-5.5-2">
          Whenever an NTS Cookie Placeholder extension field is present, it <bcp14>MUST</bcp14>
          be accompanied by an NTS Cookie extension field. The body length of
          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
          serves to ensure that the response will not be larger than the
          request, in order to improve timekeeping precision and prevent DDoS
          amplification. The contents of the NTS Cookie Placeholder extension
          field's body <bcp14>SHOULD</bcp14> be all zeros and, aside from checking its length,
          <bcp14>MUST</bcp14> be ignored by the server.
        </t>
      </section>
      <section anchor="nts-aeef-extension-field" numbered="true" toc="include" removeInRFC="false" pn="section-5.6">
        <name slugifiedName="name-the-nts-authenticator-and-e">The NTS Authenticator and Encrypted Extension Fields Extension Field</name>
        <t indent="0" pn="section-5.6-1">
          The NTS Authenticator and Encrypted Extension Fields extension field
          is the central cryptographic element of an NTS-protected NTP packet.
          Its Field Type is 0x0404. It <bcp14>SHALL</bcp14> be formatted according to
          <xref target="fig-aeef-field" format="default" sectionFormat="of" derivedContent="Figure 4"/> and include the following fields:
        </t>
        <dl newline="false" spacing="normal" indent="3" pn="section-5.6-2">
          <dt pn="section-5.6-2.1">Nonce Length:</dt>
          <dd pn="section-5.6-2.2">Two octets in network byte order, giving the length
              of the Nonce field, excluding any padding, interpreted as an
              unsigned integer.
            </dd>
          <dt pn="section-5.6-2.3">Ciphertext Length:</dt>
          <dd pn="section-5.6-2.4">Two octets in network byte order, giving the
              length of the Ciphertext field, excluding any padding, interpreted
              as an unsigned integer.
            </dd>
          <dt pn="section-5.6-2.5">Nonce:</dt>
          <dd pn="section-5.6-2.6">A nonce as required by the negotiated AEAD algorithm. The
              end of the field is zero-padded to a word (four octets) boundary.
            </dd>
          <dt pn="section-5.6-2.7">Ciphertext:</dt>
          <dd pn="section-5.6-2.8">The output of the negotiated AEAD algorithm. The
              structure of this field is determined by the negotiated algorithm,
              but it typically contains an authentication tag in addition to the
              actual ciphertext. The end of the field is zero-padded to a word
              (four octets) boundary.
            </dd>
          <dt pn="section-5.6-2.9">Additional Padding:</dt>
          <dd pn="section-5.6-2.10">Clients that use a nonce length shorter than
              the maximum allowed by the negotiated AEAD algorithm may be required
              to include additional zero-padding. The necessary length of this
              field is specified below.
            </dd>
        </dl>
        <figure anchor="fig-aeef-field" align="left" suppress-title="false" pn="figure-4">
          <name slugifiedName="name-nts-authenticator-and-encry">NTS Authenticator and Encrypted Extension Fields Extension Field Format</name>
          <artwork name="" type="" align="left" alt="" pn="section-5.6-3.1">
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          Nonce Length         |      Ciphertext Length        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
.                                                               .
.          Nonce, including up to 3 octets padding              .
.                                                               .
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
.                                                               .
.        Ciphertext, including up to 3 octets padding           .
.                                                               .
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
.                                                               .
.                      Additional Padding                       .
.                                                               .
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork>
        </figure>
        <t indent="0" pn="section-5.6-4">
          The Ciphertext field <bcp14>SHALL</bcp14> be formed by providing the following inputs
          to the negotiated AEAD algorithm:
        </t>
        <dl newline="false" spacing="normal" indent="4" pn="section-5.6-5">
          <dt pn="section-5.6-5.1">K:</dt>
          <dd pn="section-5.6-5.2">For packets sent from the client to the server, the C2S key
              <bcp14>SHALL</bcp14> be used. For packets sent from the server to the client, the
              S2C key <bcp14>SHALL</bcp14> be used.
            </dd>
          <dt pn="section-5.6-5.3">A:</dt>
          <dd pn="section-5.6-5.4">The associated data <bcp14>SHALL</bcp14> consist of the portion of the NTP
              packet beginning from the start of the NTP header and ending at
              the end of the last extension field that precedes the NTS
              Authenticator and Encrypted Extension Fields extension field.
            </dd>
          <dt pn="section-5.6-5.5">P:</dt>
          <dd pn="section-5.6-5.6">The plaintext <bcp14>SHALL</bcp14> consist of all (if any) NTP extension fields to
              be encrypted; if multiple extension fields are present, they <bcp14>SHALL</bcp14> be
              joined by concatenation. Each such field <bcp14>SHALL</bcp14> be formatted in
              accordance with <xref target="RFC7822" format="default" sectionFormat="of" derivedContent="RFC7822">RFC 7822</xref>, except that, contrary to the RFC
              7822 requirement that fields have a minimum length of 16 or 28 octets,
              encrypted extension fields <bcp14>MAY</bcp14> be arbitrarily short (but still <bcp14>MUST</bcp14> be
              a multiple of 4 octets in length).
            </dd>
          <dt pn="section-5.6-5.7">N:</dt>
          <dd pn="section-5.6-5.8">The nonce <bcp14>SHALL</bcp14> be formed however required by the negotiated
              AEAD algorithm.
            </dd>
        </dl>
        <t indent="0" pn="section-5.6-6">
          The purpose of the Additional Padding field is to ensure
          that servers can always choose a nonce whose length is
          adequate to ensure its uniqueness, even if the client
          chooses a shorter one, and still ensure that the overall
          length of the server's response packet does not exceed the
          length of the request. For mode 4 (server) packets, no
          Additional Padding field is ever required.  For mode 3
          (client) packets, the length of the Additional Padding field
          <bcp14>SHALL</bcp14> be computed as follows.  Let 'N_LEN' be the padded
          length of the Nonce field. Let 'N_MAX' be, as specified
          by <xref target="RFC5116" format="default" sectionFormat="of" derivedContent="RFC5116">RFC 5116</xref>, the maximum
          permitted nonce length for the negotiated AEAD
          algorithm. Let 'N_REQ' be the lesser of 16 and N_MAX,
          rounded up to the nearest multiple of 4.  If N_LEN is
          greater than or equal to N_REQ, then no Additional Padding
          field is required. Otherwise, the Additional Padding field
          <bcp14>SHALL</bcp14> be at least N_REQ - N_LEN octets in length. Servers
          <bcp14>MUST</bcp14> enforce this requirement by discarding any packet that
          does not conform to it.
        </t>
        <t indent="0" pn="section-5.6-7">
          Senders are always free to include more Additional Padding
          than mandated by the above paragraph. Theoretically, it
          could be necessary to do so in order to bring the extension
          field to the minimum length required by <xref target="RFC7822" format="default" sectionFormat="of" derivedContent="RFC7822">RFC 7822</xref>. This should never happen in
          practice because any reasonable AEAD algorithm will have a nonce and
          an authenticator long enough to bring the extension field to
          its required length already.  Nonetheless, implementers are
          advised to explicitly handle this case and ensure that the
          extension field they emit is of legal length.
        </t>
        <t indent="0" pn="section-5.6-8">
          The NTS Authenticator and Encrypted Extension Fields extension field
          <bcp14>MUST NOT</bcp14> be included in NTP packets whose mode is other than 3
          (client) or 4 (server).
        </t>
      </section>
      <section anchor="protocol-details" numbered="true" toc="include" removeInRFC="false" pn="section-5.7">
        <name slugifiedName="name-protocol-details">Protocol Details</name>
        <t indent="0" pn="section-5.7-1">
          A client sending an NTS-protected request <bcp14>SHALL</bcp14> include the following
          extension fields as displayed in  <xref target="fig_NTSTimeSyncMessage" format="default" sectionFormat="of" derivedContent="Figure 5"/>:
        </t>
        <ul empty="true" spacing="normal" bare="false" indent="3" pn="section-5.7-2">
          <li pn="section-5.7-2.1">
              Exactly one Unique Identifier extension field that <bcp14>MUST</bcp14> be
              authenticated, <bcp14>MUST NOT</bcp14> be encrypted, and whose contents <bcp14>MUST</bcp14> be
              the output of a <xref target="RFC4086" format="default" sectionFormat="of" derivedContent="RFC4086">cryptographically secure random number generator
            </xref>.
          </li>
          <li pn="section-5.7-2.2">
              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 establishment
              server during the NTS-KE handshake or from the NTP server in
              response to a previous NTS-protected NTP request.
            </li>
          <li pn="section-5.7-2.3">
              Exactly one NTS Authenticator and Encrypted Extension Fields
              extension field, generated using an AEAD algorithm and C2S key
              established through NTS-KE.
            </li>
        </ul>
        <t indent="0" pn="section-5.7-3">
          To protect the client's privacy, the client <bcp14>SHOULD</bcp14> avoid reusing
          a cookie. If the client does not have any cookies that it has not
          already sent, it <bcp14>SHOULD</bcp14> initiate a rerun of the NTS-KE protocol. The
          client <bcp14>MAY</bcp14> reuse cookies in order to prioritize resilience over
          unlinkability. Which of the two that should be prioritized in any
          particular case is dependent on the application and the user's
          preference. <xref target="Unlinkability" format="default" sectionFormat="of" derivedContent="Section 9.1"/> describes the privacy
          considerations of this in further detail.
        </t>
        <t indent="0" pn="section-5.7-4">
          The client <bcp14>MAY</bcp14> include one or more NTS Cookie Placeholder 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
          <bcp14>SHOULD</bcp14> be such that if the client includes N placeholders and the server
          sends back N+1 cookies, the number of unused cookies stored by the
          client will come to eight. The client <bcp14>SHOULD NOT</bcp14> include more than seven
          NTS Cookie Placeholder extension fields in a request. When both the
          client and server adhere to all cookie-management guidance provided in
          this memo, the number of placeholder extension fields will equal the
          number of dropped packets since the last successful volley.
        </t>
        <t indent="0" pn="section-5.7-5">
          In rare circumstances, it may be necessary to include fewer
          NTS Cookie Placeholder extensions than recommended above in
          order to prevent datagram fragmentation. When cookies adhere
          to the format recommended in <xref target="suggested-format-for-nts-cookies" format="default" sectionFormat="of" derivedContent="Section 6"/> and the AEAD in
          use is the mandatory-to-implement AEAD_AES_SIV_CMAC_256,
          senders can include a cookie and seven placeholders and
          still have packet size fall comfortably below 1280 octets if
          no non-NTS-related extensions are used; 1280 octets is the
          minimum prescribed MTU for IPv6 and is generally safe
          for avoiding IPv4 fragmentation. Nonetheless,
          senders <bcp14>SHOULD</bcp14> include fewer cookies and placeholders than
          otherwise indicated if doing so is necessary to prevent
          fragmentation.
        </t>
        <figure anchor="fig_NTSTimeSyncMessage" align="left" suppress-title="false" pn="figure-5">
          <name slugifiedName="name-nts-protected-ntp-time-sync">NTS-Protected NTP Time Synchronization Messages</name>
          <artwork name="" type="" align="left" alt="" pn="section-5.7-6.1">
                +---------------------------------------+
                | - Verify time request message.        |
                | - Generate time response message.     |
                |   - Included NTPv4 extension fields:  |
                |      o Unique Identifier EF           |
                |      o NTS Authentication and         |
                |        Encrypted Extension Fields EF  |
                |        - NTS Cookie EF                |
                |        - &lt;NTS Cookie EF&gt;              |
                | - Transmit time request packet.       |
                +-----------------+---------------------+
                                  |
                                  |
Server -----------+---------------+-----+-----------------------&gt;
                  ^                      \
                 /                        \
  Time request  /                          \   Time response
  (mode 3)     /                            \  (mode 4)
              /                              \
             /                                V
Client -----+---------------------------------+-----------------&gt;
            |                                 |
            |                                 |
            |                                 |
+-----------+-----------------------+   +-----+------------------+
|- Generate time request message.   |   |- Verify time response  |
| - Include NTPv4 Extension fields: |   |  message.              |
|    o Unique Identifier EF         |   |- Extract cookie(s).    |
|    o NTS Cookie EF                |   |- Time synchronization  |
|    o &lt;NTS Cookie Placeholder EF&gt;  |   |  processing.           |
|                                   |   +------------------------+
|- Generate AEAD tag of NTP message.|
|- Add NTS Authentication and       |
|  Encrypted Extension Fields EF.   |
|- Transmit time request packet.    |
+-----------------------------------+
</artwork>
        </figure>
        <t indent="0" pn="section-5.7-7">
          The client <bcp14>MAY</bcp14> include additional (non-NTS-related) extension fields
          that <bcp14>MAY</bcp14> appear prior to the NTS Authenticator and Encrypted Extension
          Fields extension fields (therefore authenticated but not encrypted),
          within it (therefore encrypted and authenticated), or after it
          (therefore neither encrypted nor authenticated).
          The server <bcp14>MUST</bcp14> discard any unauthenticated extension
          fields. Future specifications of extension fields <bcp14>MAY</bcp14> provide
          exceptions to this rule.
        </t>
        <t indent="0" pn="section-5.7-8">
          Upon receiving an NTS-protected request, the server <bcp14>SHALL</bcp14> (through some
          implementation-defined mechanism) use the cookie to recover the AEAD
          algorithm, C2S key, and S2C key associated with the request, and then
          use the C2S key to authenticate the packet and decrypt the ciphertext.
          If the cookie is valid and authentication and decryption succeed, the
          server <bcp14>SHALL</bcp14> include the following extension fields in its response:
        </t>
        <ul empty="true" spacing="normal" bare="false" indent="3" pn="section-5.7-9">
          <li pn="section-5.7-9.1">
              Exactly one Unique Identifier extension field that <bcp14>MUST</bcp14> be
              authenticated, <bcp14>MUST NOT</bcp14> be encrypted, and whose contents <bcp14>SHALL</bcp14> echo
              those provided by the client.
            </li>
          <li pn="section-5.7-9.2">
              Exactly one NTS Authenticator and Encrypted Extension Fields
              extension field, generated using the AEAD algorithm and S2C key
              recovered from the cookie provided by the client.
            </li>
          <li pn="section-5.7-9.3">
              One or more NTS Cookie extension fields that <bcp14>MUST</bcp14> be authenticated
              and encrypted. The number of NTS Cookie extension fields included
              <bcp14>SHOULD</bcp14> be equal to, and <bcp14>MUST NOT</bcp14> exceed, one plus the number of
              valid NTS Cookie Placeholder extension fields included in the
              request. The cookies returned in those fields <bcp14>MUST</bcp14> be valid for use
              with the NTP server that sent them. They <bcp14>MAY</bcp14> be valid for other NTP
              servers as well, but there is no way for the server to indicate
              this.
            </li>
        </ul>
        <t indent="0" pn="section-5.7-10">
          We emphasize the contrast that NTS Cookie extension fields <bcp14>MUST NOT</bcp14> be
          encrypted when sent from client to server but <bcp14>MUST</bcp14> be encrypted when
          sent from server to client. The former is necessary in order for the
          server to be able to recover the C2S and S2C keys, while the latter is
          necessary to satisfy the unlinkability goals discussed in <xref target="Unlinkability" format="default" sectionFormat="of" derivedContent="Section 9.1"/>. We emphasize also that "encrypted"
          means encapsulated within the NTS Authenticator and Encrypted
          Extensions extension field. While the body of an NTS Cookie extension
          field will generally consist of some sort of AEAD output (regardless of
          whether the recommendations of <xref target="suggested-format-for-nts-cookies" format="default" sectionFormat="of" derivedContent="Section 6"/> are precisely followed),
          this is not sufficient to make the extension field
          "encrypted".
        </t>
        <t indent="0" pn="section-5.7-11">
          The server <bcp14>MAY</bcp14> include additional (non-NTS-related) extension fields
          that <bcp14>MAY</bcp14> appear prior to the NTS Authenticator and Encrypted Extension
          Fields extension field (therefore authenticated but not encrypted),
          within it (therefore encrypted and authenticated), or after it
          (therefore neither encrypted nor authenticated).
          The client <bcp14>MUST</bcp14> discard any unauthenticated extension fields.
          Future specifications of extension fields <bcp14>MAY</bcp14> provide exceptions to
          this rule.
        </t>
        <t indent="0" pn="section-5.7-12">
          Upon receiving an NTS-protected response, the client <bcp14>MUST</bcp14> verify that
          the Unique Identifier matches that of an outstanding request, and that
          the packet is authentic under the S2C key associated with that
          request. If either of these checks fails, the packet <bcp14>MUST</bcp14> be discarded
          without further processing. In particular, the client <bcp14>MUST</bcp14> discard
          unprotected responses to NTS-protected requests.
        </t>
        <t indent="0" pn="section-5.7-13">
          If the server is unable to validate the cookie or authenticate the
          request, it <bcp14>SHOULD</bcp14> respond with a Kiss-o'-Death (KoD) packet (see
          Section <xref target="RFC5905" section="7.4" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5905#section-7.4" derivedContent="RFC5905"/>
          of <xref target="RFC5905" format="default" sectionFormat="of" derivedContent="RFC5905">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.
        </t>
        <t indent="0" pn="section-5.7-14">
          If the NTP server has previously responded with authentic NTS-protected
          NTP packets, the client <bcp14>MUST</bcp14> verify that
          any KoD packets received from the server contain the Unique Identifier
          extension field and that the Unique Identifier matches that of an
          outstanding request. If this check fails, the packet <bcp14>MUST</bcp14> be discarded
          without further processing. If this check passes, the client <bcp14>MUST</bcp14> comply
          with Section <xref target="RFC5905" section="7.4" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5905#section-7.4" derivedContent="RFC5905"/>
          of <xref target="RFC5905" format="default" sectionFormat="of" derivedContent="RFC5905">RFC 5905</xref> where required.
        </t>
        <t indent="0" pn="section-5.7-15">
          A client <bcp14>MAY</bcp14> automatically rerun the NTS-KE protocol upon 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
          retries. Requirements for retry intervals in NTS-KE are described in
          <xref target="nts-ke-retry" format="default" sectionFormat="of" derivedContent="Section 4.2"/>.
        </t>
        <t indent="0" pn="section-5.7-16">
          Upon reception of the NTS NAK kiss code, the client <bcp14>SHOULD</bcp14> 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
          cookies, AEAD keys, and parameters. If the NTS-KE handshake succeeds,
          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
          client <bcp14>SHOULD</bcp14> continue polling the NTP server using the cookies and
          parameters it has.
        </t>
        <t indent="0" pn="section-5.7-17">
          To allow for NTP session restart when the NTS-KE server is unavailable
          and to reduce NTS-KE server load, the client <bcp14>SHOULD</bcp14> keep at least one
          unused but recent cookie, AEAD keys, negotiated AEAD algorithm, and
          other necessary parameters in persistent storage. This way, the client
          is able to resume the NTP session without performing renewed NTS-KE
          negotiation.
        </t>
      </section>
    </section>
    <section anchor="suggested-format-for-nts-cookies" numbered="true" toc="include" removeInRFC="false" pn="section-6">
      <name slugifiedName="name-suggested-format-for-nts-co">Suggested Format for NTS Cookies</name>
      <t indent="0" pn="section-6-1">
        This section is non-normative. It gives a suggested way for servers to
        construct NTS cookies. All normative requirements are stated in
        <xref target="new-cookie-for-ntpv4" format="default" sectionFormat="of" derivedContent="Section 4.1.6"/> and <xref target="nts-cookie-extension-field" format="default" sectionFormat="of" derivedContent="Section 5.4"/>.
      </t>
      <t indent="0" pn="section-6-2">
        The role of cookies in NTS is closely analogous to that of session
        tickets in TLS. Accordingly, the thematic resemblance of this section to
        <xref target="RFC5077" format="default" sectionFormat="of" derivedContent="RFC5077">RFC 5077</xref> is deliberate, and the reader
        should likewise take heed of its security considerations.
      </t>
      <t indent="0" pn="section-6-3">
        Servers should select an AEAD algorithm that they will use to encrypt
        and authenticate cookies. The chosen algorithm should be one such as
        <xref target="RFC5297" format="default" sectionFormat="of" derivedContent="RFC5297">AEAD_AES_SIV_CMAC_256</xref>, which resists
        accidental nonce reuse. It need not be the same as the one that was
        negotiated with the client. Servers should randomly generate and store a
        secret master AEAD key 'K'. Servers should additionally choose a non-secret,
        unique value 'I' as key identifier for 'K'.
      </t>
      <t indent="0" pn="section-6-4">
        Servers should periodically (e.g., once daily) generate a new pair '(I,K)'
        and immediately switch to using these values for all newly-generated
        cookies. Following each such key rotation, servers should
        securely erase any previously generated keys that should now be expired.
        Servers should continue to accept any cookie generated using keys that
        they have not yet erased, even if those keys are no longer current.
        Erasing old keys provides for forward secrecy, limiting the scope of
        what old information can be stolen if a master key is somehow
        compromised. Holding on to a limited number of old keys allows clients
        to seamlessly transition from one generation to the next without having
        to perform a new NTS-KE handshake.
      </t>
      <t indent="0" pn="section-6-5">
        The need to keep keys synchronized between NTS-KE and NTP servers as
        well as across load-balanced clusters can make automatic key rotation
        challenging. However, the task can be accomplished without the need for
        central key-management infrastructure by using a ratchet, i.e., making
        each new key a deterministic, cryptographically pseudorandom function
        of its predecessor. A recommended concrete implementation of this
        approach is to use <xref target="RFC5869" format="default" sectionFormat="of" derivedContent="RFC5869">HKDF</xref> to derive new
        keys, using the key's predecessor as Input Keying Material and its key
        identifier as a salt.
      </t>
      <t indent="0" pn="section-6-6">
        To form a cookie, servers should first form a plaintext 'P' consisting
        of the following fields:
      </t>
      <ul empty="true" spacing="normal" bare="false" indent="3" pn="section-6-7">
        <li pn="section-6-7.1">The AEAD algorithm negotiated during NTS-KE.</li>
        <li pn="section-6-7.2">The S2C key.</li>
        <li pn="section-6-7.3">The C2S key.</li>
      </ul>
      <t indent="0" pn="section-6-8">
        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
        associated data.
      </t>
      <t indent="0" pn="section-6-9">
        The cookie should consist of the tuple '(I,N,C)'.
      </t>
      <t indent="0" pn="section-6-10">
        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
        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
        decrypt and verify ciphertext 'C' using key 'K' and nonce 'N' with no
        associated data. If decryption or verification fails, reply with an NTS
        NAK. Otherwise, parse out the contents of the resulting plaintext 'P' to
        obtain the negotiated AEAD algorithm, S2C key, and C2S key.
      </t>
    </section>
    <section anchor="iana-considerations" numbered="true" toc="include" removeInRFC="false" pn="section-7">
      <name slugifiedName="name-iana-considerations">IANA Considerations</name>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-7.1">
        <name slugifiedName="name-service-name-and-transport-">Service Name and Transport Protocol Port Number Registry</name>
        <t indent="0" pn="section-7.1-1">
          IANA has allocated the following entry in the
          "Service Name and Transport Protocol
          Port Number Registry" <xref target="RFC6335" format="default" sectionFormat="of" derivedContent="RFC6335"/>:
        </t>
        <dl newline="false" spacing="normal" indent="3" pn="section-7.1-2">
          <dt pn="section-7.1-2.1">Service Name:</dt>
          <dd pn="section-7.1-2.2">ntske</dd>
          <dt pn="section-7.1-2.3">Port Number:</dt>
          <dd pn="section-7.1-2.4">4460</dd>
          <dt pn="section-7.1-2.5">Transport Protocol:</dt>
          <dd pn="section-7.1-2.6">tcp</dd>
          <dt pn="section-7.1-2.7">Description:</dt>
          <dd pn="section-7.1-2.8">Network Time Security Key Establishment</dd>
          <dt pn="section-7.1-2.9">Assignee:</dt>
          <dd pn="section-7.1-2.10">IESG &lt;iesg@ietf.org&gt;</dd>
          <dt pn="section-7.1-2.11">Contact:</dt>
          <dd pn="section-7.1-2.12">IETF Chair &lt;chair@ietf.org&gt;</dd>
          <dt pn="section-7.1-2.13">Registration Date:</dt>
          <dd pn="section-7.1-2.14">2020-04-07</dd>
          <dt pn="section-7.1-2.15">Reference:</dt>
          <dd pn="section-7.1-2.16">RFC 8915</dd>
        </dl>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-7.2">
        <name slugifiedName="name-tls-application-layer-proto">TLS Application-Layer Protocol Negotiation (ALPN) Protocol IDs Registry</name>
        <t indent="0" pn="section-7.2-1">
          IANA has allocated the following entry in the
          "TLS Application-Layer Protocol Negotiation
            (ALPN) Protocol IDs" registry <xref target="RFC7301" format="default" sectionFormat="of" derivedContent="RFC7301"/>:
        </t>
        <dl newline="false" spacing="normal" indent="3" pn="section-7.2-2">
          <dt pn="section-7.2-2.1">Protocol:</dt>
          <dd pn="section-7.2-2.2">Network Time Security Key Establishment, version 1</dd>
          <dt pn="section-7.2-2.3">Identification Sequence:</dt>
          <dd pn="section-7.2-2.4">0x6E 0x74 0x73 0x6B 0x65 0x2F 0x31 ("ntske/1")</dd>
          <dt pn="section-7.2-2.5">Reference:</dt>
          <dd pn="section-7.2-2.6">RFC 8915, <xref target="nts-ke" format="default" sectionFormat="of" derivedContent="Section 4"/></dd>
        </dl>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-7.3">
        <name slugifiedName="name-tls-exporter-labels-registr">TLS Exporter Labels Registry</name>
        <t indent="0" pn="section-7.3-1">
          IANA has allocated the following entry in the
          <xref target="RFC5705" format="default" sectionFormat="of" derivedContent="RFC5705">TLS Exporter Labels registry</xref>:
        </t>
        <table align="center" pn="table-1">
          <thead>
            <tr>
              <th align="left" colspan="1" rowspan="1">Value</th>
              <th align="left" colspan="1" rowspan="1">DTLS-OK</th>
              <th align="left" colspan="1" rowspan="1">Recommended</th>
              <th align="left" colspan="1" rowspan="1">Reference</th>
              <th align="left" colspan="1" rowspan="1">Note</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left" colspan="1" rowspan="1">EXPORTER-network-time-security</td>
              <td align="left" colspan="1" rowspan="1">Y</td>
              <td align="left" colspan="1" rowspan="1">Y</td>
              <td align="left" colspan="1" rowspan="1">RFC 8915, <xref target="key-extraction" format="default" sectionFormat="of" derivedContent="Section 4.3"/></td>
              <td align="left" colspan="1" rowspan="1"/>
            </tr>
          </tbody>
        </table>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-7.4">
        <name slugifiedName="name-ntp-kiss-o-death-codes-regi">NTP Kiss-o'-Death Codes Registry</name>
        <t indent="0" pn="section-7.4-1">
          IANA has allocated the following entry in the
          "NTP Kiss-o'-Death Codes"
	  registry <xref target="RFC5905" format="default" sectionFormat="of" derivedContent="RFC5905"/>:
        </t>
        <table align="center" pn="table-2">
          <thead>
            <tr>
              <th align="left" colspan="1" rowspan="1">Code</th>
              <th align="left" colspan="1" rowspan="1">Meaning</th>
              <th align="left" colspan="1" rowspan="1">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left" colspan="1" rowspan="1">NTSN</td>
              <td align="left" colspan="1" rowspan="1">Network Time Security (NTS) negative-acknowledgment (NAK)</td>
              <td align="left" colspan="1" rowspan="1">RFC 8915, <xref target="protocol-details" format="default" sectionFormat="of" derivedContent="Section 5.7"/></td>
            </tr>
          </tbody>
        </table>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-7.5">
        <name slugifiedName="name-ntp-extension-field-types-r">NTP Extension Field Types Registry</name>
        <t indent="0" pn="section-7.5-1">
          IANA has allocated the following entries in the
          "NTP Extension Field Types" registry <xref target="RFC5905" format="default" sectionFormat="of" derivedContent="RFC5905"/>:
        </t>
        <table align="center" pn="table-3">
          <thead>
            <tr>
              <th align="left" colspan="1" rowspan="1">Field Type</th>
              <th align="left" colspan="1" rowspan="1">Meaning</th>
              <th align="left" colspan="1" rowspan="1">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left" colspan="1" rowspan="1">0x0104</td>
              <td align="left" colspan="1" rowspan="1">Unique Identifier</td>
              <td align="left" colspan="1" rowspan="1">RFC 8915,
            <xref target="unique-identifier-extension-field" format="default" sectionFormat="of" derivedContent="Section 5.3"/></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">0x0204</td>
              <td align="left" colspan="1" rowspan="1">NTS Cookie</td>
              <td align="left" colspan="1" rowspan="1">RFC 8915, <xref target="nts-cookie-extension-field" format="default" sectionFormat="of" derivedContent="Section 5.4"/></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">0x0304</td>
              <td align="left" colspan="1" rowspan="1">NTS Cookie Placeholder</td>
              <td align="left" colspan="1" rowspan="1">RFC 8915,
            <xref target="nts-cookie-placeholder-extension-field" format="default" sectionFormat="of" derivedContent="Section 5.5"/></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">0x0404</td>
              <td align="left" colspan="1" rowspan="1">NTS Authenticator and Encrypted Extension Fields</td>
              <td align="left" colspan="1" rowspan="1">RFC 8915, <xref target="nts-aeef-extension-field" format="default" sectionFormat="of" derivedContent="Section 5.6"/></td>
            </tr>
          </tbody>
        </table>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-7.6">
        <name slugifiedName="name-network-time-security-key-e">Network Time Security Key Establishment Record Types Registry</name>
        <t indent="0" pn="section-7.6-1">
          IANA has created a new registry entitled
          "Network Time Security Key Establishment Record Types".
          Entries have the following fields:
        </t>
        <dl newline="false" spacing="normal" indent="3" pn="section-7.6-2">
          <dt pn="section-7.6-2.1">Record Type Number (<bcp14>REQUIRED</bcp14>):</dt>
          <dd pn="section-7.6-2.2">An integer in the range
              0-32767 inclusive.
            </dd>
          <dt pn="section-7.6-2.3">Description (<bcp14>REQUIRED</bcp14>):</dt>
          <dd pn="section-7.6-2.4">A short text description of the purpose of
              the field.
            </dd>
          <dt pn="section-7.6-2.5">Reference (<bcp14>REQUIRED</bcp14>):</dt>
          <dd pn="section-7.6-2.6">A reference to a document specifying the
              semantics of the record.
            </dd>
        </dl>
        <t indent="0" pn="section-7.6-3">
          The registration policy varies by Record Type Number, as follows:
        </t>
        <dl newline="false" spacing="normal" indent="3" pn="section-7.6-4">
          <dt pn="section-7.6-4.1">0-1023:</dt>
          <dd pn="section-7.6-4.2">IETF Review</dd>
          <dt pn="section-7.6-4.3">1024-16383:</dt>
          <dd pn="section-7.6-4.4">Specification Required</dd>
          <dt pn="section-7.6-4.5">16384-32767:</dt>
          <dd pn="section-7.6-4.6">Private or Experimental Use</dd>
        </dl>
        <t indent="0" pn="section-7.6-5">
          The initial contents of this registry are as follows:
        </t>
        <table align="center" pn="table-4">
          <thead>
            <tr>
              <th align="left" colspan="1" rowspan="1">Record Type Number</th>
              <th align="left" colspan="1" rowspan="1">Description</th>
              <th align="left" colspan="1" rowspan="1">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left" colspan="1" rowspan="1">0</td>
              <td align="left" colspan="1" rowspan="1">End of Message</td>
              <td align="left" colspan="1" rowspan="1">RFC 8915, <xref target="end-of-message" format="default" sectionFormat="of" derivedContent="Section 4.1.1"/></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">1</td>
              <td align="left" colspan="1" rowspan="1">NTS Next Protocol Negotiation</td>
              <td align="left" colspan="1" rowspan="1">RFC 8915,
            <xref target="nts-next-protocol-negotiation" format="default" sectionFormat="of" derivedContent="Section 4.1.2"/></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">2</td>
              <td align="left" colspan="1" rowspan="1">Error</td>
              <td align="left" colspan="1" rowspan="1">RFC 8915, <xref target="nts-error" format="default" sectionFormat="of" derivedContent="Section 4.1.3"/></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">3</td>
              <td align="left" colspan="1" rowspan="1">Warning</td>
              <td align="left" colspan="1" rowspan="1">RFC 8915, <xref target="nts-warning" format="default" sectionFormat="of" derivedContent="Section 4.1.4"/></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">4</td>
              <td align="left" colspan="1" rowspan="1">AEAD Algorithm Negotiation</td>
              <td align="left" colspan="1" rowspan="1">RFC 8915, <xref target="aead-algorithm-negotiation" format="default" sectionFormat="of" derivedContent="Section 4.1.5"/></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">5</td>
              <td align="left" colspan="1" rowspan="1">New Cookie for NTPv4</td>
              <td align="left" colspan="1" rowspan="1">RFC 8915, <xref target="new-cookie-for-ntpv4" format="default" sectionFormat="of" derivedContent="Section 4.1.6"/></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">6</td>
              <td align="left" colspan="1" rowspan="1">NTPv4 Server Negotiation</td>
              <td align="left" colspan="1" rowspan="1">RFC 8915, <xref target="ntp-server-negotiation" format="default" sectionFormat="of" derivedContent="Section 4.1.7"/></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">7</td>
              <td align="left" colspan="1" rowspan="1">NTPv4 Port Negotiation</td>
              <td align="left" colspan="1" rowspan="1">RFC 8915, <xref target="ntp-port-negotiation" format="default" sectionFormat="of" derivedContent="Section 4.1.8"/></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">8-16383</td>
              <td align="left" colspan="1" rowspan="1">Unassigned</td>
              <td align="left" colspan="1" rowspan="1"/>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">16384-32767</td>
              <td align="left" colspan="1" rowspan="1">Reserved for Private or Experimental Use</td>
              <td align="left" colspan="1" rowspan="1">RFC 8915</td>
            </tr>
          </tbody>
        </table>
      </section>
      <section numbered="true" anchor="iana-nts-next-protocols" toc="include" removeInRFC="false" pn="section-7.7">
        <name slugifiedName="name-network-time-security-next-">Network Time Security Next Protocols Registry</name>
        <t indent="0" pn="section-7.7-1">
          IANA has created a new registry entitled
          "Network Time Security Next Protocols". Entries have
          the following fields:
        </t>
        <dl newline="false" spacing="normal" indent="3" pn="section-7.7-2">
          <dt pn="section-7.7-2.1">Protocol ID (<bcp14>REQUIRED</bcp14>):</dt>
          <dd pn="section-7.7-2.2">An integer in the range 0-65535 inclusive,
              functioning as an identifier.
            </dd>
          <dt pn="section-7.7-2.3">Protocol Name (<bcp14>REQUIRED</bcp14>):</dt>
          <dd pn="section-7.7-2.4">A short text string naming the protocol
              being identified.
            </dd>
          <dt pn="section-7.7-2.5">Reference (<bcp14>REQUIRED</bcp14>):</dt>
          <dd pn="section-7.7-2.6"> A reference to a relevant specification
              document.
            </dd>
        </dl>
        <t indent="0" pn="section-7.7-3">
          The registration policy varies by Protocol ID, as follows:
        </t>
        <dl newline="false" spacing="normal" indent="3" pn="section-7.7-4">
          <dt pn="section-7.7-4.1">0-1023:</dt>
          <dd pn="section-7.7-4.2">IETF Review</dd>
          <dt pn="section-7.7-4.3">1024-32767:</dt>
          <dd pn="section-7.7-4.4">Specification Required</dd>
          <dt pn="section-7.7-4.5">32768-65535:</dt>
          <dd pn="section-7.7-4.6">Private or Experimental Use</dd>
        </dl>
        <t indent="0" pn="section-7.7-5">
          The initial contents of this registry are as follows:
        </t>
        <table align="center" pn="table-5">
          <thead>
            <tr>
              <th align="left" colspan="1" rowspan="1">Protocol ID</th>
              <th align="left" colspan="1" rowspan="1">Protocol Name</th>
              <th align="left" colspan="1" rowspan="1">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left" colspan="1" rowspan="1">0</td>
              <td align="left" colspan="1" rowspan="1">Network Time Protocol version 4 (NTPv4)</td>
              <td align="left" colspan="1" rowspan="1">RFC 8915</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">1-32767</td>
              <td align="left" colspan="1" rowspan="1">Unassigned</td>
              <td align="left" colspan="1" rowspan="1"/>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">32768-65535</td>
              <td align="left" colspan="1" rowspan="1">Reserved for Private or Experimental Use</td>
              <td align="left" colspan="1" rowspan="1">RFC 8915</td>
            </tr>
          </tbody>
        </table>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-7.8">
        <name slugifiedName="name-network-time-security-error">Network Time Security Error and Warning Codes Registries</name>
        <t indent="0" pn="section-7.8-1">
          IANA has created two new registries entitled
          "Network Time Security Error Codes" and
          "Network Time Security Warning Codes". Entries in each 
          have the following fields:
        </t>
        <dl newline="false" spacing="normal" indent="3" pn="section-7.8-2">
          <dt pn="section-7.8-2.1">Number (<bcp14>REQUIRED</bcp14>):</dt>
          <dd pn="section-7.8-2.2">An integer in the range 0-65535 inclusive</dd>
          <dt pn="section-7.8-2.3">Description (<bcp14>REQUIRED</bcp14>):</dt>
          <dd pn="section-7.8-2.4">A short text description of the
              condition.</dd>
          <dt pn="section-7.8-2.5">Reference (<bcp14>REQUIRED</bcp14>):</dt>
          <dd pn="section-7.8-2.6">A reference to a relevant specification
              document.</dd>
        </dl>
        <t indent="0" pn="section-7.8-3">
          The registration policy varies by Number, as follows:
        </t>
        <dl newline="false" spacing="normal" indent="3" pn="section-7.8-4">
          <dt pn="section-7.8-4.1">0-1023:</dt>
          <dd pn="section-7.8-4.2">IETF Review</dd>
          <dt pn="section-7.8-4.3">1024-32767:</dt>
          <dd pn="section-7.8-4.4">Specification Required</dd>
          <dt pn="section-7.8-4.5">32768-65535:</dt>
          <dd pn="section-7.8-4.6">Private or Experimental Use</dd>
        </dl>
        <t indent="0" pn="section-7.8-5">
          The initial contents of the "Network Time Security Error Codes" registry
          are as follows:
        </t>
        <table align="center" pn="table-6">
          <thead>
            <tr>
              <th align="left" colspan="1" rowspan="1">Number</th>
              <th align="left" colspan="1" rowspan="1">Description</th>
              <th align="left" colspan="1" rowspan="1">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left" colspan="1" rowspan="1">0</td>
              <td align="left" colspan="1" rowspan="1">Unrecognized Critical Record</td>
              <td align="left" colspan="1" rowspan="1">RFC 8915, <xref target="nts-error" format="default" sectionFormat="of" derivedContent="Section 4.1.3"/></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">1</td>
              <td align="left" colspan="1" rowspan="1">Bad Request</td>
              <td align="left" colspan="1" rowspan="1">RFC 8915, <xref target="nts-error" format="default" sectionFormat="of" derivedContent="Section 4.1.3"/></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">2</td>
              <td align="left" colspan="1" rowspan="1">Internal Server Error</td>
              <td align="left" colspan="1" rowspan="1">RFC 8915, <xref target="nts-error" format="default" sectionFormat="of" derivedContent="Section 4.1.3"/></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">3-32767</td>
              <td align="left" colspan="1" rowspan="1">Unassigned</td>
              <td align="left" colspan="1" rowspan="1"/>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">32768-65535</td>
              <td align="left" colspan="1" rowspan="1">Reserved for Private or Experimental Use</td>
              <td align="left" colspan="1" rowspan="1">RFC 8915</td>
            </tr>
          </tbody>
        </table>
        <t indent="0" pn="section-7.8-7">
          The "Network Time Security Warning Codes" registry is
          initially empty except for the reserved range, i.e.:
        </t>
        <table align="center" pn="table-7">
          <thead>
            <tr>
              <th align="left" colspan="1" rowspan="1">Number</th>
              <th align="left" colspan="1" rowspan="1">Description</th>
              <th align="left" colspan="1" rowspan="1">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left" colspan="1" rowspan="1">0-32767</td>
              <td align="left" colspan="1" rowspan="1">Unassigned</td>
              <td align="left" colspan="1" rowspan="1"/>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">32768-65535</td>
              <td align="left" colspan="1" rowspan="1">Reserved for Private or Experimental Use</td>
              <td align="left" colspan="1" rowspan="1">RFC 8915</td>
            </tr>
          </tbody>
        </table>
      </section>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-8">
      <name slugifiedName="name-security-considerations">Security Considerations</name>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-8.1">
        <name slugifiedName="name-protected-modes">Protected Modes</name>
        <t indent="0" pn="section-8.1-1">
          NTP provides many different operating modes in order to support different
          network topologies and to adapt to various requirements. This memo only
          specifies NTS for NTP modes 3 (client) and 4 (server) (see
          <xref target="sec-protocol-overview" format="default" sectionFormat="of" derivedContent="Section 1.3"/>). The best current practice for
          authenticating the other NTP modes is using the symmetric message
          authentication code feature as described in
          <xref target="RFC5905" format="default" sectionFormat="of" derivedContent="RFC5905">RFC 5905</xref> and
          <xref target="RFC8573" format="default" sectionFormat="of" derivedContent="RFC8573">RFC 8573</xref>.
        </t>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-8.2">
        <name slugifiedName="name-cookie-encryption-key-compr">Cookie Encryption Key Compromise</name>
        <t indent="0" pn="section-8.2-1">
          If the suggested format
          for NTS cookies in <xref target="suggested-format-for-nts-cookies" format="default" sectionFormat="of" derivedContent="Section 6"/>
          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.
          NTP and NTS-KE server operators <bcp14>SHOULD</bcp14> remove compromised keys as soon
          as the compromise is discovered. This will cause the NTP servers to
          respond with NTS NAK, thus forcing key renegotiation. Note that this
          measure does not protect against MITM attacks where the attacker has access
          to a compromised cookie encryption key. If another cookie scheme is used,
          there are likely similar considerations for that particular scheme.
        </t>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-8.3">
        <name slugifiedName="name-sensitivity-to-ddos-attacks">Sensitivity to DDoS Attacks</name>
        <t indent="0" pn="section-8.3-1">
          The introduction of NTS brings with it the introduction of asymmetric
          cryptography to NTP. Asymmetric cryptography is necessary for initial
          server authentication and AEAD key extraction. Asymmetric
          cryptosystems are generally orders of magnitude slower than their
          symmetric counterparts. This makes it much harder to build systems
          that can serve requests at a rate corresponding to the full line speed
          of the network connection. This, in turn, opens up a new possibility
          for DDoS attacks on NTP services.
        </t>
        <t indent="0" pn="section-8.3-2">
          The main protection against these attacks in NTS lies in that the use
          of asymmetric cryptosystems is only necessary in the initial NTS-KE
          phase of the protocol. Since the protocol design enables separation of
          the NTS-KE and NTP servers, a successful DDoS attack on an NTS-KE
          server separated from the NTP service it supports will not affect NTP
          users that have already performed initial authentication, AEAD key
          extraction, and cookie exchange.
        </t>
        <t indent="0" pn="section-8.3-3">
          NTS users should also consider that they are not fully protected
          against DoS attacks by on-path adversaries. In addition to dropping
          packets and attacks such as those described in
          <xref target="DelayAttack" format="default" sectionFormat="of" derivedContent="Section 8.6"/>, an on-path attacker can send spoofed
          Kiss-o'-Death replies, which are not authenticated, in response to NTP
          requests. This could result in significantly increased load on the
          NTS-KE server. Implementers have to weigh the user's need for
          unlinkability against the added resilience that comes with cookie
          reuse in cases of NTS-KE server unavailability.
        </t>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-8.4">
        <name slugifiedName="name-avoiding-ddos-amplification">Avoiding DDoS Amplification</name>
        <t indent="0" pn="section-8.4-1">
          Certain nonstandard and/or deprecated features of the Network Time
          Protocol enable clients to send a request to a server that causes the
          server to send a response much larger than the request. Servers that
          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 address.
          In recent years, attacks of this nature have become an endemic nuisance.
        </t>
        <t indent="0" pn="section-8.4-2">
          NTS is designed to avoid contributing any further to this problem by
          ensuring that NTS-related extension fields included in server
          responses will be the same size as the NTS-related extension fields
          sent by the client. In particular, this is why the client is required
          to send a separate and appropriately padded-out NTS Cookie Placeholder
          extension field for every cookie it wants to get back, rather than
          being permitted simply to specify a desired quantity.
        </t>
        <t indent="0" pn="section-8.4-3">
          Due to the <xref target="RFC7822" format="default" sectionFormat="of" derivedContent="RFC7822">RFC 7822</xref> requirement that
          extensions be padded and aligned to four-octet boundaries, response
          size may still in some cases exceed request size by up to three
          octets. This is sufficiently inconsequential that we have declined to
          address it.
        </t>
      </section>
      <section anchor="sec-cert-verification" numbered="true" toc="include" removeInRFC="false" pn="section-8.5">
        <name slugifiedName="name-initial-verification-of-ser">Initial Verification of Server Certificates</name>
        <t indent="0" pn="section-8.5-1">
          NTS's security goals are undermined if the client fails to verify that
          the X.509 certificate chain presented by the NTS-KE server is valid
          and rooted in a trusted certificate authority. <xref target="RFC5280" format="default" sectionFormat="of" derivedContent="RFC5280">RFC 5280</xref> and <xref target="RFC6125" format="default" sectionFormat="of" derivedContent="RFC6125"> RFC
          6125</xref> specify how such verification is to be performed in
          general. However, the expectation that the client does not yet have a
          correctly-set system clock at the time of certificate verification
          presents difficulties with verifying that the certificate is within
          its validity period, i.e., that the current time lies between the
          times specified in the certificate's notBefore and notAfter fields. It
          may be operationally necessary in some cases for a client to accept a
          certificate that appears to be expired or not yet valid. While there
          is no perfect solution to this problem, there are several mitigations
          the client can implement to make it more difficult for an adversary to
          successfully present an expired certificate:
        </t>
        <ul empty="true" spacing="normal" bare="false" indent="3" pn="section-8.5-2">
          <li pn="section-8.5-2.1">
              Check whether the system time is in fact unreliable. On systems
              with the ntp_adjtime() system call, a return code other than
              TIME_ERROR indicates that some trusted software has already set
              the time and certificates can be strictly validated.
            </li>
          <li pn="section-8.5-2.2">
              Allow the system administrator to specify that certificates should
              <em>always</em> be strictly validated. Such a configuration is
              appropriate on systems that have a battery-backed clock or that
              can reasonably prompt the user to manually set an
              approximately correct time if it appears to be needed.
            </li>
          <li pn="section-8.5-2.3">
              Once the clock has been synchronized, periodically write the
              current system time to persistent storage. Do not accept any
              certificate whose notAfter field is earlier than the last recorded
              time.
            </li>
          <li pn="section-8.5-2.4">
              NTP time replies are expected to be consistent with the NTS-KE TLS
              certificate validity period, i.e. time replies received immediately after
              an NTS-KE handshake are expected to lie within the certificate validity
              period.
              Implementations are recommended to check that this is the case.
              Performing a new NTS-KE handshake based solely on the fact that the
              certificate used by the NTS-KE server in a previous handshake has expired
              is normally not necessary.
              Clients that still wish to do this must take care not to cause an
              inadvertent denial-of-service attack on the NTS-KE server, for example by
              picking a random time in the week preceding certificate expiry to perform
              the new handshake.
            </li>
          <li pn="section-8.5-2.5">
              Use multiple time sources. The ability to pass off an expired
              certificate is only useful to an adversary who has compromised the
              corresponding private key. If the adversary has compromised only a
              minority of servers, NTP's selection algorithm (Section
              <xref target="RFC5905" section="11.2.1" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5905#section-11.2.1" derivedContent="RFC5905"/>
              of <xref target="RFC5905" format="default" sectionFormat="of" derivedContent="RFC5905">RFC 5905</xref>) will protect the
              client from accepting bad time from the adversary-controlled
              servers.
            </li>
        </ul>
      </section>
      <section anchor="DelayAttack" numbered="true" toc="include" removeInRFC="false" pn="section-8.6">
        <name slugifiedName="name-delay-attacks">Delay Attacks</name>
        <t indent="0" pn="section-8.6-1">
          In a packet delay attack, an adversary with the ability to act as a
          man-in-the-middle delays time synchronization packets between client
          and server asymmetrically <xref target="RFC7384" format="default" sectionFormat="of" derivedContent="RFC7384"/>. Since NTP's
          formula for computing time offset relies on the assumption that
          network latency is roughly symmetrical, this leads to the client to
          compute an inaccurate value <xref target="Mizrahi" format="default" sectionFormat="of" derivedContent="Mizrahi"/>. The delay attack
          does not reorder or modify the content of the exchanged
          synchronization packets. Therefore, cryptographic means do not provide
          a feasible way to mitigate this attack. However, the maximum error
          that an adversary can introduce is bounded by half of the round-trip
          delay.
        </t>
        <t indent="0" pn="section-8.6-2">
          <xref target="RFC5905" format="default" sectionFormat="of" derivedContent="RFC5905">RFC 5905</xref> specifies a parameter called
          MAXDIST, which denotes the maximum round-trip latency (including not
          only the immediate round trip between client and server, but the whole
          distance back to the reference clock as reported in the Root Delay
          field) that a client will tolerate before concluding that the server
          is unsuitable for synchronization. The standard value for MAXDIST is
          one second, although some implementations use larger values. Whatever
          value a client chooses, the maximum error that can be introduced by a
          delay attack is MAXDIST/2.
        </t>
        <t indent="0" pn="section-8.6-3">
          Usage of multiple time sources, or multiple network paths to a given
          time source <xref target="Shpiner" format="default" sectionFormat="of" derivedContent="Shpiner"/>, may also serve to mitigate delay
          attacks if the adversary is in control of only some of the paths.
        </t>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-8.7">
        <name slugifiedName="name-nts-stripping">NTS Stripping</name>
        <t indent="0" pn="section-8.7-1">
          Implementers must be aware of the possibility of "NTS stripping"
          attacks, where an attacker attempts to trick clients into reverting to plain
          NTP. Naive client implementations might, for example, revert
          automatically to plain NTP if the NTS-KE handshake fails. A man-in-the-middle
          attacker can easily cause this to happen. Even clients that already
          hold valid cookies can be vulnerable, since an attacker can force a
          client to repeat the NTS-KE handshake by sending faked NTP mode 4
          replies with the NTS NAK kiss code. Forcing a client to repeat the
          NTS-KE handshake can also be the first step in more advanced attacks.
        </t>
        <t indent="0" pn="section-8.7-2">
          For the reasons described here, implementations <bcp14>SHOULD NOT</bcp14> revert
          from NTS-protected to unprotected NTP with any server without
          explicit user action.
        </t>
      </section>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-9">
      <name slugifiedName="name-privacy-considerations">Privacy Considerations</name>
      <section anchor="Unlinkability" numbered="true" toc="include" removeInRFC="false" pn="section-9.1">
        <name slugifiedName="name-unlinkability">Unlinkability</name>
        <t indent="0" pn="section-9.1-1">Unlinkability prevents a device from being tracked when it changes
        network addresses (e.g., because said device moved between different
        networks). In other words, unlinkability thwarts an attacker that
        seeks to link a new network address used by a device with a network
        address that it was formerly using because of recognizable data that
        the device persistently sends as part of an NTS-secured NTP
        association. This is the justification for continually supplying the
        client with fresh cookies, so that a cookie never represents
        recognizable data in the sense outlined above. </t>
        <t indent="0" pn="section-9.1-2">NTS's unlinkability objective is merely to not leak any additional
        data that could be used to link a device's network address. NTS does
        not rectify legacy linkability issues that are already present in NTP.
        Thus, a client that requires unlinkability must also minimize
        information transmitted in a client query (mode 3) packet as described
        in the document <xref target="I-D.ietf-ntp-data-minimization" format="default" sectionFormat="of" derivedContent="NTP-DATA-MIN">
        NTP Client Data Minimization</xref>.
        </t>
        <t indent="0" pn="section-9.1-3">The unlinkability objective only holds for time synchronization
        traffic, as opposed to key establishment traffic. This implies that it
        cannot be guaranteed for devices that function not only as time
        clients, but also as time servers (because the latter can be externally
        triggered to send linkable data, such as the TLS certificate).</t>
        <t indent="0" pn="section-9.1-4">It should also be noted that it could be possible to link devices
        that operate as time servers from their time synchronization traffic,
        using information exposed in (mode 4) server response packets (e.g.
        reference ID, reference time, stratum, poll).  Also, devices that
        respond to NTP control queries could be linked using the information
        revealed by control queries. </t>
        <t indent="0" pn="section-9.1-5">Note that the unlinkability objective does not prevent a client device
        from being tracked by its time servers.</t>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-9.2">
        <name slugifiedName="name-confidentiality">Confidentiality</name>
        <t indent="0" pn="section-9.2-1">
	  NTS does not protect the confidentiality of information in
	  NTP's header fields. When clients implement
    <xref target="I-D.ietf-ntp-data-minimization" format="default" sectionFormat="of" derivedContent="NTP-DATA-MIN">
    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,
	  and all others are fixed. Information in server packet
	  headers is likewise public: the origin timestamp is copied
	  from the client's (random) transmit timestamp, and all other
	  fields are set the same regardless of the identity of the
	  client making the request.
        </t>
        <t indent="0" pn="section-9.2-2">
	  Future extension fields could hypothetically contain
	  sensitive information, in which case NTS provides a
	  mechanism for encrypting them.
        </t>
      </section>
    </section>
  </middle>
  <back>
    <displayreference target="I-D.ietf-ntp-data-minimization" to="NTP-DATA-MIN"/>
    <references pn="section-10">
      <name slugifiedName="name-references">References</name>
      <references pn="section-10.1">
        <name slugifiedName="name-normative-references">Normative References</name>
        <reference anchor="IANA-AEAD" target="https://www.iana.org/assignments/aead-parameters/" quoteTitle="true" derivedAnchor="IANA-AEAD">
          <front>
            <title>Authenticated Encryption with Associated Data (AEAD) Parameters</title>
            <author>
              <organization showOnFrontPage="true">IANA</organization>
            </author>
          </front>
        </reference>
        <reference anchor="RFC0020" target="https://www.rfc-editor.org/info/rfc20" quoteTitle="true" derivedAnchor="RFC0020">
          <front>
            <title>ASCII format for network interchange</title>
            <author initials="V.G." surname="Cerf" fullname="V.G. Cerf">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="1969" month="October"/>
          </front>
          <seriesInfo name="STD" value="80"/>
          <seriesInfo name="RFC" value="20"/>
          <seriesInfo name="DOI" value="10.17487/RFC0020"/>
        </reference>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" quoteTitle="true" derivedAnchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author initials="S." surname="Bradner" fullname="S. Bradner">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="1997" month="March"/>
            <abstract>
              <t indent="0">In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC4291" target="https://www.rfc-editor.org/info/rfc4291" quoteTitle="true" derivedAnchor="RFC4291">
          <front>
            <title>IP Version 6 Addressing Architecture</title>
            <author initials="R." surname="Hinden" fullname="R. Hinden">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Deering" fullname="S. Deering">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2006" month="February"/>
            <abstract>
              <t indent="0">This specification defines the addressing architecture of the IP Version 6 (IPv6) protocol.  The document includes the IPv6 addressing model, text representations of IPv6 addresses, definition of IPv6 unicast addresses, anycast addresses, and multicast addresses, and an IPv6 node's required addresses.</t>
              <t indent="0">This document obsoletes RFC 3513, "IP Version 6 Addressing Architecture".   [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="4291"/>
          <seriesInfo name="DOI" value="10.17487/RFC4291"/>
        </reference>
        <reference anchor="RFC5116" target="https://www.rfc-editor.org/info/rfc5116" quoteTitle="true" derivedAnchor="RFC5116">
          <front>
            <title>An Interface and Algorithms for Authenticated Encryption</title>
            <author initials="D." surname="McGrew" fullname="D. McGrew">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2008" month="January"/>
            <abstract>
              <t indent="0">This document defines algorithms for Authenticated Encryption with Associated Data (AEAD), and defines a uniform interface and a registry for such algorithms.  The interface and registry can be used as an application-independent set of cryptoalgorithm suites.  This approach provides advantages in efficiency and security, and promotes the reuse of crypto implementations.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5116"/>
          <seriesInfo name="DOI" value="10.17487/RFC5116"/>
        </reference>
        <reference anchor="RFC5280" target="https://www.rfc-editor.org/info/rfc5280" quoteTitle="true" derivedAnchor="RFC5280">
          <front>
            <title>Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile</title>
            <author initials="D." surname="Cooper" fullname="D. Cooper">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Santesson" fullname="S. Santesson">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Farrell" fullname="S. Farrell">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Boeyen" fullname="S. Boeyen">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="R." surname="Housley" fullname="R. Housley">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="W." surname="Polk" fullname="W. Polk">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2008" month="May"/>
            <abstract>
              <t indent="0">This memo profiles the X.509 v3 certificate and X.509 v2 certificate revocation list (CRL) for use in the Internet.  An overview of this approach and model is provided as an introduction.  The X.509 v3 certificate format is described in detail, with additional information regarding the format and semantics of Internet name forms.  Standard certificate extensions are described and two Internet-specific extensions are defined.  A set of required certificate extensions is specified.  The X.509 v2 CRL format is described in detail along with standard and Internet-specific extensions.  An algorithm for X.509 certification path validation is described.  An ASN.1 module and examples are provided in the appendices.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5280"/>
          <seriesInfo name="DOI" value="10.17487/RFC5280"/>
        </reference>
        <reference anchor="RFC5297" target="https://www.rfc-editor.org/info/rfc5297" quoteTitle="true" derivedAnchor="RFC5297">
          <front>
            <title>Synthetic Initialization Vector (SIV) Authenticated Encryption Using the Advanced Encryption Standard (AES)</title>
            <author initials="D." surname="Harkins" fullname="D. Harkins">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2008" month="October"/>
            <abstract>
              <t indent="0">This memo describes SIV (Synthetic Initialization Vector), a block cipher mode of operation.  SIV takes a key, a plaintext, and multiple variable-length octet strings that will be authenticated but not encrypted.  It produces a ciphertext having the same length as the plaintext and a synthetic initialization vector.  Depending on how it is used, SIV achieves either the goal of deterministic authenticated encryption or the goal of nonce-based, misuse-resistant authenticated encryption.  This memo provides information for the Internet  community.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5297"/>
          <seriesInfo name="DOI" value="10.17487/RFC5297"/>
        </reference>
        <reference anchor="RFC5705" target="https://www.rfc-editor.org/info/rfc5705" quoteTitle="true" derivedAnchor="RFC5705">
          <front>
            <title>Keying Material Exporters for Transport Layer Security (TLS)</title>
            <author initials="E." surname="Rescorla" fullname="E. Rescorla">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2010" month="March"/>
            <abstract>
              <t indent="0">A number of protocols wish to leverage Transport Layer Security (TLS) to perform key establishment but then use some of the keying material for their own purposes.  This document describes a general mechanism for allowing that.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5705"/>
          <seriesInfo name="DOI" value="10.17487/RFC5705"/>
        </reference>
        <reference anchor="RFC5869" target="https://www.rfc-editor.org/info/rfc5869" quoteTitle="true" derivedAnchor="RFC5869">
          <front>
            <title>HMAC-based Extract-and-Expand Key Derivation Function (HKDF)</title>
            <author initials="H." surname="Krawczyk" fullname="H. Krawczyk">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="P." surname="Eronen" fullname="P. Eronen">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2010" month="May"/>
            <abstract>
              <t indent="0">This document specifies a simple Hashed Message Authentication Code (HMAC)-based key derivation function (HKDF), which can be used as a building block in various protocols and applications.  The key derivation function (KDF) is intended to support a wide range of applications and requirements, and is conservative in its use of cryptographic hash functions.  This document is not an Internet  Standards Track specification; it is published for informational  purposes.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5869"/>
          <seriesInfo name="DOI" value="10.17487/RFC5869"/>
        </reference>
        <reference anchor="RFC5890" target="https://www.rfc-editor.org/info/rfc5890" quoteTitle="true" derivedAnchor="RFC5890">
          <front>
            <title>Internationalized Domain Names for Applications (IDNA): Definitions and Document Framework</title>
            <author initials="J." surname="Klensin" fullname="J. Klensin">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2010" month="August"/>
            <abstract>
              <t indent="0">This document is one of a collection that, together, describe the protocol and usage context for a revision of Internationalized Domain Names for Applications (IDNA), superseding the earlier version.  It describes the document collection and provides definitions and other material that are common to the set.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5890"/>
          <seriesInfo name="DOI" value="10.17487/RFC5890"/>
        </reference>
        <reference anchor="RFC5905" target="https://www.rfc-editor.org/info/rfc5905" quoteTitle="true" derivedAnchor="RFC5905">
          <front>
            <title>Network Time Protocol Version 4: Protocol and Algorithms Specification</title>
            <author initials="D." surname="Mills" fullname="D. Mills">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Martin" fullname="J. Martin" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Burbank" fullname="J. Burbank">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="W." surname="Kasch" fullname="W. Kasch">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2010" month="June"/>
            <abstract>
              <t indent="0">The Network Time Protocol (NTP) is widely used to synchronize computer clocks in the Internet.  This document describes NTP version 4 (NTPv4), which is backwards compatible with NTP version 3 (NTPv3), described in RFC 1305, as well as previous versions of the protocol. NTPv4 includes a modified protocol header to accommodate the Internet Protocol version 6 address family.  NTPv4 includes fundamental improvements in the mitigation and discipline algorithms that extend the potential accuracy to the tens of microseconds with modern workstations and fast LANs.  It includes a dynamic server discovery scheme, so that in many cases, specific server configuration is not required.  It corrects certain errors in the NTPv3 design and implementation and includes an optional extension mechanism.   [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5905"/>
          <seriesInfo name="DOI" value="10.17487/RFC5905"/>
        </reference>
        <reference anchor="RFC6125" target="https://www.rfc-editor.org/info/rfc6125" quoteTitle="true" derivedAnchor="RFC6125">
          <front>
            <title>Representation and Verification of Domain-Based Application Service Identity within Internet Public Key Infrastructure Using X.509 (PKIX) Certificates in the Context of Transport Layer Security (TLS)</title>
            <author initials="P." surname="Saint-Andre" fullname="P. Saint-Andre">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Hodges" fullname="J. Hodges">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2011" month="March"/>
            <abstract>
              <t indent="0">Many application technologies enable secure communication between two entities by means of Internet Public Key Infrastructure Using X.509 (PKIX) certificates in the context of Transport Layer Security (TLS). This document specifies procedures for representing and verifying the identity of application services in such interactions.   [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6125"/>
          <seriesInfo name="DOI" value="10.17487/RFC6125"/>
        </reference>
        <reference anchor="RFC6335" target="https://www.rfc-editor.org/info/rfc6335" quoteTitle="true" derivedAnchor="RFC6335">
          <front>
            <title>Internet Assigned Numbers Authority (IANA) Procedures for the Management of the Service Name and Transport Protocol Port Number Registry</title>
            <author initials="M." surname="Cotton" fullname="M. Cotton">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="L." surname="Eggert" fullname="L. Eggert">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Touch" fullname="J. Touch">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="M." surname="Westerlund" fullname="M. Westerlund">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Cheshire" fullname="S. Cheshire">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2011" month="August"/>
            <abstract>
              <t indent="0">This document defines the procedures that the Internet Assigned Numbers Authority (IANA) uses when handling assignment and other requests related to the Service Name and Transport Protocol Port Number registry.  It also discusses the rationale and principles behind these procedures and how they facilitate the long-term sustainability of the registry.</t>
              <t indent="0">This document updates IANA's procedures by obsoleting the previous UDP and TCP port assignment procedures defined in Sections 8 and 9.1 of the IANA Allocation Guidelines, and it updates the IANA service name and port assignment procedures for UDP-Lite, the Datagram Congestion Control Protocol (DCCP), and the Stream Control Transmission Protocol (SCTP).  It also updates the DNS SRV specification to clarify what a service name is and how it is registered.  This memo documents an Internet Best Current Practice.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="165"/>
          <seriesInfo name="RFC" value="6335"/>
          <seriesInfo name="DOI" value="10.17487/RFC6335"/>
        </reference>
        <reference anchor="RFC6874" target="https://www.rfc-editor.org/info/rfc6874" quoteTitle="true" derivedAnchor="RFC6874">
          <front>
            <title>Representing IPv6 Zone Identifiers in Address Literals and Uniform Resource Identifiers</title>
            <author initials="B." surname="Carpenter" fullname="B. Carpenter">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Cheshire" fullname="S. Cheshire">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="R." surname="Hinden" fullname="R. Hinden">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2013" month="February"/>
            <abstract>
              <t indent="0">This document describes how the zone identifier of an IPv6 scoped address, defined as &lt;zone_id&gt; in the IPv6 Scoped Address Architecture (RFC 4007), can be represented in a literal IPv6 address and in a Uniform Resource Identifier that includes such a literal address.  It updates the URI Generic Syntax specification (RFC 3986) accordingly.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6874"/>
          <seriesInfo name="DOI" value="10.17487/RFC6874"/>
        </reference>
        <reference anchor="RFC7301" target="https://www.rfc-editor.org/info/rfc7301" quoteTitle="true" derivedAnchor="RFC7301">
          <front>
            <title>Transport Layer Security (TLS) Application-Layer Protocol Negotiation Extension</title>
            <author initials="S." surname="Friedl" fullname="S. Friedl">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="A." surname="Popov" fullname="A. Popov">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="A." surname="Langley" fullname="A. Langley">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="E." surname="Stephan" fullname="E. Stephan">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2014" month="July"/>
            <abstract>
              <t indent="0">This document describes a Transport Layer Security (TLS) extension for application-layer protocol negotiation within the TLS handshake. For instances in which multiple application protocols are supported on the same TCP or UDP port, this extension allows the application layer to negotiate which protocol will be used within the TLS connection.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7301"/>
          <seriesInfo name="DOI" value="10.17487/RFC7301"/>
        </reference>
        <reference anchor="RFC7525" target="https://www.rfc-editor.org/info/rfc7525" quoteTitle="true" derivedAnchor="RFC7525">
          <front>
            <title>Recommendations for Secure Use of Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS)</title>
            <author initials="Y." surname="Sheffer" fullname="Y. Sheffer">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="R." surname="Holz" fullname="R. Holz">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="P." surname="Saint-Andre" fullname="P. Saint-Andre">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2015" month="May"/>
            <abstract>
              <t indent="0">Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS) are widely used to protect data exchanged over application protocols such as HTTP, SMTP, IMAP, POP, SIP, and XMPP.  Over the last few years, several serious attacks on TLS have emerged, including attacks on its most commonly used cipher suites and their modes of operation.  This document provides recommendations for improving the security of deployed services that use TLS and DTLS. The recommendations are applicable to the majority of use cases.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="195"/>
          <seriesInfo name="RFC" value="7525"/>
          <seriesInfo name="DOI" value="10.17487/RFC7525"/>
        </reference>
        <reference anchor="RFC7822" target="https://www.rfc-editor.org/info/rfc7822" quoteTitle="true" derivedAnchor="RFC7822">
          <front>
            <title>Network Time Protocol Version 4 (NTPv4) Extension Fields</title>
            <author initials="T." surname="Mizrahi" fullname="T. Mizrahi">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="D." surname="Mayer" fullname="D. Mayer">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2016" month="March"/>
            <abstract>
              <t indent="0">The Network Time Protocol version 4 (NTPv4) defines the optional usage of extension fields.  An extension field, as defined in RFC 5905, is an optional field that resides at the end of the NTP header and that can be used to add optional capabilities or additional information that is not conveyed in the standard NTP header.  This document updates RFC 5905 by clarifying some points regarding NTP extension fields and their usage with Message Authentication Codes (MACs).</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7822"/>
          <seriesInfo name="DOI" value="10.17487/RFC7822"/>
        </reference>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" quoteTitle="true" derivedAnchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author initials="B." surname="Leiba" fullname="B. Leiba">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2017" month="May"/>
            <abstract>
              <t indent="0">RFC 2119 specifies common key words that may be used in protocol  specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the  defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
        <reference anchor="RFC8446" target="https://www.rfc-editor.org/info/rfc8446" quoteTitle="true" derivedAnchor="RFC8446">
          <front>
            <title>The Transport Layer Security (TLS) Protocol Version 1.3</title>
            <author initials="E." surname="Rescorla" fullname="E. Rescorla">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2018" month="August"/>
            <abstract>
              <t indent="0">This document specifies version 1.3 of the Transport Layer Security (TLS) protocol.  TLS allows client/server applications to communicate over the Internet in a way that is designed to prevent eavesdropping, tampering, and message forgery.</t>
              <t indent="0">This document updates RFCs 5705 and 6066, and obsoletes RFCs 5077, 5246, and 6961.  This document also specifies new requirements for TLS 1.2 implementations.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8446"/>
          <seriesInfo name="DOI" value="10.17487/RFC8446"/>
        </reference>
      </references>
      <references pn="section-10.2">
        <name slugifiedName="name-informative-references">Informative References</name>
        <reference anchor="Mizrahi" target="https://doi.org/10.1109/ISPCS.2012.6336612" quoteTitle="true" derivedAnchor="Mizrahi">
          <front>
            <title>A game theoretic analysis of delay attacks against time synchronization protocols</title>
            <author fullname="Tal Mizrahi" initials="T" surname="Mizrahi">
              <organization showOnFrontPage="true"/>
            </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 Synchronization
                      for Measurement, Control and Communication Proceedings, pp. 1-6</refcontent>
        </reference>
        <reference anchor="I-D.ietf-ntp-data-minimization" quoteTitle="true" target="https://tools.ietf.org/html/draft-ietf-ntp-data-minimization-04" derivedAnchor="NTP-DATA-MIN">
          <front>
            <title>NTP Client Data Minimization</title>
            <author fullname="Daniel Fox Franke">
              <organization showOnFrontPage="true">Akamai Technologies, Inc.</organization>
            </author>
            <author fullname="Aanchal Malhotra">
              <organization showOnFrontPage="true">Boston University</organization>
            </author>
            <date month="March" day="25" year="2019"/>
            <abstract>
              <t indent="0">   This memo proposes backward-compatible updates to the Network Time
   Protocol to strip unnecessary identifying information from client
   requests and to improve resilience against blind spoofing of
   unauthenticated server responses.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-ntp-data-minimization-04"/>
          <format type="TXT" target="https://www.ietf.org/internet-drafts/draft-ietf-ntp-data-minimization-04.txt"/>
          <refcontent>Work in Progress</refcontent>
        </reference>
        <reference anchor="RFC4086" target="https://www.rfc-editor.org/info/rfc4086" quoteTitle="true" derivedAnchor="RFC4086">
          <front>
            <title>Randomness Requirements for Security</title>
            <author initials="D." surname="Eastlake 3rd" fullname="D. Eastlake 3rd">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Schiller" fullname="J. Schiller">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Crocker" fullname="S. Crocker">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2005" month="June"/>
            <abstract>
              <t indent="0">Security systems are built on strong cryptographic algorithms that foil pattern analysis attempts.  However, the security of these systems is dependent on generating secret quantities for passwords, cryptographic keys, and similar quantities.  The use of pseudo-random processes to generate secret quantities can result in pseudo-security. A sophisticated attacker may find it easier to reproduce the environment that produced the secret quantities and to search the resulting small set of possibilities than to locate the quantities in the whole of the potential number space.</t>
              <t indent="0">Choosing random quantities to foil a resourceful and motivated adversary is surprisingly difficult.  This document points out many pitfalls in using poor entropy sources or traditional pseudo-random number generation techniques for generating such quantities.  It recommends the use of truly random hardware techniques and shows that the existing hardware on many systems can be used for this purpose. It provides suggestions to ameliorate the problem when a hardware solution is not available, and it gives examples of how large such quantities need to be for some applications.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="106"/>
          <seriesInfo name="RFC" value="4086"/>
          <seriesInfo name="DOI" value="10.17487/RFC4086"/>
        </reference>
        <reference anchor="RFC5077" target="https://www.rfc-editor.org/info/rfc5077" quoteTitle="true" derivedAnchor="RFC5077">
          <front>
            <title>Transport Layer Security (TLS) Session Resumption without Server-Side State</title>
            <author initials="J." surname="Salowey" fullname="J. Salowey">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="H." surname="Zhou" fullname="H. Zhou">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="P." surname="Eronen" fullname="P. Eronen">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="H." surname="Tschofenig" fullname="H. Tschofenig">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2008" month="January"/>
            <abstract>
              <t indent="0">This document describes a mechanism that enables the Transport Layer Security (TLS) server to resume sessions and avoid keeping per-client session state.  The TLS server encapsulates the session state into a ticket and forwards it to the client.  The client can subsequently resume a session using the obtained ticket.  This document obsoletes RFC 4507.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5077"/>
          <seriesInfo name="DOI" value="10.17487/RFC5077"/>
        </reference>
        <reference anchor="RFC7384" target="https://www.rfc-editor.org/info/rfc7384" quoteTitle="true" derivedAnchor="RFC7384">
          <front>
            <title>Security Requirements of Time Protocols in Packet Switched Networks</title>
            <author initials="T." surname="Mizrahi" fullname="T. Mizrahi">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2014" month="October"/>
            <abstract>
              <t indent="0">As time and frequency distribution protocols are becoming increasingly common and widely deployed, concern about their exposure to various security threats is increasing.  This document defines a set of security requirements for time protocols, focusing on the Precision Time Protocol (PTP) and the Network Time Protocol (NTP). This document also discusses the security impacts of time protocol practices, the performance implications of external security practices on time protocols, and the dependencies between other security services and time synchronization.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7384"/>
          <seriesInfo name="DOI" value="10.17487/RFC7384"/>
        </reference>
        <reference anchor="RFC8573" target="https://www.rfc-editor.org/info/rfc8573" quoteTitle="true" derivedAnchor="RFC8573">
          <front>
            <title>Message Authentication Code for the Network Time Protocol</title>
            <author initials="A." surname="Malhotra" fullname="A. Malhotra">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Goldberg" fullname="S. Goldberg">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2019" month="June"/>
            <abstract>
              <t indent="0">The Network Time Protocol (NTP), as described in RFC 5905, states that NTP packets should be authenticated by appending NTP data to a 128-bit key and hashing the result with MD5 to obtain a 128-bit tag. This document deprecates MD5-based authentication, which is considered too weak, and recommends the use of AES-CMAC as described in RFC 4493 as a replacement.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8573"/>
          <seriesInfo name="DOI" value="10.17487/RFC8573"/>
        </reference>
        <reference anchor="Shpiner" quoteTitle="true" target="https://doi.org/10.1109/ISPCS.2013.6644754" derivedAnchor="Shpiner">
          <front>
            <title>Multi-path Time Protocols</title>
            <author fullname="Alexander Shpiner" initials="A" surname="Shpiner">
              <organization showOnFrontPage="true"/>
            </author>
            <author fullname="Yoram Revah" initials="Y" surname="Revah">
              <organization showOnFrontPage="true"/>
            </author>
            <author fullname="Tal Mizrahi" initials="T" surname="Mizrahi">
              <organization showOnFrontPage="true"/>
            </author>
            <date month="September" year="2013"/>
          </front>
          <seriesInfo name="DOI" value="10.1109/ISPCS.2013.6644754"/>
          <refcontent>2013 IEEE International Symposium on Precision Clock Synchronization
                      for Measurement, Control and Communication (ISPCS) Proceedings, pp. 1-6</refcontent>
        </reference>
      </references>
    </references>
    <section anchor="Acknowledgments" numbered="false" toc="include" removeInRFC="false" pn="section-appendix.a">
      <name slugifiedName="name-acknowledgments">Acknowledgments</name>
      <t indent="0" pn="section-appendix.a-1">The authors would like to thank <contact fullname="Richard Barnes"/>,
      <contact fullname="Steven Bellovin"/>, <contact fullname="Scott Fluhrer"/>,
      <contact fullname="Patrik Fältström"/>,
      <contact fullname="Sharon Goldberg"/>, <contact fullname="Russ Housley"/>,
      <contact fullname="Benjamin Kaduk"/>, <contact fullname="Suresh Krishnan"/>,
      <contact fullname="Mirja Kühlewind"/>, <contact fullname="Martin Langer"/>,
      <contact fullname="Barry Leiba"/>, <contact fullname="Miroslav Lichvar"/>,
      <contact fullname="Aanchal Malhotra"/>, <contact fullname="Danny Mayer"/>,
      <contact fullname="Dave Mills"/>, <contact fullname="Sandra Murphy"/>,
      <contact fullname="Hal Murray"/>, <contact fullname="Karen O'Donoghue"/>,
      <contact fullname="Eric K. Rescorla"/>, <contact fullname="Kurt Roeckx"/>,
      <contact fullname="Stephen Roettger"/>, <contact fullname="Dan Romascanu"/>,
      <contact fullname="Kyle Rose"/>, <contact fullname="Rich Salz"/>,
      <contact fullname="Brian Sniffen"/>, <contact fullname="Susan Sons"/>,
      <contact fullname="Douglas Stebila"/>, <contact fullname="Harlan Stenn"/>,
      <contact fullname="Joachim Strömbergsson"/>,
      <contact fullname="Martin Thomson"/>, <contact fullname="Éric Vyncke"/>,
      <contact fullname="Richard Welty"/>, <contact fullname="Christer Weinigel"/>, and
      <contact fullname="Magnus Westerlund"/> for contributions to this document
      and comments on the design of NTS.</t>
    </section>
    <section anchor="authors-addresses" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.b">
      <name slugifiedName="name-authors-addresses">Authors' Addresses</name>
      <author fullname="Daniel Fox Franke" initials="D." surname="Franke">
        <organization abbrev="Akamai" showOnFrontPage="true">Akamai Technologies</organization>
        <address>
          <postal>
            <street>145 Broadway</street>
            <city>Cambridge</city>
            <region>MA</region>
            <code>02142</code>
            <country>United States of America</country>
          </postal>
          <email>dafranke@akamai.com</email>
        </address>
      </author>
      <author fullname="Dieter Sibold" initials="D." surname="Sibold">
        <organization abbrev="PTB" showOnFrontPage="true">Physikalisch-Technische Bundesanstalt</organization>
        <address>
          <postal>
            <street>Bundesallee 100</street>
            <city>Braunschweig</city>
            <code>D-38116</code>
            <country>Germany</country>
          </postal>
          <phone>+49-(0)531-592-8462</phone>
          <email>dieter.sibold@ptb.de</email>
        </address>
      </author>
      <author fullname="Kristof Teichel" initials="K." surname="Teichel">
        <organization abbrev="PTB" showOnFrontPage="true">Physikalisch-Technische Bundesanstalt</organization>
        <address>
          <postal>
            <street>Bundesallee 100</street>
            <city>Braunschweig</city>
            <code>D-38116</code>
            <country>Germany</country>
          </postal>
          <phone>+49-(0)531-592-4471</phone>
          <email>kristof.teichel@ptb.de</email>
          <uri/>
        </address>
      </author>
      <author fullname="Marcus Dansarie" initials="M." surname="Dansarie">
        <address>
          <postal>
            <country>Sweden</country>
          </postal>
          <email>marcus@dansarie.se</email>
          <uri>https://orcid.org/0000-0001-9246-0263</uri>
        </address>
      </author>
      <author fullname="Ragnar Sundblad" initials="R." surname="Sundblad">
        <organization showOnFrontPage="true">Netnod</organization>
        <address>
          <postal>
            <country>Sweden</country>
          </postal>
          <email>ragge@netnod.se</email>
        </address>
      </author>
    </section>
  </back>
</rfc>
