<?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-tls-dtls13-43" indexInclude="true" ipr="pre5378Trust200902" number="9147" obsoletes="6347" prepTime="2022-04-21T15:17:48" 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-tls-dtls13-43" rel="prev"/>
  <link href="https://dx.doi.org/10.17487/rfc9147" rel="alternate"/>
  <link href="urn:issn:2070-1721" rel="alternate"/>
  <front>
    <title abbrev="DTLS 1.3">The Datagram Transport Layer Security (DTLS) Protocol Version 1.3</title>
    <seriesInfo name="RFC" value="9147" stream="IETF"/>
    <author initials="E." surname="Rescorla" fullname="Eric Rescorla">
      <organization showOnFrontPage="true">Mozilla</organization>
      <address>
        <email>ekr@rtfm.com</email>
      </address>
    </author>
    <author initials="H." surname="Tschofenig" fullname="Hannes Tschofenig">
      <organization showOnFrontPage="true">Arm Limited</organization>
      <address>
        <email>hannes.tschofenig@arm.com</email>
      </address>
    </author>
    <author initials="N." surname="Modadugu" fullname="Nagendra Modadugu">
      <organization showOnFrontPage="true">Google, Inc.</organization>
      <address>
        <email>nagendra@cs.stanford.edu</email>
      </address>
    </author>
    <date month="04" year="2022"/>
    <area>Security</area>
    <workgroup>TLS</workgroup>
    <keyword>Communication Security</keyword>
    <abstract pn="section-abstract">
      <t indent="0" pn="section-abstract-1">This document specifies version 1.3 of the Datagram Transport Layer Security
(DTLS) protocol. DTLS 1.3 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" pn="section-abstract-2">The DTLS 1.3 protocol is based on the Transport Layer Security (TLS)
1.3 protocol and provides equivalent security guarantees with the exception of order protection / non-replayability.  Datagram semantics of the underlying transport are preserved by the DTLS protocol.</t>
      <t indent="0" pn="section-abstract-3">This document obsoletes RFC 6347.</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/rfc9147" 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) 2022 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 Revised BSD License text as described in
            Section 4.e of the Trust Legal Provisions and are provided without
            warranty as described in the Revised BSD License.
        </t>
        <t indent="0" pn="section-boilerplate.2-3">
            This document may contain material from IETF Documents or IETF
            Contributions published or made publicly available before November
            10, 2008. The person(s) controlling the copyright in some of this
            material may not have granted the IETF Trust the right to allow
            modifications of such material outside the IETF Standards Process.
            Without obtaining an adequate license from the person(s)
            controlling the copyright in such materials, this document may not
            be modified outside the IETF Standards Process, and derivative
            works of it may not be created outside the IETF Standards Process,
            except to format it for publication as an RFC or to translate it
            into languages other than English.
        </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" keepWithNext="true" 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>
          </li>
          <li pn="section-toc.1-1.2">
            <t indent="0" keepWithNext="true" 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-conventions-and-terminology">Conventions and Terminology</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-dtls-design-rationale-and-o">DTLS Design Rationale and Overview</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.3.2">
              <li pn="section-toc.1-1.3.2.1">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.3.2.1.1"><xref derivedContent="3.1" format="counter" sectionFormat="of" target="section-3.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-packet-loss">Packet Loss</xref></t>
              </li>
              <li pn="section-toc.1-1.3.2.2">
                <t indent="0" pn="section-toc.1-1.3.2.2.1"><xref derivedContent="3.2" format="counter" sectionFormat="of" target="section-3.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-reordering">Reordering</xref></t>
              </li>
              <li pn="section-toc.1-1.3.2.3">
                <t indent="0" pn="section-toc.1-1.3.2.3.1"><xref derivedContent="3.3" format="counter" sectionFormat="of" target="section-3.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-fragmentation">Fragmentation</xref></t>
              </li>
              <li pn="section-toc.1-1.3.2.4">
                <t indent="0" pn="section-toc.1-1.3.2.4.1"><xref derivedContent="3.4" format="counter" sectionFormat="of" target="section-3.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-replay-detection">Replay Detection</xref></t>
              </li>
            </ul>
          </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-dtls-record-layer">The DTLS Record Layer</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-demultiplexing-dtls-records">Demultiplexing DTLS Records</xref></t>
              </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-sequence-number-and-epoch">Sequence Number and Epoch</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2.2.2">
                  <li pn="section-toc.1-1.4.2.2.2.1">
                    <t indent="0" pn="section-toc.1-1.4.2.2.2.1.1"><xref derivedContent="4.2.1" format="counter" sectionFormat="of" target="section-4.2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-processing-guidelines">Processing Guidelines</xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.2.2.2">
                    <t indent="0" pn="section-toc.1-1.4.2.2.2.2.1"><xref derivedContent="4.2.2" format="counter" sectionFormat="of" target="section-4.2.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-reconstructing-the-sequence">Reconstructing the Sequence Number and Epoch</xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.2.2.3">
                    <t indent="0" pn="section-toc.1-1.4.2.2.2.3.1"><xref derivedContent="4.2.3" format="counter" sectionFormat="of" target="section-4.2.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-record-number-encryption">Record Number Encryption</xref></t>
                  </li>
                </ul>
              </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-transport-layer-mapping">Transport Layer Mapping</xref></t>
              </li>
              <li pn="section-toc.1-1.4.2.4">
                <t indent="0" pn="section-toc.1-1.4.2.4.1"><xref derivedContent="4.4" format="counter" sectionFormat="of" target="section-4.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-pmtu-issues">PMTU Issues</xref></t>
              </li>
              <li pn="section-toc.1-1.4.2.5">
                <t indent="0" pn="section-toc.1-1.4.2.5.1"><xref derivedContent="4.5" format="counter" sectionFormat="of" target="section-4.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-record-payload-protection">Record Payload Protection</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2.5.2">
                  <li pn="section-toc.1-1.4.2.5.2.1">
                    <t indent="0" pn="section-toc.1-1.4.2.5.2.1.1"><xref derivedContent="4.5.1" format="counter" sectionFormat="of" target="section-4.5.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-anti-replay">Anti-Replay</xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.5.2.2">
                    <t indent="0" pn="section-toc.1-1.4.2.5.2.2.1"><xref derivedContent="4.5.2" format="counter" sectionFormat="of" target="section-4.5.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-handling-invalid-records">Handling Invalid Records</xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.5.2.3">
                    <t indent="0" pn="section-toc.1-1.4.2.5.2.3.1"><xref derivedContent="4.5.3" format="counter" sectionFormat="of" target="section-4.5.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-aead-limits">AEAD Limits</xref></t>
                  </li>
                </ul>
              </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-the-dtls-handshake-protocol">The DTLS Handshake Protocol</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-denial-of-service-counterme">Denial-of-Service Countermeasures</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-dtls-handshake-message-form">DTLS Handshake Message Format</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-clienthello-message">ClientHello Message</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-serverhello-message">ServerHello Message</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-handshake-message-fragmenta">Handshake Message Fragmentation and Reassembly</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-endofearlydata-message">EndOfEarlyData Message</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-dtls-handshake-flights">DTLS Handshake Flights</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.8">
                <t indent="0" pn="section-toc.1-1.5.2.8.1"><xref derivedContent="5.8" format="counter" sectionFormat="of" target="section-5.8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-timeout-and-retransmission">Timeout and Retransmission</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.5.2.8.2">
                  <li pn="section-toc.1-1.5.2.8.2.1">
                    <t indent="0" pn="section-toc.1-1.5.2.8.2.1.1"><xref derivedContent="5.8.1" format="counter" sectionFormat="of" target="section-5.8.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-state-machine">State Machine</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.8.2.2">
                    <t indent="0" pn="section-toc.1-1.5.2.8.2.2.1"><xref derivedContent="5.8.2" format="counter" sectionFormat="of" target="section-5.8.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-timer-values">Timer Values</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.8.2.3">
                    <t indent="0" pn="section-toc.1-1.5.2.8.2.3.1"><xref derivedContent="5.8.3" format="counter" sectionFormat="of" target="section-5.8.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-large-flight-sizes">Large Flight Sizes</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.8.2.4">
                    <t indent="0" pn="section-toc.1-1.5.2.8.2.4.1"><xref derivedContent="5.8.4" format="counter" sectionFormat="of" target="section-5.8.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-state-machine-duplication-f">State Machine Duplication for Post-Handshake Messages</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.5.2.9">
                <t indent="0" pn="section-toc.1-1.5.2.9.1"><xref derivedContent="5.9" format="counter" sectionFormat="of" target="section-5.9"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-cryptographic-label-prefix">Cryptographic Label Prefix</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.10">
                <t indent="0" pn="section-toc.1-1.5.2.10.1"><xref derivedContent="5.10" format="counter" sectionFormat="of" target="section-5.10"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-alert-messages">Alert Messages</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.11">
                <t indent="0" pn="section-toc.1-1.5.2.11.1"><xref derivedContent="5.11" format="counter" sectionFormat="of" target="section-5.11"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-establishing-new-associatio">Establishing New Associations with Existing Parameters</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-example-of-handshake-with-t">Example of Handshake with Timeout and Retransmission</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.6.2">
              <li pn="section-toc.1-1.6.2.1">
                <t indent="0" pn="section-toc.1-1.6.2.1.1"><xref derivedContent="6.1" format="counter" sectionFormat="of" target="section-6.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-epoch-values-and-rekeying">Epoch Values and Rekeying</xref></t>
              </li>
            </ul>
          </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-ack-message">ACK Message</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-sending-acks">Sending ACKs</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-receiving-acks">Receiving ACKs</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-design-rationale">Design Rationale</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-key-updates">Key Updates</xref></t>
          </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-connection-id-updates">Connection ID Updates</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-connection-id-example">Connection ID Example</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-application-data-protocol">Application Data Protocol</xref></t>
          </li>
          <li pn="section-toc.1-1.11">
            <t indent="0" pn="section-toc.1-1.11.1"><xref derivedContent="11" format="counter" sectionFormat="of" target="section-11"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-security-considerations">Security Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.12">
            <t indent="0" pn="section-toc.1-1.12.1"><xref derivedContent="12" format="counter" sectionFormat="of" target="section-12"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-changes-since-dtls-12">Changes since DTLS 1.2</xref></t>
          </li>
          <li pn="section-toc.1-1.13">
            <t indent="0" pn="section-toc.1-1.13.1"><xref derivedContent="13" format="counter" sectionFormat="of" target="section-13"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-updates-affecting-dtls-12">Updates Affecting DTLS 1.2</xref></t>
          </li>
          <li pn="section-toc.1-1.14">
            <t indent="0" pn="section-toc.1-1.14.1"><xref derivedContent="14" format="counter" sectionFormat="of" target="section-14"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-iana-considerations">IANA Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.15">
            <t indent="0" pn="section-toc.1-1.15.1"><xref derivedContent="15" format="counter" sectionFormat="of" target="section-15"/>. <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.15.2">
              <li pn="section-toc.1-1.15.2.1">
                <t indent="0" pn="section-toc.1-1.15.2.1.1"><xref derivedContent="15.1" format="counter" sectionFormat="of" target="section-15.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-normative-references">Normative References</xref></t>
              </li>
              <li pn="section-toc.1-1.15.2.2">
                <t indent="0" pn="section-toc.1-1.15.2.2.1"><xref derivedContent="15.2" format="counter" sectionFormat="of" target="section-15.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-informative-references">Informative References</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.16">
            <t indent="0" pn="section-toc.1-1.16.1"><xref derivedContent="Appendix A" format="default" sectionFormat="of" target="section-appendix.a"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-protocol-data-structures-an">Protocol Data Structures and Constant Values</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.16.2">
              <li pn="section-toc.1-1.16.2.1">
                <t indent="0" pn="section-toc.1-1.16.2.1.1"><xref derivedContent="A.1" format="counter" sectionFormat="of" target="section-appendix.a.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-record-layer">Record Layer</xref></t>
              </li>
              <li pn="section-toc.1-1.16.2.2">
                <t indent="0" pn="section-toc.1-1.16.2.2.1"><xref derivedContent="A.2" format="counter" sectionFormat="of" target="section-appendix.a.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-handshake-protocol">Handshake Protocol</xref></t>
              </li>
              <li pn="section-toc.1-1.16.2.3">
                <t indent="0" pn="section-toc.1-1.16.2.3.1"><xref derivedContent="A.3" format="counter" sectionFormat="of" target="section-appendix.a.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-acks">ACKs</xref></t>
              </li>
              <li pn="section-toc.1-1.16.2.4">
                <t indent="0" pn="section-toc.1-1.16.2.4.1"><xref derivedContent="A.4" format="counter" sectionFormat="of" target="section-appendix.a.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-connection-id-management">Connection ID Management</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.17">
            <t indent="0" pn="section-toc.1-1.17.1"><xref derivedContent="Appendix B" format="default" sectionFormat="of" target="section-appendix.b"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-analysis-of-limits-on-ccm-u">Analysis of Limits on CCM Usage</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.17.2">
              <li pn="section-toc.1-1.17.2.1">
                <t indent="0" pn="section-toc.1-1.17.2.1.1"><xref derivedContent="B.1" format="counter" sectionFormat="of" target="section-appendix.b.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-confidentiality-limits">Confidentiality Limits</xref></t>
              </li>
              <li pn="section-toc.1-1.17.2.2">
                <t indent="0" pn="section-toc.1-1.17.2.2.1"><xref derivedContent="B.2" format="counter" sectionFormat="of" target="section-appendix.b.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-integrity-limits">Integrity Limits</xref></t>
              </li>
              <li pn="section-toc.1-1.17.2.3">
                <t indent="0" pn="section-toc.1-1.17.2.3.1"><xref derivedContent="B.3" format="counter" sectionFormat="of" target="section-appendix.b.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-limits-for-aead_aes_128_ccm">Limits for AEAD_AES_128_CCM_8</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.18">
            <t indent="0" pn="section-toc.1-1.18.1"><xref derivedContent="Appendix C" format="default" sectionFormat="of" target="section-appendix.c"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-implementation-pitfalls">Implementation Pitfalls</xref></t>
          </li>
          <li pn="section-toc.1-1.19">
            <t indent="0" pn="section-toc.1-1.19.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.d"/><xref derivedContent="" format="title" sectionFormat="of" target="name-contributors">Contributors</xref></t>
          </li>
          <li pn="section-toc.1-1.20">
            <t indent="0" pn="section-toc.1-1.20.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.e"/><xref derivedContent="" format="title" sectionFormat="of" target="name-authors-addresses">Authors' Addresses</xref></t>
          </li>
        </ul>
      </section>
    </toc>
  </front>
  <middle>
    <section anchor="introduction" numbered="true" toc="include" removeInRFC="false" pn="section-1">
      <name slugifiedName="name-introduction">Introduction</name>
      <t indent="0" pn="section-1-1">The primary goal of the TLS protocol is to establish an authenticated,
confidentiality- and integrity-protected channel between two communicating peers.
The TLS protocol is composed of two layers:
the TLS record protocol and the TLS handshake protocol. However, TLS must
run over a reliable transport channel -- typically TCP <xref target="RFC0793" format="default" sectionFormat="of" derivedContent="RFC0793"/>.</t>
      <t indent="0" pn="section-1-2">There are applications that use UDP <xref target="RFC0768" format="default" sectionFormat="of" derivedContent="RFC0768"/> as a transport
and the Datagram Transport Layer
Security (DTLS) protocol has been developed to offer communication security protection
for those applications. DTLS is deliberately designed to be
as similar to TLS as possible, both to minimize new security invention and to
maximize the amount of code and infrastructure reuse.</t>
      <t indent="0" pn="section-1-3">DTLS 1.0 <xref target="RFC4347" format="default" sectionFormat="of" derivedContent="RFC4347"/> was originally defined as a delta from TLS 1.1 <xref target="RFC4346" format="default" sectionFormat="of" derivedContent="RFC4346"/>, and
DTLS 1.2 <xref target="RFC6347" format="default" sectionFormat="of" derivedContent="RFC6347"/> was defined as a series of deltas to TLS 1.2 <xref target="RFC5246" format="default" sectionFormat="of" derivedContent="RFC5246"/>.  There
is no DTLS 1.1; that version number was skipped in order to harmonize version numbers
with TLS.  This specification describes the most current version of the DTLS protocol
as a delta from TLS 1.3 <xref target="RFC8446" format="default" sectionFormat="of" derivedContent="TLS13"/>. It obsoletes DTLS 1.2.</t>
      <t indent="0" pn="section-1-4">Implementations that speak both DTLS 1.2 and DTLS 1.3 can interoperate with those
that speak only DTLS 1.2 (using DTLS 1.2 of course), just as TLS 1.3 implementations
can interoperate with TLS 1.2 (see <xref target="RFC8446" sectionFormat="of" section="D" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8446#appendix-D" derivedContent="TLS13"/> for details).
While backwards compatibility with DTLS 1.0 is possible, the use of DTLS 1.0 is not
recommended, as explained in <xref target="RFC7525" sectionFormat="of" section="3.1.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7525#section-3.1.2" derivedContent="RFC7525"/>. <xref target="RFC8996" format="default" sectionFormat="of" derivedContent="DEPRECATE"/> forbids the use of DTLS 1.0.
</t>
    </section>
    <section anchor="conventions-and-terminology" numbered="true" toc="include" removeInRFC="false" pn="section-2">
      <name slugifiedName="name-conventions-and-terminology">Conventions and Terminology</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>
      <t indent="0" pn="section-2-2">The following terms are used:</t>
      <dl spacing="normal" indent="3" newline="false" pn="section-2-3">
        <dt pn="section-2-3.1">client:</dt>
        <dd pn="section-2-3.2">The endpoint initiating the DTLS connection.</dd>
        <dt pn="section-2-3.3">association:</dt>
        <dd pn="section-2-3.4">Shared state between two endpoints established with
a DTLS handshake.</dd>
        <dt pn="section-2-3.5">connection:</dt>
        <dd pn="section-2-3.6">Synonym for association.</dd>
        <dt pn="section-2-3.7">endpoint:</dt>
        <dd pn="section-2-3.8">Either the client or server of the connection.</dd>
        <dt pn="section-2-3.9">epoch:</dt>
        <dd pn="section-2-3.10">One set of cryptographic keys used for encryption and decryption.</dd>
        <dt pn="section-2-3.11">handshake:</dt>
        <dd pn="section-2-3.12">An initial negotiation between client and server that establishes
the parameters of the connection.</dd>
        <dt pn="section-2-3.13">peer:</dt>
        <dd pn="section-2-3.14">An endpoint. When discussing a particular endpoint, "peer" refers to
the endpoint that is remote to the primary subject of discussion.</dd>
        <dt pn="section-2-3.15">receiver:</dt>
        <dd pn="section-2-3.16">An endpoint that is receiving records.</dd>
        <dt pn="section-2-3.17">sender:</dt>
        <dd pn="section-2-3.18">An endpoint that is transmitting records.</dd>
        <dt pn="section-2-3.19">server:</dt>
        <dd pn="section-2-3.20">The endpoint that did not initiate the DTLS connection.</dd>
        <dt pn="section-2-3.21">CID:</dt>
        <dd pn="section-2-3.22">Connection ID.</dd>
        <dt pn="section-2-3.23">MSL:</dt>
        <dd pn="section-2-3.24">Maximum Segment Lifetime.</dd>
      </dl>
      <t indent="0" pn="section-2-4">The reader is assumed to be familiar with <xref target="RFC8446" format="default" sectionFormat="of" derivedContent="TLS13"/>.
As in TLS 1.3, the HelloRetryRequest has the same format as a ServerHello
message, but for convenience we use the term HelloRetryRequest throughout
this document as if it were a distinct message.</t>
      <t indent="0" pn="section-2-5">DTLS 1.3 uses network byte order (big-endian) format for encoding messages
based on the encoding format defined in <xref target="RFC8446" format="default" sectionFormat="of" derivedContent="TLS13"/> and earlier (D)TLS specifications.</t>
      <t indent="0" pn="section-2-6">The reader is also assumed to be familiar with <xref target="RFC9146" format="default" sectionFormat="of" derivedContent="RFC9146"/>,
as this document applies the CID functionality to DTLS 1.3.</t>
      <t indent="0" pn="section-2-7">Figures in this document illustrate various combinations of the DTLS protocol exchanges, and the symbols have the following meaning:</t>
      <dl spacing="normal" indent="6" newline="false" pn="section-2-8">
        <dt pn="section-2-8.1">'+'</dt>
        <dd pn="section-2-8.2">indicates noteworthy extensions sent in the previously noted message.</dd>
        <dt pn="section-2-8.3">'*'</dt>
        <dd pn="section-2-8.4">indicates optional or situation-dependent messages/extensions that are not always sent.</dd>
        <dt pn="section-2-8.5">'{}'</dt>
        <dd pn="section-2-8.6">indicates messages protected using keys derived from a [sender]_handshake_traffic_secret.</dd>
        <dt pn="section-2-8.7">'[]'</dt>
        <dd pn="section-2-8.8">indicates messages protected using keys derived from traffic_secret_N.</dd>
      </dl>
    </section>
    <section anchor="dtls-rational" numbered="true" toc="include" removeInRFC="false" pn="section-3">
      <name slugifiedName="name-dtls-design-rationale-and-o">DTLS Design Rationale and Overview</name>
      <t indent="0" pn="section-3-1">The basic design philosophy of DTLS is to construct "TLS over datagram transport".
Datagram transport neither requires nor provides reliable or in-order delivery of data.
The DTLS protocol preserves this property for application data.
Applications such as media streaming, Internet telephony, and online gaming use
datagram transport for communication due to the delay-sensitive nature
of transported data.  The behavior of such applications is unchanged when the
DTLS protocol is used to secure communication, since the DTLS protocol
does not compensate for lost or reordered data traffic. Note that while
low-latency streaming and gaming use DTLS to protect data (e.g., for
protection of a WebRTC data channel), telephony utilizes DTLS for
key establishment and the Secure Real-time Transport Protocol (SRTP) for
protection of data <xref target="RFC5763" format="default" sectionFormat="of" derivedContent="RFC5763"/>.</t>
      <t indent="0" pn="section-3-2">TLS cannot be used directly over datagram transports for the following four reasons:</t>
      <ol spacing="normal" type="1" indent="adaptive" start="1" pn="section-3-3"><li pn="section-3-3.1" derivedCounter="1.">TLS relies on an implicit sequence number on records.  If a record is not
received, then the recipient will use the wrong sequence number when
attempting to remove record protection from subsequent records. DTLS solves
this problem by adding sequence numbers to records.</li>
        <li pn="section-3-3.2" derivedCounter="2.">The TLS handshake is a lock-step cryptographic protocol.  Messages
must be transmitted and received in a defined order; any other
order is an error.  The DTLS handshake includes message sequence
numbers to enable fragmented message reassembly and in-order
delivery in case datagrams are lost or reordered.</li>
        <li pn="section-3-3.3" derivedCounter="3.">Handshake messages are potentially larger than can be contained in a single
datagram.  DTLS adds fields to handshake messages to support fragmentation
and reassembly.</li>
        <li pn="section-3-3.4" derivedCounter="4.">Datagram transport protocols are susceptible to abusive behavior
effecting denial-of-service (DoS) attacks against nonparticipants.  DTLS adds a
return-routability check and DTLS 1.3 uses the TLS 1.3 HelloRetryRequest message
(see <xref target="dos" format="default" sectionFormat="of" derivedContent="Section 5.1"/> for details).</li>
      </ol>
      <section anchor="packet-loss" numbered="true" toc="include" removeInRFC="false" pn="section-3.1">
        <name slugifiedName="name-packet-loss">Packet Loss</name>
        <t indent="0" pn="section-3.1-1">DTLS uses a simple retransmission timer to handle packet loss.
<xref target="dtls-retransmission" format="default" sectionFormat="of" derivedContent="Figure 1"/> demonstrates the basic concept, using the first
phase of the DTLS handshake:</t>
        <figure anchor="dtls-retransmission" align="left" suppress-title="false" pn="figure-1">
          <name slugifiedName="name-dtls-retransmission-example">DTLS Retransmission Example</name>
          <artwork name="" type="" align="left" alt="" pn="section-3.1-2.1">
         Client                                   Server
         ------                                   ------
         ClientHello           ------&gt;

                                 X&lt;-- HelloRetryRequest
                                                  (lost)

         [Timer Expires]

         ClientHello           ------&gt;
         (retransmit)
</artwork>
        </figure>
        <t indent="0" pn="section-3.1-3">Once the client has transmitted the ClientHello message, it expects
to see a HelloRetryRequest or a ServerHello from the server. However, if the
timer expires, the client knows that either the
ClientHello or the response from the server has been lost, which
causes the client
to retransmit the ClientHello. When the server receives the retransmission,
it knows to retransmit its HelloRetryRequest or ServerHello.</t>
        <t indent="0" pn="section-3.1-4">The server also maintains a retransmission timer for messages it
sends (other than HelloRetryRequest) and retransmits when that timer expires. Not
applying retransmissions to the HelloRetryRequest avoids the need to
create state on the server.  The HelloRetryRequest is designed to be
small enough that it will not itself be fragmented, thus avoiding
concerns about interleaving multiple HelloRetryRequests.</t>
        <t indent="0" pn="section-3.1-5">For more detail on timeouts and retransmission,
see <xref target="timeout-retransmissions" format="default" sectionFormat="of" derivedContent="Section 5.8"/>.</t>
      </section>
      <section anchor="reordering" numbered="true" toc="include" removeInRFC="false" pn="section-3.2">
        <name slugifiedName="name-reordering">Reordering</name>
        <t indent="0" pn="section-3.2-1">In DTLS, each handshake message is assigned a specific sequence
number.  When a peer receives a handshake
message, it can quickly determine whether that message is the next
message it expects.  If it is, then it processes it.  If not, it
queues it for future handling once all previous messages have been
received.</t>
      </section>
      <section anchor="fragmentation" numbered="true" toc="include" removeInRFC="false" pn="section-3.3">
        <name slugifiedName="name-fragmentation">Fragmentation</name>
        <t indent="0" pn="section-3.3-1">TLS and DTLS handshake messages can be quite large (in theory up to
2^24-1 bytes, in practice many kilobytes).  By contrast, UDP
datagrams are often limited to less than 1500 bytes if IP fragmentation is not
desired.  In order to compensate for this limitation, each DTLS
handshake message may be fragmented over several DTLS records, each
of which is intended to fit in a single UDP datagram
(see <xref target="pmtu-issues" format="default" sectionFormat="of" derivedContent="Section 4.4"/> for guidance). Each DTLS
handshake message contains both a fragment offset and a fragment
length.  Thus, a recipient in possession of all bytes of a handshake
message can reassemble the original unfragmented message.</t>
      </section>
      <section anchor="replay-detection" numbered="true" toc="include" removeInRFC="false" pn="section-3.4">
        <name slugifiedName="name-replay-detection">Replay Detection</name>
        <t indent="0" pn="section-3.4-1">DTLS optionally supports record replay detection.  The technique used
is the same as in IPsec AH/ESP, by maintaining a bitmap window of
received records.  Records that are too old to fit in the window and
records that have previously been received are silently discarded.
The replay detection feature is optional, since packet duplication is
not always malicious but can also occur due to routing errors.
Applications may conceivably detect duplicate packets and accordingly
modify their data transmission strategy.</t>
      </section>
    </section>
    <section anchor="the-dtls-record-layer" numbered="true" toc="include" removeInRFC="false" pn="section-4">
      <name slugifiedName="name-the-dtls-record-layer">The DTLS Record Layer</name>
      <t indent="0" pn="section-4-1">The DTLS 1.3 record layer is different from the TLS 1.3 record layer and
also different from the DTLS 1.2 record layer.</t>
      <ol spacing="normal" type="1" indent="adaptive" start="1" pn="section-4-2"><li pn="section-4-2.1" derivedCounter="1.">The DTLSCiphertext structure omits the superfluous version number and
type fields.</li>
        <li pn="section-4-2.2" derivedCounter="2.">DTLS adds an epoch and sequence number to the TLS record header.
This sequence number allows the recipient to correctly decrypt and verify DTLS records.
However, the number of bits used for the epoch and sequence number fields in
the DTLSCiphertext structure has been reduced from those in previous
        versions.</li>
        <li pn="section-4-2.3" derivedCounter="3.">
The DTLS epoch serialized in DTLSPlaintext is 2 octets long for compatibility
   with DTLS 1.2. However, this value is set as the least significant 2 octets
   of the connection epoch, which is an 8 octet counter incremented on every
   KeyUpdate. See <xref target="sequence-number-and-epoch" format="default" sectionFormat="of" derivedContent="Section 4.2"/> for details. The sequence number is set to
   be the low order 48 bits of the 64 bit sequence number. Plaintext records
   <bcp14>MUST NOT</bcp14> be sent with sequence numbers that would exceed 2^48-1, so the
   upper 16 bits will always be 0.
        </li>
        <li pn="section-4-2.4" derivedCounter="4.">The DTLSCiphertext structure has a variable-length header.</li>
      </ol>
      <t indent="0" pn="section-4-3">DTLSPlaintext records are used to send unprotected records and DTLSCiphertext
records are used to send protected records.</t>
      <t indent="0" pn="section-4-4">The DTLS record formats are shown below. Unless explicitly stated the
meaning of the fields is unchanged from previous TLS/DTLS versions.</t>
      <figure anchor="dtls-record" align="left" suppress-title="false" pn="figure-2">
        <name slugifiedName="name-dtls-13-record-formats">DTLS 1.3 Record Formats</name>
        <sourcecode name="" type="tls-presentation" markers="false" pn="section-4-5.1">
    struct {
        ContentType type;
        ProtocolVersion legacy_record_version;
        uint16 epoch = 0
        uint48 sequence_number;
        uint16 length;
        opaque fragment[DTLSPlaintext.length];
    } DTLSPlaintext;

    struct {
         opaque content[DTLSPlaintext.length];
         ContentType type;
         uint8 zeros[length_of_padding];
    } DTLSInnerPlaintext;

    struct {
        opaque unified_hdr[variable];
        opaque encrypted_record[length];
    } DTLSCiphertext;
</sourcecode>
      </figure>
      <dl newline="false" spacing="normal" indent="3" pn="section-4-6">
        <dt pn="section-4-6.1">legacy_record_version:</dt>
        <dd pn="section-4-6.2">
  This value <bcp14>MUST</bcp14> be set to {254, 253} for all records other
than the initial ClientHello (i.e., one not generated after a HelloRetryRequest),
where it may also be {254, 255} for compatibility purposes.
        It <bcp14>MUST</bcp14> be ignored for all purposes. See <xref target="RFC8446" sectionFormat="comma" section="D.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8446#appendix-D.1" derivedContent="TLS13"/> for the rationale for this.</dd>
        <dt pn="section-4-6.3">epoch:</dt>
        <dd pn="section-4-6.4">The least significant 2 bytes of the connection epoch value.</dd>
        <dt pn="section-4-6.5">unified_hdr:</dt>
        <dd pn="section-4-6.6">
The unified header (unified_hdr) is a structure of variable length, shown in <xref target="cid_hdr" format="default" sectionFormat="of" derivedContent="Figure 3"/>.</dd>
        <dt pn="section-4-6.7">encrypted_record:</dt>
        <dd pn="section-4-6.8">
  The encrypted form of the serialized DTLSInnerPlaintext structure.</dd>
      </dl>
      <figure anchor="cid_hdr" align="left" suppress-title="false" pn="figure-3">
        <name slugifiedName="name-dtls-13-unified-header">DTLS 1.3 Unified Header</name>
        <artwork name="" type="" align="left" alt="" pn="section-4-7.1">
    0 1 2 3 4 5 6 7
    +-+-+-+-+-+-+-+-+
    |0|0|1|C|S|L|E E|
    +-+-+-+-+-+-+-+-+
    | Connection ID |   Legend:
    | (if any,      |
    /  length as    /   C   - Connection ID (CID) present
    |  negotiated)  |   S   - Sequence number length
    +-+-+-+-+-+-+-+-+   L   - Length present
    |  8 or 16 bit  |   E   - Epoch
    |Sequence Number|
    +-+-+-+-+-+-+-+-+
    | 16 bit Length |
    | (if present)  |
    +-+-+-+-+-+-+-+-+
</artwork>
      </figure>
      <dl newline="false" spacing="normal" indent="3" pn="section-4-8">
        <dt pn="section-4-8.1">Fixed Bits:</dt>
        <dd pn="section-4-8.2">
  The three high bits of the first byte of the unified header are set to
001. This ensures that the value will fit within the DTLS region when
multiplexing is performed as described in <xref target="RFC7983" format="default" sectionFormat="of" derivedContent="RFC7983"/>. It also ensures
that distinguishing encrypted DTLS 1.3 records from encrypted DTLS 1.2
records is possible when they are carried on the same host/port quartet;
such multiplexing is only possible when CIDs <xref target="RFC9146" format="default" sectionFormat="of" derivedContent="RFC9146"/>
are in use, in which case DTLS 1.2 records will have the content type tls12_cid (25).</dd>
        <dt pn="section-4-8.3">C:</dt>
        <dd pn="section-4-8.4">
  The C bit (0x10) is set if the Connection ID is present.</dd>
        <dt pn="section-4-8.5">S:</dt>
        <dd pn="section-4-8.6">
  The S bit (0x08) indicates the size of the sequence number.
0 means an 8-bit sequence number, 1 means 16-bit.
 Implementations <bcp14>MAY</bcp14> mix sequence numbers of different lengths
 on the same connection.</dd>
        <dt pn="section-4-8.7">L:</dt>
        <dd pn="section-4-8.8">
  The L bit (0x04) is set if the length is present.</dd>
        <dt pn="section-4-8.9">E:</dt>
        <dd pn="section-4-8.10">
  The two low bits (0x03) include the low-order two bits of the epoch.</dd>
        <dt pn="section-4-8.11">Connection ID:</dt>
        <dd pn="section-4-8.12">
  Variable-length CID. The CID functionality
is described in <xref target="RFC9146" format="default" sectionFormat="of" derivedContent="RFC9146"/>. An example
can be found in <xref target="connection-id-example" format="default" sectionFormat="of" derivedContent="Section 9.1"/>.</dd>
        <dt pn="section-4-8.13">Sequence Number:</dt>
        <dd pn="section-4-8.14">
  The low-order 8 or 16 bits of the record sequence number.  This value is 16
bits if the S bit is set to 1, and 8 bits if the S bit is 0.</dd>
        <dt pn="section-4-8.15">Length:</dt>
        <dd pn="section-4-8.16">
  Identical to the length field in a TLS 1.3 record.</dd>
      </dl>
      <t indent="0" pn="section-4-9">As with previous versions of DTLS, multiple DTLSPlaintext
and DTLSCiphertext records can be included in the same
underlying transport datagram.</t>
      <t indent="0" pn="section-4-10"><xref target="hdr_examples" format="default" sectionFormat="of" derivedContent="Figure 4"/> illustrates different record headers.</t>
      <figure anchor="hdr_examples" align="left" suppress-title="false" pn="figure-4">
        <name slugifiedName="name-dtls-13-header-examples">DTLS 1.3 Header Examples</name>
        <artwork name="" type="" align="left" alt="" pn="section-4-11.1">
 0 1 2 3 4 5 6 7       0 1 2 3 4 5 6 7       0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+     +-+-+-+-+-+-+-+-+     +-+-+-+-+-+-+-+-+
| Content Type  |     |0|0|1|1|1|1|E E|     |0|0|1|0|0|0|E E|
+-+-+-+-+-+-+-+-+     +-+-+-+-+-+-+-+-+     +-+-+-+-+-+-+-+-+
|   16 bit      |     |               |     |8 bit Seq. No. |
|   Version     |     / Connection ID /     +-+-+-+-+-+-+-+-+
+-+-+-+-+-+-+-+-+     |               |     |               |
|   16 bit      |     +-+-+-+-+-+-+-+-+     |   Encrypted   |
|    Epoch      |     |    16 bit     |     /   Record      /
+-+-+-+-+-+-+-+-+     |Sequence Number|     |               |
|               |     +-+-+-+-+-+-+-+-+     +-+-+-+-+-+-+-+-+
|               |     |   16 bit      |
|   48 bit      |     |   Length      |       DTLSCiphertext
|Sequence Number|     +-+-+-+-+-+-+-+-+         Structure
|               |     |               |         (minimal)
|               |     |  Encrypted    |
+-+-+-+-+-+-+-+-+     /  Record       /
|    16 bit     |     |               |
|    Length     |     +-+-+-+-+-+-+-+-+
+-+-+-+-+-+-+-+-+
|               |      DTLSCiphertext
|               |        Structure
/   Fragment    /          (full)
|               |
+-+-+-+-+-+-+-+-+

 DTLSPlaintext
   Structure
</artwork>
      </figure>
      <t indent="0" pn="section-4-12">The length field <bcp14>MAY</bcp14> be omitted by clearing the L bit, which means that the
record consumes the entire rest of the datagram in the lower
level transport. In this case, it is not possible to have multiple
DTLSCiphertext format records without length fields in the same datagram.
Omitting the length field <bcp14>MUST</bcp14> only be used for the last record in a
datagram. Implementations <bcp14>MAY</bcp14> mix records with and without length
fields on the same connection.</t>
      <t indent="0" pn="section-4-13">If a Connection ID is negotiated, then it <bcp14>MUST</bcp14> be contained in all
datagrams. Sending implementations <bcp14>MUST NOT</bcp14> mix records from multiple DTLS associations
in the same datagram. If the second or later record has a connection
ID which does not correspond to the same association used
for previous records, the rest of the datagram <bcp14>MUST</bcp14> be discarded.</t>
      <t indent="0" pn="section-4-14">When expanded, the epoch and sequence number can be combined into an
unpacked RecordNumber structure, as shown below:</t>
      <sourcecode name="" type="tls-presentation" markers="false" pn="section-4-15">
    struct {
        uint64 epoch;
        uint64 sequence_number;
    } RecordNumber;
</sourcecode>
      <t indent="0" pn="section-4-16">This 128-bit value is used in the ACK message as well as in the "record_sequence_number"
input to the Authenticated Encryption with Associated Data (AEAD) function.
      The entire header value shown in <xref target="hdr_examples" format="default" sectionFormat="of" derivedContent="Figure 4"/> (but prior to record number
encryption; see <xref target="rne" format="default" sectionFormat="of" derivedContent="Section 4.2.3"/>) is used as the additional data value for the AEAD
function. For instance, if the minimal variant is used,
the Associated Data (AD) is 2 octets long. Note that this design is different from the additional data
calculation for DTLS 1.2 and for DTLS 1.2 with Connection IDs.
In DTLS 1.3 the 64-bit sequence_number is used as the sequence number for
the AEAD computation; unlike DTLS 1.2, the epoch is not included.
</t>
      <section anchor="demultiplexing-dtls-records" numbered="true" toc="include" removeInRFC="false" pn="section-4.1">
        <name slugifiedName="name-demultiplexing-dtls-records">Demultiplexing DTLS Records</name>
        <t indent="0" pn="section-4.1-1">
          DTLS 1.3's header format is more complicated to demux than
DTLS 1.2, which always carried the content type as the first
byte. As described in <xref target="demux" format="default" sectionFormat="of" derivedContent="Figure 5"/>, the first byte determines how an incoming
DTLS record is demultiplexed. The first 3 bits of the first byte
distinguish a DTLS 1.3 encrypted record from record types used in
previous DTLS versions and plaintext DTLS 1.3 record types. Hence, the
range 32 (0b0010 0000) to 63 (0b0011 1111) needs to be excluded
from future allocations by IANA to avoid problems while demultiplexing;
see <xref target="iana-considerations" format="default" sectionFormat="of" derivedContent="Section 14"/>.
Implementations can demultiplex DTLS 1.3 records
by examining the first byte as follows:
</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.1-2">
          <li pn="section-4.1-2.1">If the first byte is alert(21), handshake(22), or ack(proposed, 26),
the record <bcp14>MUST</bcp14> be interpreted as a DTLSPlaintext record.</li>
          <li pn="section-4.1-2.2">If the first byte is any other value, then receivers
<bcp14>MUST</bcp14> check to see if the leading bits of the first byte are
001. If so, the implementation <bcp14>MUST</bcp14> process the record as
DTLSCiphertext; the true content type will be inside the
protected portion.</li>
          <li pn="section-4.1-2.3">Otherwise, the record <bcp14>MUST</bcp14> be rejected as if it had failed
deprotection, as described in <xref target="handling-invalid-records" format="default" sectionFormat="of" derivedContent="Section 4.5.2"/>.</li>
        </ul>
        <t indent="0" pn="section-4.1-3"><xref target="demux" format="default" sectionFormat="of" derivedContent="Figure 5"/> shows this demultiplexing procedure graphically,
taking DTLS 1.3 and earlier versions of DTLS into account.</t>
        <figure anchor="demux" align="left" suppress-title="false" pn="figure-5">
          <name slugifiedName="name-demultiplexing-dtls-12-and-">Demultiplexing DTLS 1.2 and DTLS 1.3 Records</name>
          <artwork name="" type="" align="left" alt="" pn="section-4.1-4.1">
             +----------------+
             | Outer Content  |
             |   Type (OCT)   |
             |                |
             |   OCT == 20   -+--&gt; ChangeCipherSpec (DTLS &lt;1.3)
             |   OCT == 21   -+--&gt; Alert (Plaintext)
             |   OCT == 22   -+--&gt; DTLSHandshake (Plaintext)
             |   OCT == 23   -+--&gt; Application Data (DTLS &lt;1.3)
             |   OCT == 24   -+--&gt; Heartbeat (DTLS &lt;1.3)
packet  --&gt;  |   OCT == 25   -+--&gt; DTLSCiphertext with CID (DTLS 1.2)
             |   OCT == 26   -+--&gt; ACK (DTLS 1.3, Plaintext)
             |                |
             |                |   /+----------------+\
             | 31 &lt; OCT &lt; 64 -+--&gt; |DTLSCiphertext  |
             |                |    |(header bits    |
             |      else      |    | start with 001)|
             |       |        |   /+-------+--------+\
             +-------+--------+            |
                     |                     |
                     v          Decryption |
               +---------+          +------+
               |  Reject |          |
               +---------+          v
                            +----------------+
                            | Decrypted      |
                            | Content Type   |
                            | (DCT)          |
                            |                |
                            |     DCT == 21 -+--&gt; Alert
                            |     DCT == 22 -+--&gt; DTLSHandshake
                            |     DCT == 23 -+--&gt; Application Data
                            |     DCT == 24 -+--&gt; Heartbeat
                            |     DCT == 26 -+--&gt; ACK
                            |     else ------+--&gt; Error
                            +----------------+
</artwork>
        </figure>
      </section>
      <section anchor="sequence-number-and-epoch" numbered="true" toc="include" removeInRFC="false" pn="section-4.2">
        <name slugifiedName="name-sequence-number-and-epoch">Sequence Number and Epoch</name>
        <t indent="0" pn="section-4.2-1">DTLS uses an explicit or partly explicit sequence number, rather than an implicit one,
carried in the sequence_number field of the record.  Sequence numbers
are maintained separately for each epoch, with each sequence_number
initially being 0 for each epoch.</t>
        <t indent="0" pn="section-4.2-2">The epoch number is initially zero and is incremented each time
keying material changes and a sender aims to rekey. More details
are provided in <xref target="dtls-epoch" format="default" sectionFormat="of" derivedContent="Section 6.1"/>.</t>
        <section anchor="processing-guidelines" numbered="true" toc="include" removeInRFC="false" pn="section-4.2.1">
          <name slugifiedName="name-processing-guidelines">Processing Guidelines</name>
          <t indent="0" pn="section-4.2.1-1">Because DTLS records could be reordered, a record from epoch
M may be received after epoch N (where N &gt; M) has begun.
Implementations <bcp14>SHOULD</bcp14> discard records from earlier epochs but
<bcp14>MAY</bcp14> choose to
retain keying material from previous epochs for up to the default MSL
specified for TCP <xref target="RFC0793" format="default" sectionFormat="of" derivedContent="RFC0793"/> to allow for packet reordering.  (Note that
the intention here is that implementers use the current guidance from
the IETF for MSL, as specified in <xref target="RFC0793" format="default" sectionFormat="of" derivedContent="RFC0793"/> or successors,
not that they attempt to interrogate the MSL that
the system TCP stack is using.)</t>
          <t indent="0" pn="section-4.2.1-2">Conversely, it is possible for records that are protected with the
new epoch to be received prior to the completion of a
handshake.  For instance, the server may send its Finished message
and then start transmitting data.  Implementations <bcp14>MAY</bcp14> either buffer
or discard such records, though when DTLS is used over reliable
transports (e.g., SCTP <xref target="RFC4960" format="default" sectionFormat="of" derivedContent="RFC4960"/>), they <bcp14>SHOULD</bcp14> be buffered and
processed once the handshake completes.  Note that TLS's restrictions
on when records may be sent still apply, and the receiver treats the
records as if they were sent in the right order.</t>
          <t indent="0" pn="section-4.2.1-3">Implementations <bcp14>MUST</bcp14> send retransmissions of lost messages using the same
epoch and keying material as the original transmission.</t>
          <t indent="0" pn="section-4.2.1-4">Implementations <bcp14>MUST</bcp14> either abandon an association or rekey prior to
allowing the sequence number to wrap.</t>
          <t indent="0" pn="section-4.2.1-5">Implementations <bcp14>MUST NOT</bcp14> allow the epoch to wrap, but instead <bcp14>MUST</bcp14>
establish a new association, terminating the old association.</t>
        </section>
        <section anchor="reconstructing" numbered="true" toc="include" removeInRFC="false" pn="section-4.2.2">
          <name slugifiedName="name-reconstructing-the-sequence">Reconstructing the Sequence Number and Epoch</name>
          <t indent="0" pn="section-4.2.2-1">When receiving protected DTLS records, the recipient does not
have a full epoch or sequence number value in the record and so there is some
opportunity for ambiguity.  Because the full sequence number
is used to compute the per-record nonce and the epoch determines
the keys, failure to reconstruct these
values leads to failure to deprotect the record, and so implementations
<bcp14>MAY</bcp14> use a mechanism of their choice to determine the full values.
This section provides an algorithm which is comparatively simple
and which implementations are <bcp14>RECOMMENDED</bcp14> to follow.</t>
          <t indent="0" pn="section-4.2.2-2">If the epoch bits match those of the current epoch, then
implementations <bcp14>SHOULD</bcp14> reconstruct the sequence number by computing
the full sequence number which is numerically closest to one plus the
sequence number of the highest successfully deprotected record in the
current epoch.</t>
          <t indent="0" pn="section-4.2.2-3">During the handshake phase, the epoch bits unambiguously indicate the
correct key to use. After the
handshake is complete, if the epoch bits do not match those from the
current epoch, implementations <bcp14>SHOULD</bcp14> use the most recent past epoch
which has matching bits, and then reconstruct the sequence number for
that epoch as described above.</t>
        </section>
        <section anchor="rne" numbered="true" toc="include" removeInRFC="false" pn="section-4.2.3">
          <name slugifiedName="name-record-number-encryption">Record Number Encryption</name>
          <t indent="0" pn="section-4.2.3-1">In DTLS 1.3, when records are encrypted, record sequence numbers are
also encrypted. The basic pattern is that the underlying encryption
algorithm used with the AEAD algorithm is used to generate a mask
which is then XORed with the sequence number.</t>
          <t indent="0" pn="section-4.2.3-2">When the AEAD is based on AES, then the mask is generated by
computing AES-ECB on the first 16 bytes of the ciphertext:</t>
          <artwork name="" type="" align="left" alt="" pn="section-4.2.3-3">
  Mask = AES-ECB(sn_key, Ciphertext[0..15])
</artwork>
          <t indent="0" pn="section-4.2.3-4">When the AEAD is based on ChaCha20, then the mask is generated
by treating the first 4 bytes of the ciphertext as the block
counter and the next 12 bytes as the nonce, passing them to the ChaCha20
block function (<xref target="RFC8439" sectionFormat="of" section="2.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8439#section-2.3" derivedContent="CHACHA"/>):</t>
          <artwork name="" type="" align="left" alt="" pn="section-4.2.3-5">
  Mask = ChaCha20(sn_key, Ciphertext[0..3], Ciphertext[4..15])
</artwork>
          <t indent="0" pn="section-4.2.3-6">The sn_key is computed as follows:</t>
          <artwork name="" type="" align="left" alt="" pn="section-4.2.3-7">
  [sender]_sn_key = HKDF-Expand-Label(Secret, "sn", "", key_length)
</artwork>
          <t indent="0" pn="section-4.2.3-8">[sender] denotes the sending side. The per-epoch Secret value to be used is described
in <xref target="RFC8446" sectionFormat="of" section="7.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8446#section-7.3" derivedContent="TLS13"/>. Note that a new key is used for each epoch: because the epoch is sent in the clear, this does not result in ambiguity.</t>
          <t indent="0" pn="section-4.2.3-9">The encrypted sequence number is computed by XORing the leading
bytes of the mask with the on-the-wire representation of the
sequence number. Decryption is accomplished by the same process.</t>
          <t indent="0" pn="section-4.2.3-10">This procedure requires the ciphertext length to be at least 16 bytes. Receivers
<bcp14>MUST</bcp14> reject shorter records as if they had failed deprotection, as described in
<xref target="handling-invalid-records" format="default" sectionFormat="of" derivedContent="Section 4.5.2"/>. Senders <bcp14>MUST</bcp14> pad short plaintexts out (using the
conventional record padding mechanism) in order to make a suitable-length
ciphertext. Note that most of the DTLS AEAD algorithms have a 16 byte authentication
tag and need no padding. However, some algorithms, such as
TLS_AES_128_CCM_8_SHA256, have a shorter authentication tag and may require padding
for short inputs.</t>
          <t indent="0" pn="section-4.2.3-11">Future cipher suites, which are not based on AES or ChaCha20, <bcp14>MUST</bcp14> define
their own record sequence number encryption in order to be used with
DTLS.</t>
          <t indent="0" pn="section-4.2.3-12">Note that sequence number encryption is only applied to the DTLSCiphertext
structure and not to the DTLSPlaintext structure, even though it also contains a
sequence number.</t>
        </section>
      </section>
      <section anchor="transport-layer-mapping" numbered="true" toc="include" removeInRFC="false" pn="section-4.3">
        <name slugifiedName="name-transport-layer-mapping">Transport Layer Mapping</name>
        <t indent="0" pn="section-4.3-1">DTLS messages <bcp14>MAY</bcp14> be fragmented into multiple DTLS records.
Each DTLS record <bcp14>MUST</bcp14> fit within a single datagram.  In order to
avoid IP fragmentation, clients of the DTLS record layer <bcp14>SHOULD</bcp14>
attempt to size records so that they fit within any Path MTU (PMTU) estimates
obtained from the record layer. For more information about PMTU issues,
see <xref target="pmtu-issues" format="default" sectionFormat="of" derivedContent="Section 4.4"/>.</t>
        <t indent="0" pn="section-4.3-2">Multiple DTLS records <bcp14>MAY</bcp14> be placed in a single datagram.  Records are encoded
consecutively.  The length field from DTLS records containing that field can be
used to determine the boundaries between records.  The final record in a
datagram can omit the length field.  The first byte of the datagram payload <bcp14>MUST</bcp14>
be the beginning of a record.  Records <bcp14>MUST NOT</bcp14> span datagrams.</t>
        <t indent="0" pn="section-4.3-3">DTLS records without CIDs do not contain any association
identifiers, and applications must arrange to multiplex between associations.
With UDP, the host/port number is used to look up the appropriate security
association for incoming records without CIDs.</t>
        <t indent="0" pn="section-4.3-4">Some transports, such as DCCP <xref target="RFC4340" format="default" sectionFormat="of" derivedContent="RFC4340"/>, provide their own sequence
numbers.  When carried over those transports, both the DTLS and the
transport sequence numbers will be present.  Although this introduces
a small amount of inefficiency, the transport layer and DTLS sequence
numbers serve different purposes; therefore, for conceptual simplicity,
it is superior to use both sequence numbers.</t>
        <t indent="0" pn="section-4.3-5">Some transports provide congestion control for traffic
carried over them.  If the congestion window is sufficiently narrow,
DTLS handshake retransmissions may be held rather than transmitted
immediately, potentially leading to timeouts and spurious
retransmission.  When DTLS is used over such transports, care should
be taken not to overrun the likely congestion window. <xref target="RFC5238" format="default" sectionFormat="of" derivedContent="RFC5238"/>
defines a mapping of DTLS to DCCP that takes these issues into account.</t>
      </section>
      <section anchor="pmtu-issues" numbered="true" toc="include" removeInRFC="false" pn="section-4.4">
        <name slugifiedName="name-pmtu-issues">PMTU Issues</name>
        <t indent="0" pn="section-4.4-1">In general, DTLS's philosophy is to leave PMTU discovery to the application.
However, DTLS cannot completely ignore the PMTU for three reasons:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.4-2">
          <li pn="section-4.4-2.1">The DTLS record framing expands the datagram size, thus lowering
the effective PMTU from the application's perspective.</li>
          <li pn="section-4.4-2.2">In some implementations, the application may not directly talk to
the network, in which case the DTLS stack may absorb ICMP
"Datagram Too Big" indications <xref target="RFC1191" format="default" sectionFormat="of" derivedContent="RFC1191"/> or ICMPv6
"Packet Too Big" indications <xref target="RFC4443" format="default" sectionFormat="of" derivedContent="RFC4443"/>.</li>
          <li pn="section-4.4-2.3">The DTLS handshake messages can exceed the PMTU.</li>
        </ul>
        <t indent="0" pn="section-4.4-3">In order to deal with the first two issues, the DTLS record layer
<bcp14>SHOULD</bcp14> behave as described below.</t>
        <t indent="0" pn="section-4.4-4">If PMTU estimates are available from the underlying transport
protocol, they should be made available to upper layer
protocols. In particular:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.4-5">
          <li pn="section-4.4-5.1">For DTLS over UDP, the upper layer protocol <bcp14>SHOULD</bcp14> be allowed to
obtain the PMTU estimate maintained in the IP layer.</li>
          <li pn="section-4.4-5.2">For DTLS over DCCP, the upper layer protocol <bcp14>SHOULD</bcp14> be allowed to
obtain the current estimate of the PMTU.</li>
          <li pn="section-4.4-5.3">For DTLS over TCP or SCTP, which automatically fragment and
reassemble datagrams, there is no PMTU limitation.  However, the
upper layer protocol <bcp14>MUST NOT</bcp14> write any record that exceeds the
maximum record size of 2^14 bytes.</li>
        </ul>
        <t indent="0" pn="section-4.4-6">The DTLS record layer <bcp14>SHOULD</bcp14> also allow the upper layer protocol to
discover the amount of record expansion expected by the DTLS
processing; alternately, it <bcp14>MAY</bcp14> report PMTU estimates minus the
estimated expansion from the transport layer and DTLS record
framing.</t>
        <t indent="0" pn="section-4.4-7">Note that DTLS does not defend against spoofed ICMP messages;
implementations <bcp14>SHOULD</bcp14> ignore any such messages that indicate
PMTUs below the IPv4 and IPv6 minimums of 576 and 1280 bytes,
respectively.</t>
        <t indent="0" pn="section-4.4-8">If there is a transport protocol indication that the PMTU was exceeded
(either via ICMP or via a
refusal to send the datagram as in <xref target="RFC4340" sectionFormat="of" section="14" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4340#section-14" derivedContent="RFC4340"/>), then the
DTLS record layer <bcp14>MUST</bcp14> inform the upper layer protocol of the error.</t>
        <t indent="0" pn="section-4.4-9">The DTLS record layer <bcp14>SHOULD NOT</bcp14> interfere with upper layer protocols
performing PMTU discovery, whether via <xref target="RFC1191" format="default" sectionFormat="of" derivedContent="RFC1191"/> and <xref target="RFC4821" format="default" sectionFormat="of" derivedContent="RFC4821"/> for
IPv4 or via <xref target="RFC8201" format="default" sectionFormat="of" derivedContent="RFC8201"/> for IPv6.  In particular:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.4-10">
          <li pn="section-4.4-10.1">Where allowed by the underlying transport protocol, the upper
layer protocol <bcp14>SHOULD</bcp14> be allowed to set the state of the Don't Fragment (DF) bit
(in IPv4) or prohibit local fragmentation (in IPv6).</li>
          <li pn="section-4.4-10.2">If the underlying transport protocol allows the application to
request PMTU probing (e.g., DCCP), the DTLS record layer <bcp14>SHOULD</bcp14>
honor this request.</li>
        </ul>
        <t indent="0" pn="section-4.4-11">The final issue is the DTLS handshake protocol.  From the perspective
of the DTLS record layer, this is merely another upper layer
protocol.  However, DTLS handshakes occur infrequently and involve
only a few round trips; therefore, the handshake protocol PMTU
handling places a premium on rapid completion over accurate PMTU
discovery.  In order to allow connections under these circumstances,
DTLS implementations <bcp14>SHOULD</bcp14> follow the following rules:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.4-12">
          <li pn="section-4.4-12.1">If the DTLS record layer informs the DTLS handshake layer that a
message is too big, the handshake layer <bcp14>SHOULD</bcp14> immediately attempt to fragment
the message, using any existing information about the PMTU.</li>
          <li pn="section-4.4-12.2">If repeated retransmissions do not result in a response, and the
PMTU is unknown, subsequent retransmissions <bcp14>SHOULD</bcp14> back off to a
smaller record size, fragmenting the handshake message as
appropriate.  This specification does not specify an exact number of
retransmits to attempt before backing off, but 2-3 seems
appropriate.</li>
        </ul>
      </section>
      <section anchor="record-payload-protection" numbered="true" toc="include" removeInRFC="false" pn="section-4.5">
        <name slugifiedName="name-record-payload-protection">Record Payload Protection</name>
        <t indent="0" pn="section-4.5-1">Like TLS, DTLS transmits data as a series of protected records.  The
rest of this section describes the details of that format.</t>
        <section anchor="anti-replay" numbered="true" toc="include" removeInRFC="false" pn="section-4.5.1">
          <name slugifiedName="name-anti-replay">Anti-Replay</name>
          <t indent="0" pn="section-4.5.1-1">Each DTLS record contains a sequence number to provide replay protection.
Sequence number verification <bcp14>SHOULD</bcp14> be performed using the following
sliding window procedure, borrowed from <xref target="RFC4303" sectionFormat="of" section="3.4.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4303#section-3.4.3" derivedContent="RFC4303"/>.
Because each epoch resets the sequence number space, a separate sliding
window is needed for each epoch.</t>
          <t indent="0" pn="section-4.5.1-2">The received record counter for an epoch <bcp14>MUST</bcp14> be initialized to
zero when that epoch is first used. For each received record, the
receiver <bcp14>MUST</bcp14> verify that the record contains a sequence number that
does not duplicate the sequence number of any other record received
in that epoch during the lifetime of the association.
This check <bcp14>SHOULD</bcp14> happen after
deprotecting the record; otherwise, the record discard might itself
serve as a timing channel for the record number. Note that computing
the full record number from the partial is still a potential timing
channel for the record number, though a less powerful one than whether
the record was deprotected.</t>
          <t indent="0" pn="section-4.5.1-3">Duplicates are rejected through the use of a sliding receive window.
(How the window is implemented is a local matter, but the following
text describes the functionality that the implementation must
exhibit.) The receiver <bcp14>SHOULD</bcp14> pick a window large enough to handle
any plausible reordering, which depends on the data rate.
(The receiver does not notify the sender of the window
size.)</t>
          <t indent="0" pn="section-4.5.1-4">The "right" edge of the window represents the highest validated
sequence number value received in the epoch.  Records that contain
sequence numbers lower than the "left" edge of the window are
rejected.  Records falling within the window are checked against a
list of received records within the window.  An efficient means for
performing this check, based on the use of a bit mask, is described in
<xref target="RFC4303" sectionFormat="of" section="3.4.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4303#section-3.4.3" derivedContent="RFC4303"/>. If the received record falls within the
window and is new, or if the record is to the right of the window,
then the record is new.
</t>
          <t indent="0" pn="section-4.5.1-5">The window <bcp14>MUST NOT</bcp14> be updated due to a received record until that record has been deprotected
successfully.</t>
        </section>
        <section anchor="handling-invalid-records" numbered="true" toc="include" removeInRFC="false" pn="section-4.5.2">
          <name slugifiedName="name-handling-invalid-records">Handling Invalid Records</name>
          <t indent="0" pn="section-4.5.2-1">Unlike TLS, DTLS is resilient in the face of invalid records (e.g.,
invalid formatting, length, MAC, etc.).  In general, invalid records
<bcp14>SHOULD</bcp14> be silently discarded, thus preserving the association;
however, an error <bcp14>MAY</bcp14> be logged for diagnostic purposes.
Implementations which choose to generate an alert instead <bcp14>MUST</bcp14>
generate fatal alerts to avoid attacks where the attacker
repeatedly probes the implementation to see how it responds to
various types of error.  Note that if DTLS is run over UDP, then any
implementation which does this will be extremely susceptible to
DoS attacks because UDP forgery is so easy.
Thus, generating fatal alerts is <bcp14>NOT RECOMMENDED</bcp14> for such transports, both
to increase the reliability of DTLS service and to avoid the risk
of spoofing attacks sending traffic to unrelated third parties.</t>
          <t indent="0" pn="section-4.5.2-2">If DTLS is being carried over a transport that is resistant to
forgery (e.g., SCTP with SCTP-AUTH), then it is safer to send alerts
because an attacker will have difficulty forging a datagram that will
not be rejected by the transport layer.</t>
          <t indent="0" pn="section-4.5.2-3">Note that because invalid records are rejected at a layer lower than
the handshake state machine, they do not affect pending
retransmission timers.</t>
        </section>
        <section anchor="aead-limits" numbered="true" toc="include" removeInRFC="false" pn="section-4.5.3">
          <name slugifiedName="name-aead-limits">AEAD Limits</name>
          <t indent="0" pn="section-4.5.3-1"><xref target="RFC8446" sectionFormat="of" section="5.5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8446#section-5.5" derivedContent="TLS13"/> defines limits on the number of records that can
be protected using the same keys. These limits are specific to an AEAD
algorithm and apply equally to DTLS. Implementations <bcp14>SHOULD NOT</bcp14> protect more
records than allowed by the limit specified for the negotiated AEAD.
Implementations <bcp14>SHOULD</bcp14> initiate a key update before reaching this limit.</t>
          <t indent="0" pn="section-4.5.3-2"><xref target="RFC8446" format="default" sectionFormat="of" derivedContent="TLS13"/> does not specify a limit for AEAD_AES_128_CCM, but the analysis in
<xref target="ccm-bounds" format="default" sectionFormat="of" derivedContent="Appendix B"/> shows that a limit of 2^23 packets can be used to obtain the
same confidentiality protection as the limits specified in TLS.</t>
          <t indent="0" pn="section-4.5.3-3">The usage limits defined in TLS 1.3 exist for protection against attacks
on confidentiality and apply to successful applications of AEAD protection. The
integrity protections in authenticated encryption also depend on limiting the
number of attempts to forge packets. TLS achieves this by closing connections
after any record fails an authentication check. In comparison, DTLS ignores any
packet that cannot be authenticated, allowing multiple forgery attempts.</t>
          <t indent="0" pn="section-4.5.3-4">Implementations <bcp14>MUST</bcp14> count the number of received packets that fail
authentication with each key. If the number of packets that fail authentication
exceeds a limit that is specific to the AEAD in use, an implementation <bcp14>SHOULD</bcp14>
immediately close the connection. Implementations <bcp14>SHOULD</bcp14> initiate a key update
with update_requested before reaching this limit. Once a key update has been
initiated, the previous keys can be dropped when the limit is reached rather
than closing the connection. Applying a limit reduces the probability that an
attacker is able to successfully forge a packet; see <xref target="AEBounds" format="default" sectionFormat="of" derivedContent="AEBounds"/> and
<xref target="ROBUST" format="default" sectionFormat="of" derivedContent="ROBUST"/>.</t>
          <t indent="0" pn="section-4.5.3-5">For AEAD_AES_128_GCM, AEAD_AES_256_GCM, and AEAD_CHACHA20_POLY1305, the limit
on the number of records that fail authentication is 2^36. Note that the
analysis in <xref target="AEBounds" format="default" sectionFormat="of" derivedContent="AEBounds"/> supports a higher limit for  AEAD_AES_128_GCM and
AEAD_AES_256_GCM, but this specification recommends a lower limit. For
AEAD_AES_128_CCM, the limit on the number of records that fail authentication
is 2^23.5; see <xref target="ccm-bounds" format="default" sectionFormat="of" derivedContent="Appendix B"/>.</t>
          <t indent="0" pn="section-4.5.3-6">The AEAD_AES_128_CCM_8 AEAD, as used in TLS_AES_128_CCM_8_SHA256, does not have a
limit on the number of records that fail authentication that both limits the
probability of forgery by the same amount and does not expose implementations
to the risk of denial of service; see <xref target="ccm-short" format="default" sectionFormat="of" derivedContent="Appendix B.3"/>. Therefore,
TLS_AES_128_CCM_8_SHA256 <bcp14>MUST NOT</bcp14> be used in DTLS without additional safeguards
against forgery. Implementations <bcp14>MUST</bcp14> set usage limits for AEAD_AES_128_CCM_8
based on an understanding of any additional forgery protections that are used.</t>
          <t indent="0" pn="section-4.5.3-7">Any TLS cipher suite that is specified for use with DTLS <bcp14>MUST</bcp14> define limits on
the use of the associated AEAD function that preserves margins for both
confidentiality and integrity. That is, limits <bcp14>MUST</bcp14> be specified for the number
of packets that can be authenticated and for the number of packets that can fail
authentication before a key update is required. Providing a reference to any analysis upon which values are
based -- and any assumptions used in that analysis -- allows limits to be adapted
to varying usage conditions.</t>
        </section>
      </section>
    </section>
    <section anchor="dtls" numbered="true" toc="include" removeInRFC="false" pn="section-5">
      <name slugifiedName="name-the-dtls-handshake-protocol">The DTLS Handshake Protocol</name>
      <t indent="0" pn="section-5-1">DTLS 1.3 reuses the TLS 1.3 handshake messages and flows, with
the following changes:</t>
      <ol spacing="normal" type="1" indent="adaptive" start="1" pn="section-5-2"><li pn="section-5-2.1" derivedCounter="1.">To handle message loss, reordering, and fragmentation, modifications to
the handshake header are necessary.</li>
        <li pn="section-5-2.2" derivedCounter="2.">Retransmission timers are introduced to handle message loss.</li>
        <li pn="section-5-2.3" derivedCounter="3.">A new ACK content type has been added for reliable message delivery of handshake messages.</li>
      </ol>
      <t indent="0" pn="section-5-3">
In addition, DTLS reuses TLS 1.3's "cookie" extension to provide a return-routability
check as part of connection establishment. This is an important DoS
prevention mechanism for UDP-based protocols, unlike TCP-based protocols, for which
TCP establishes return-routability as part of the connection establishment.
      </t>
      <t indent="0" pn="section-5-4">DTLS implementations do not use the TLS 1.3 "compatibility mode" described in
<xref target="RFC8446" sectionFormat="of" section="D.4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8446#appendix-D.4" derivedContent="TLS13"/>.  DTLS servers <bcp14>MUST NOT</bcp14> echo the
"legacy_session_id" value from the client and endpoints <bcp14>MUST NOT</bcp14> send ChangeCipherSpec
messages.</t>
      <t indent="0" pn="section-5-5">With these exceptions, the DTLS message formats, flows, and logic are
the same as those of TLS 1.3.</t>
      <section anchor="dos" numbered="true" toc="include" removeInRFC="false" pn="section-5.1">
        <name slugifiedName="name-denial-of-service-counterme">Denial-of-Service Countermeasures</name>
        <t indent="0" pn="section-5.1-1">Datagram security protocols are extremely susceptible to a variety of
DoS attacks.  Two attacks are of particular concern:</t>
        <ol spacing="normal" type="1" indent="adaptive" start="1" pn="section-5.1-2"><li pn="section-5.1-2.1" derivedCounter="1.">An attacker can consume excessive resources on the server by
transmitting a series of handshake initiation requests, causing
the server to allocate state and potentially to perform
expensive cryptographic operations.</li>
          <li pn="section-5.1-2.2" derivedCounter="2.">An attacker can use the server as an amplifier by sending
connection initiation messages with a forged source address that belongs to a
victim.  The server then sends its response to the victim
machine, thus flooding it. Depending on the selected
parameters, this response message can be quite large, as
is the case for a Certificate message.</li>
        </ol>
        <t indent="0" pn="section-5.1-3">In order to counter both of these attacks, DTLS borrows the stateless
cookie technique used by Photuris <xref target="RFC2522" format="default" sectionFormat="of" derivedContent="RFC2522"/> and IKE <xref target="RFC7296" format="default" sectionFormat="of" derivedContent="RFC7296"/>.  When
the client sends its ClientHello message to the server, the server
<bcp14>MAY</bcp14> respond with a HelloRetryRequest message. The HelloRetryRequest message,
as well as the "cookie" extension, is defined in TLS 1.3.
The HelloRetryRequest message contains a stateless cookie (see
<xref target="RFC8446" sectionFormat="comma" section="4.2.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8446#section-4.2.2" derivedContent="TLS13"/>).
The client <bcp14>MUST</bcp14> send a new ClientHello
with the cookie added as an extension.  The server then verifies the cookie
and proceeds with the handshake only if it is valid.  This mechanism forces
the attacker/client to be able to receive the cookie, which makes DoS attacks
with spoofed IP addresses difficult.  This mechanism does not provide any defense
against DoS attacks mounted from valid IP addresses.</t>
        <t indent="0" pn="section-5.1-4">The DTLS 1.3 specification changes how cookies are exchanged
compared to DTLS 1.2. DTLS 1.3 reuses the HelloRetryRequest message
and conveys the cookie to the client via an extension. The client
receiving the cookie uses the same extension to place
the cookie subsequently into a ClientHello message.
DTLS 1.2, on the other hand, used a separate message, namely the HelloVerifyRequest,
to pass a cookie to the client and did not utilize the extension mechanism.
For backwards compatibility reasons, the cookie field in the ClientHello
is present in DTLS 1.3 but is ignored by a DTLS 1.3-compliant server
implementation.</t>
        <t indent="0" pn="section-5.1-5">The exchange is shown in <xref target="dtls-cookie-exchange" format="default" sectionFormat="of" derivedContent="Figure 6"/>. Note that
the figure focuses on the cookie exchange; all other extensions
are omitted.</t>
        <figure anchor="dtls-cookie-exchange" align="left" suppress-title="false" pn="figure-6">
          <name slugifiedName="name-dtls-exchange-with-helloret">DTLS Exchange with HelloRetryRequest Containing the "cookie" Extension</name>
          <artwork name="" type="" align="left" alt="" pn="section-5.1-6.1">
      Client                                   Server
      ------                                   ------
      ClientHello           ------&gt;

                            &lt;----- HelloRetryRequest
                                    + cookie

      ClientHello           ------&gt;
       + cookie

      [Rest of handshake]
</artwork>
        </figure>
        <t indent="0" pn="section-5.1-7">The "cookie" extension is defined in <xref target="RFC8446" sectionFormat="of" section="4.2.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8446#section-4.2.2" derivedContent="TLS13"/>. When sending the
initial ClientHello, the client does not have a cookie yet. In this case,
the "cookie" extension is omitted and the legacy_cookie field in the ClientHello
message <bcp14>MUST</bcp14> be set to a zero-length vector (i.e., a zero-valued single byte length field).</t>
        <t indent="0" pn="section-5.1-8">When responding to a HelloRetryRequest, the client <bcp14>MUST</bcp14> create a new
ClientHello message following the description in <xref target="RFC8446" sectionFormat="of" section="4.1.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8446#section-4.1.2" derivedContent="TLS13"/>.</t>
        <t indent="0" pn="section-5.1-9">If the HelloRetryRequest message is used, the initial ClientHello and
the HelloRetryRequest are included in the calculation of the
transcript hash. The computation of the
message hash for the HelloRetryRequest is done according to the description
in <xref target="RFC8446" sectionFormat="of" section="4.4.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8446#section-4.4.1" derivedContent="TLS13"/>.</t>
        <t indent="0" pn="section-5.1-10">The handshake transcript is not reset with the second ClientHello,
and a stateless server-cookie implementation requires the content or hash
of the initial ClientHello (and HelloRetryRequest)
to be stored in the cookie. The initial ClientHello is included in the
handshake transcript as a synthetic "message_hash" message, so only the hash
value is needed for the handshake to complete, though the complete
HelloRetryRequest contents are needed.</t>
        <t indent="0" pn="section-5.1-11">When the second ClientHello is received, the server can verify that
the cookie is valid and that the client can receive packets at the
given IP address. If the client's apparent IP address is embedded
in the cookie, this prevents an attacker from generating an acceptable
ClientHello apparently from another user.</t>
        <t indent="0" pn="section-5.1-12">One potential attack on this scheme is for the attacker to collect a
number of cookies from different addresses where it controls endpoints
and then reuse them to attack the server.
The server can defend against this attack by
changing the secret value frequently, thus invalidating those
cookies. If the server wishes to allow legitimate clients to
handshake through the transition (e.g., a client received a cookie with
Secret 1 and then sent the second ClientHello after the server has
changed to Secret 2), the server can have a limited window during
which it accepts both secrets.  <xref target="RFC7296" format="default" sectionFormat="of" derivedContent="RFC7296"/> suggests adding a key
identifier to cookies to detect this case. An alternative approach is
simply to try verifying with both secrets. It is <bcp14>RECOMMENDED</bcp14> that
servers implement a key rotation scheme that allows the server
to manage keys with overlapping lifetimes.
</t>
        <t indent="0" pn="section-5.1-13">Alternatively, the server can store timestamps in the cookie and
reject cookies that were generated outside a certain
interval of time.</t>
        <t indent="0" pn="section-5.1-14">DTLS servers <bcp14>SHOULD</bcp14> perform a cookie exchange whenever a new
handshake is being performed.  If the server is being operated in an
environment where amplification is not a problem, e.g., where
ICE <xref target="RFC8445" format="default" sectionFormat="of" derivedContent="RFC8445"/> has been used to establish bidirectional connectivity,
the server <bcp14>MAY</bcp14> be
configured not to perform a cookie exchange.  The default <bcp14>SHOULD</bcp14> be
that the exchange is performed, however.  In addition, the server <bcp14>MAY</bcp14>
choose not to do a cookie exchange when a session is resumed or, more
generically, when the DTLS handshake uses a PSK-based key exchange
and the IP address matches one associated with the PSK.
Servers which process 0-RTT requests and send 0.5-RTT responses without a cookie exchange risk being used in an amplification attack if the size of outgoing messages greatly exceeds the size of those that are received.
A server <bcp14>SHOULD</bcp14> limit the amount of data it sends toward a client address
to three times the amount of data sent by the client before
it verifies that the client is able to receive data at that address.
A client address is valid after a cookie exchange or handshake completion.
Clients <bcp14>MUST</bcp14> be prepared to do a cookie exchange with every
handshake. Note that cookies are only valid for the existing
handshake and cannot be stored for future handshakes.</t>
        <t indent="0" pn="section-5.1-15">If a server receives a ClientHello with an invalid cookie, it
<bcp14>MUST</bcp14> terminate the handshake with an "illegal_parameter" alert.
This allows the client to restart the connection from
scratch without a cookie.</t>
        <t indent="0" pn="section-5.1-16">As described in <xref target="RFC8446" sectionFormat="of" section="4.1.4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8446#section-4.1.4" derivedContent="TLS13"/>, clients <bcp14>MUST</bcp14>
abort the handshake with an "unexpected_message" alert in response
to any second HelloRetryRequest which was sent in the same connection
(i.e., where the ClientHello was itself in response to a HelloRetryRequest).</t>
        <t indent="0" pn="section-5.1-17">DTLS clients which do not want to receive a Connection ID <bcp14>SHOULD</bcp14>
still offer the "connection_id" extension <xref target="RFC9146" format="default" sectionFormat="of" derivedContent="RFC9146"/> unless
there is an application profile to the contrary. This permits
a server which wants to receive a CID to negotiate one.</t>
      </section>
      <section anchor="dtls-handshake-message-format" numbered="true" toc="include" removeInRFC="false" pn="section-5.2">
        <name slugifiedName="name-dtls-handshake-message-form">DTLS Handshake Message Format</name>
        <t indent="0" pn="section-5.2-1">DTLS uses the same Handshake messages as TLS 1.3. However,
prior to transmission they are converted to DTLSHandshake
messages, which contain extra data needed to support
message loss, reordering, and message fragmentation.</t>
        <sourcecode name="" type="tls-presentation" markers="false" pn="section-5.2-2">
    enum {
        client_hello(1),
        server_hello(2),
        new_session_ticket(4),
        end_of_early_data(5),
        encrypted_extensions(8),
        request_connection_id(9),           /* New */
        new_connection_id(10),              /* New */
        certificate(11),
        certificate_request(13),
        certificate_verify(15),
        finished(20),
        key_update(24),
        message_hash(254),
        (255)
    } HandshakeType;
</sourcecode>
        <sourcecode name="" type="tls-presentation" markers="false" pn="section-5.2-3">
    struct {
        HandshakeType msg_type;    /* handshake type */
        uint24 length;             /* bytes in message */
        uint16 message_seq;        /* DTLS-required field */
        uint24 fragment_offset;    /* DTLS-required field */
        uint24 fragment_length;    /* DTLS-required field */
        select (msg_type) {
            case client_hello:          ClientHello;
            case server_hello:          ServerHello;
            case end_of_early_data:     EndOfEarlyData;
            case encrypted_extensions:  EncryptedExtensions;
            case certificate_request:   CertificateRequest;
            case certificate:           Certificate;
            case certificate_verify:    CertificateVerify;
            case finished:              Finished;
            case new_session_ticket:    NewSessionTicket;
            case key_update:            KeyUpdate;
            case request_connection_id: RequestConnectionId;
            case new_connection_id:     NewConnectionId;
        } body;
    } DTLSHandshake;
</sourcecode>
        <t indent="0" pn="section-5.2-4">
  In DTLS 1.3, the message transcript is computed over the original
TLS 1.3-style Handshake messages without the message_seq,
fragment_offset, and fragment_length values. Note that this is
a change from DTLS 1.2 where those values were included
in the transcript.
</t>
        <t indent="0" pn="section-5.2-5">The first message each side transmits in each association always has
message_seq = 0.  Whenever a new message is generated, the
message_seq value is incremented by one. When a message is
retransmitted, the old message_seq value is reused, i.e., not
incremented. From the perspective of the DTLS record layer, the retransmission is
a new record.  This record will have a new
DTLSPlaintext.sequence_number value.</t>
        <t indent="3" pn="section-5.2-6">Note: In DTLS 1.2, the message_seq was reset to zero in case of a
rehandshake (i.e., renegotiation). On the surface, a rehandshake in DTLS 1.2
shares similarities with a post-handshake message exchange in DTLS 1.3. However,
in DTLS 1.3 the message_seq is not reset, to allow distinguishing a
retransmission from a previously sent post-handshake message from a newly
sent post-handshake message.</t>
        <t indent="0" pn="section-5.2-7">DTLS implementations maintain (at least notionally) a
next_receive_seq counter.  This counter is initially set to zero.
When a handshake message is received, if its message_seq value matches
next_receive_seq, next_receive_seq is incremented and the message is
processed.  If the sequence number is less than next_receive_seq, the
message <bcp14>MUST</bcp14> be discarded.  If the sequence number is greater than
next_receive_seq, the implementation <bcp14>SHOULD</bcp14> queue the message but <bcp14>MAY</bcp14>
discard it.  (This is a simple space/bandwidth trade-off).</t>
        <t indent="0" pn="section-5.2-8">In addition to the handshake messages that are deprecated by the TLS 1.3
specification, DTLS 1.3 furthermore deprecates the HelloVerifyRequest message
originally defined in DTLS 1.0. DTLS 1.3-compliant implementations <bcp14>MUST NOT</bcp14>
use the HelloVerifyRequest to execute a return-routability check. A
dual-stack DTLS 1.2 / DTLS 1.3 client <bcp14>MUST</bcp14>, however, be prepared to
interact with a DTLS 1.2 server.</t>
      </section>
      <section anchor="clienthello-message" numbered="true" toc="include" removeInRFC="false" pn="section-5.3">
        <name slugifiedName="name-clienthello-message">ClientHello Message</name>
        <t indent="0" pn="section-5.3-1">The format of the ClientHello used by a DTLS 1.3 client differs from the
TLS 1.3 ClientHello format, as shown below.</t>
        <sourcecode name="" type="tls-presentation" markers="false" pn="section-5.3-2">
    uint16 ProtocolVersion;
    opaque Random[32];

    uint8 CipherSuite[2];    /* Cryptographic suite selector */

    struct {
        ProtocolVersion legacy_version = { 254,253 }; // DTLSv1.2
        Random random;
        opaque legacy_session_id&lt;0..32&gt;;
        opaque legacy_cookie&lt;0..2^8-1&gt;;                  // DTLS
        CipherSuite cipher_suites&lt;2..2^16-2&gt;;
        opaque legacy_compression_methods&lt;1..2^8-1&gt;;
        Extension extensions&lt;8..2^16-1&gt;;
    } ClientHello;
</sourcecode>
        <dl newline="false" spacing="normal" indent="3" pn="section-5.3-3">
          <dt pn="section-5.3-3.1">legacy_version:</dt>
          <dd pn="section-5.3-3.2">
  In previous versions of DTLS, this field was used for version
negotiation and represented the highest version number supported by
the client. Experience has shown that many servers do not properly
implement version negotiation, leading to "version intolerance" in
which the server rejects an otherwise acceptable ClientHello with a
version number higher than it supports. In DTLS 1.3, the client
indicates its version preferences in the "supported_versions"
extension (see <xref target="RFC8446" sectionFormat="of" section="4.2.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8446#section-4.2.1" derivedContent="TLS13"/>) and the
legacy_version field <bcp14>MUST</bcp14> be set to {254, 253}, which was the version
number for DTLS 1.2. The supported_versions entries for DTLS 1.0 and DTLS 1.2 are
0xfeff and 0xfefd (to match the wire versions). The value 0xfefc is used
to indicate DTLS 1.3.</dd>
          <dt pn="section-5.3-3.3">random:</dt>
          <dd pn="section-5.3-3.4">
  Same as for TLS 1.3, except that the downgrade sentinels described
in <xref target="RFC8446" sectionFormat="of" section="4.1.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8446#section-4.1.3" derivedContent="TLS13"/> when TLS 1.2
and TLS 1.1 and below are negotiated apply to DTLS 1.2 and DTLS 1.0, respectively.
</dd>
          <dt pn="section-5.3-3.5">legacy_session_id:</dt>
          <dd pn="section-5.3-3.6">
  Versions of TLS and DTLS before version 1.3 supported a "session resumption"
feature, which has been merged with pre-shared keys (PSK) in version 1.3.  A client
which has a cached session ID set by a pre-DTLS 1.3 server <bcp14>SHOULD</bcp14> set this
field to that value. Otherwise, it <bcp14>MUST</bcp14> be set as a zero-length vector
(i.e., a zero-valued single byte length field).</dd>
          <dt pn="section-5.3-3.7">legacy_cookie:</dt>
          <dd pn="section-5.3-3.8">
  A DTLS 1.3-only client <bcp14>MUST</bcp14> set the legacy_cookie field to zero length.
If a DTLS 1.3 ClientHello is received with any other value in this field,
the server <bcp14>MUST</bcp14> abort the handshake with an "illegal_parameter" alert.</dd>
          <dt pn="section-5.3-3.9">cipher_suites:</dt>
          <dd pn="section-5.3-3.10">
  Same as for TLS 1.3; only suites with DTLS-OK=Y may be used.</dd>
          <dt pn="section-5.3-3.11">legacy_compression_methods:</dt>
          <dd pn="section-5.3-3.12">
  Same as for TLS 1.3.</dd>
          <dt pn="section-5.3-3.13">extensions:</dt>
          <dd pn="section-5.3-3.14">
  Same as for TLS 1.3.</dd>
        </dl>
      </section>
      <section anchor="serverhello-message" numbered="true" toc="include" removeInRFC="false" pn="section-5.4">
        <name slugifiedName="name-serverhello-message">ServerHello Message</name>
        <t indent="0" pn="section-5.4-1">The DTLS 1.3 ServerHello message is the same as the TLS 1.3
ServerHello message, except that the legacy_version field
is set to 0xfefd, indicating DTLS 1.2.</t>
      </section>
      <section anchor="handshake-message-fragmentation-and-reassembly" numbered="true" toc="include" removeInRFC="false" pn="section-5.5">
        <name slugifiedName="name-handshake-message-fragmenta">Handshake Message Fragmentation and Reassembly</name>
        <t indent="0" pn="section-5.5-1">As described in <xref target="transport-layer-mapping" format="default" sectionFormat="of" derivedContent="Section 4.3"/>, one or more handshake
messages may be carried in a single datagram. However, handshake messages are
potentially bigger than the size allowed by the underlying datagram transport.
DTLS provides a mechanism for fragmenting a handshake message over a
number of records, each of which can be transmitted in separate datagrams, thus
avoiding IP fragmentation.</t>
        <t indent="0" pn="section-5.5-2">When transmitting the handshake message, the sender divides the
message into a series of N contiguous data ranges. The ranges <bcp14>MUST NOT</bcp14>
overlap.  The sender then creates N DTLSHandshake messages, all with the
same message_seq value as the original DTLSHandshake message.  Each new
message is labeled with the fragment_offset (the number of bytes
contained in previous fragments) and the fragment_length (the length
of this fragment).  The length field in all messages is the same as
the length field of the original message.  An unfragmented message is
a degenerate case with fragment_offset=0 and fragment_length=length.
Each handshake message fragment that is placed into a record
<bcp14>MUST</bcp14> be delivered in a single UDP datagram.</t>
        <t indent="0" pn="section-5.5-3">When a DTLS implementation receives a handshake message fragment corresponding
to the next expected handshake message sequence number, it
<bcp14>MUST</bcp14> process it, either by buffering it until it has the entire
handshake message or by processing any in-order portions of the message.
The transcript consists of complete TLS Handshake messages (reassembled
as necessary). Note that this requires removing the message_seq,
fragment_offset, and fragment_length fields to create the Handshake
structure.
        </t>
        <t indent="0" pn="section-5.5-4">
DTLS
implementations <bcp14>MUST</bcp14> be able to handle overlapping fragment ranges.
This allows senders to retransmit handshake messages with smaller
fragment sizes if the PMTU estimate changes. Senders <bcp14>MUST NOT</bcp14> change
handshake message bytes upon retransmission. Receivers <bcp14>MAY</bcp14> check
that retransmitted bytes are identical and <bcp14>SHOULD</bcp14> abort the handshake
with an "illegal_parameter" alert if the value of a byte changes.</t>
        <t indent="0" pn="section-5.5-5">Note that as with TLS, multiple handshake messages may be placed in
the same DTLS record, provided that there is room and that they are
part of the same flight.  Thus, there are two acceptable ways to pack
two DTLS handshake messages into the same datagram: in the same record or in
separate records.</t>
      </section>
      <section anchor="end-of-early-data" numbered="true" toc="include" removeInRFC="false" pn="section-5.6">
        <name slugifiedName="name-endofearlydata-message">EndOfEarlyData Message</name>
        <t indent="0" pn="section-5.6-1">The DTLS 1.3 handshake has one important difference from the
TLS 1.3 handshake: the EndOfEarlyData message is omitted both
from the wire and the handshake transcript. Because DTLS
records have epochs, EndOfEarlyData is not necessary to determine
when the early data is complete, and because DTLS is lossy,
attackers can trivially mount the deletion attacks that EndOfEarlyData
prevents in TLS. Servers <bcp14>SHOULD NOT</bcp14> accept records from epoch 1 indefinitely once they are able to process records from epoch 3. Though reordering of IP packets can result in records from epoch 1 arriving after records from epoch 3, this is not likely to persist for very long relative to the round trip time. Servers could discard epoch 1  keys after the first epoch 3 data arrives, or retain keys for processing epoch 1 data for a short period.
(See <xref target="dtls-epoch" format="default" sectionFormat="of" derivedContent="Section 6.1"/> for the definitions of each epoch.)</t>
      </section>
      <section anchor="dtls-handshake-flights" numbered="true" toc="include" removeInRFC="false" pn="section-5.7">
        <name slugifiedName="name-dtls-handshake-flights">DTLS Handshake Flights</name>
        <t indent="0" pn="section-5.7-1">DTLS handshake messages are grouped into a series of message flights. A flight starts with the
handshake message transmission of one peer and ends with the expected response from the
other peer. <xref target="tab-flights" format="default" sectionFormat="of" derivedContent="Table 1"/> contains a complete list of message combinations that constitute flights.</t>
        <table anchor="tab-flights" align="center" pn="table-1">
          <name slugifiedName="name-flight-handshake-message-co">Flight Handshake Message Combinations</name>
          <thead>
            <tr>
              <th align="left" colspan="1" rowspan="1">Note</th>
              <th align="left" colspan="1" rowspan="1">Client</th>
              <th align="left" colspan="1" rowspan="1">Server</th>
              <th align="left" colspan="1" rowspan="1">Handshake Messages</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left" colspan="1" rowspan="1"> </td>
              <td align="left" colspan="1" rowspan="1">x</td>
              <td align="left" colspan="1" rowspan="1"> </td>
              <td align="left" colspan="1" rowspan="1">ClientHello</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1"> </td>
              <td align="left" colspan="1" rowspan="1"> </td>
              <td align="left" colspan="1" rowspan="1">x</td>
              <td align="left" colspan="1" rowspan="1">HelloRetryRequest</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1"> </td>
              <td align="left" colspan="1" rowspan="1"> </td>
              <td align="left" colspan="1" rowspan="1">x</td>
              <td align="left" colspan="1" rowspan="1">ServerHello, EncryptedExtensions, CertificateRequest, Certificate, CertificateVerify, Finished</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">1</td>
              <td align="left" colspan="1" rowspan="1">x</td>
              <td align="left" colspan="1" rowspan="1"> </td>
              <td align="left" colspan="1" rowspan="1">Certificate, CertificateVerify, Finished</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">1</td>
              <td align="left" colspan="1" rowspan="1"> </td>
              <td align="left" colspan="1" rowspan="1">x</td>
              <td align="left" colspan="1" rowspan="1">NewSessionTicket</td>
            </tr>
          </tbody>
        </table>
        <t indent="0" pn="section-5.7-3">Remarks:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.7-4">
          <li pn="section-5.7-4.1">
            <xref target="tab-flights" format="default" sectionFormat="of" derivedContent="Table 1"/> does not highlight any of the optional messages.</li>
          <li pn="section-5.7-4.2">Regarding note (1): When a handshake flight is sent without any expected response, as is the case with
 the client's final flight or with the NewSessionTicket message, the flight must be
 acknowledged with an ACK message.</li>
        </ul>
        <t indent="0" pn="section-5.7-5">Below are several example message exchanges illustrating the flight concept.
The notational conventions from <xref target="RFC8446" format="default" sectionFormat="of" derivedContent="TLS13"/> are used.</t>
        <figure anchor="dtls-full" align="left" suppress-title="false" pn="figure-7">
          <name slugifiedName="name-message-flights-for-a-full-">Message Flights for a Full DTLS Handshake (with Cookie Exchange)</name>
          <artwork name="" type="" align="left" alt="" pn="section-5.7-6.1">
Client                                            Server

                                                           +--------+
 ClientHello                                               | Flight |
                       --------&gt;                           +--------+

                                                           +--------+
                       &lt;--------        HelloRetryRequest  | Flight |
                                         + cookie          +--------+


                                                           +--------+
ClientHello                                                | Flight |
 + cookie              --------&gt;                           +--------+



                                              ServerHello
                                    {EncryptedExtensions}  +--------+
                                    {CertificateRequest*}  | Flight |
                                           {Certificate*}  +--------+
                                     {CertificateVerify*}
                                               {Finished}
                       &lt;--------      [Application Data*]



 {Certificate*}                                            +--------+
 {CertificateVerify*}                                      | Flight |
 {Finished}            --------&gt;                           +--------+
 [Application Data]
                                                           +--------+
                       &lt;--------                    [ACK]  | Flight |
                                      [Application Data*]  +--------+

 [Application Data]    &lt;-------&gt;      [Application Data]
</artwork>
        </figure>
        <figure anchor="dtls-psk" align="left" suppress-title="false" pn="figure-8">
          <name slugifiedName="name-message-flights-for-resumpt">Message Flights for Resumption and PSK Handshake (without Cookie Exchange)</name>
          <artwork name="" type="" align="left" alt="" pn="section-5.7-7.1">
 ClientHello                                              +--------+
  + pre_shared_key                                        | Flight |
  + psk_key_exchange_modes                                +--------+
  + key_share*         --------&gt;


                                             ServerHello
                                        + pre_shared_key  +--------+
                                            + key_share*  | Flight |
                                   {EncryptedExtensions}  +--------+
                       &lt;--------              {Finished}
                                     [Application Data*]
                                                          +--------+
 {Finished}            --------&gt;                          | Flight |
 [Application Data*]                                      +--------+

                                                          +--------+
                       &lt;--------                   [ACK]  | Flight |
                                     [Application Data*]  +--------+

 [Application Data]    &lt;-------&gt;      [Application Data]
</artwork>
        </figure>
        <figure anchor="dtls-zero-rtt" align="left" suppress-title="false" pn="figure-9">
          <name slugifiedName="name-message-flights-for-the-zer">Message Flights for the Zero-RTT Handshake</name>
          <artwork name="" type="" align="left" alt="" pn="section-5.7-8.1">
Client                                            Server

 ClientHello
  + early_data
  + psk_key_exchange_modes                                +--------+
  + key_share*                                            | Flight |
  + pre_shared_key                                        +--------+
 (Application Data*)     --------&gt;

                                             ServerHello
                                        + pre_shared_key
                                            + key_share*  +--------+
                                   {EncryptedExtensions}  | Flight |
                                              {Finished}  +--------+
                       &lt;--------     [Application Data*]


                                                          +--------+
 {Finished}            --------&gt;                          | Flight |
 [Application Data*]                                      +--------+

                                                          +--------+
                       &lt;--------                   [ACK]  | Flight |
                                     [Application Data*]  +--------+

 [Application Data]    &lt;-------&gt;      [Application Data]
</artwork>
        </figure>
        <figure anchor="dtls-post-handshake-ticket" align="left" suppress-title="false" pn="figure-10">
          <name slugifiedName="name-message-flights-for-the-new">Message Flights for the NewSessionTicket Message</name>
          <artwork name="" type="" align="left" alt="" pn="section-5.7-9.1">
Client                                            Server

                                                          +--------+
                       &lt;--------       [NewSessionTicket] | Flight |
                                                          +--------+

                                                          +--------+
[ACK]                  --------&gt;                          | Flight |
                                                          +--------+
</artwork>
        </figure>
        <t indent="0" pn="section-5.7-10">KeyUpdate, NewConnectionId, and RequestConnectionId follow a similar pattern
to NewSessionTicket: a single message sent by one side
followed by an ACK by the other.</t>
      </section>
      <section anchor="timeout-retransmissions" numbered="true" toc="include" removeInRFC="false" pn="section-5.8">
        <name slugifiedName="name-timeout-and-retransmission">Timeout and Retransmission</name>
        <section anchor="state-machine" numbered="true" toc="include" removeInRFC="false" pn="section-5.8.1">
          <name slugifiedName="name-state-machine">State Machine</name>
          <t indent="0" pn="section-5.8.1-1">DTLS uses a simple timeout and retransmission scheme with the
state machine shown in <xref target="dtls-timeout-state-machine" format="default" sectionFormat="of" derivedContent="Figure 11"/>.</t>
          <figure anchor="dtls-timeout-state-machine" align="left" suppress-title="false" pn="figure-11">
            <name slugifiedName="name-dtls-timeout-and-retransmis">DTLS Timeout and Retransmission State Machine</name>
            <artwork name="" type="" align="left" alt="" pn="section-5.8.1-2.1">
                             +-----------+
                             | PREPARING |
                +----------&gt; |           |
                |            |           |
                |            +-----------+
                |                  |
                |                  | Buffer next flight
                |                  |
                |                 \|/
                |            +-----------+
                |            |           |
                |            |  SENDING  |&lt;------------------+
                |            |           |                   |
                |            +-----------+                   |
        Receive |                  |                         |
           next |                  | Send flight or partial  |
         flight |                  | flight                  |
                |                  |                         |
                |                  | Set retransmit timer    |
                |                 \|/                        |
                |            +-----------+                   |
                |            |           |                   |
                +------------|  WAITING  |-------------------+
                |     +-----&gt;|           |   Timer expires   |
                |     |      +-----------+                   |
                |     |          |  |   |                    |
                |     |          |  |   |                    |
                |     +----------+  |   +--------------------+
                |    Receive record |   Read retransmit or ACK
        Receive |  (Maybe Send ACK) |
           last |                   |
         flight |                   | Receive ACK
                |                   | for last flight
               \|/                  |
                                    |
            +-----------+           |
            |           | &lt;---------+
            | FINISHED  |
            |           |
            +-----------+
                |  /|\
                |   |
                |   |
                +---+

          Server read retransmit
              Retransmit ACK
</artwork>
          </figure>
          <t indent="0" pn="section-5.8.1-3">The state machine has four basic states: PREPARING, SENDING, WAITING,
and FINISHED.</t>
          <t indent="0" pn="section-5.8.1-4">In the PREPARING state, the implementation does whatever computations
are necessary to prepare the next flight of messages.  It then
buffers them up for transmission (emptying the transmission
buffer first) and enters the SENDING state.</t>
          <t indent="0" pn="section-5.8.1-5">In the SENDING state, the implementation transmits the buffered
flight of messages. If the implementation has received one or more
ACKs (see <xref target="ack-msg" format="default" sectionFormat="of" derivedContent="Section 7"/>) from the peer, then it <bcp14>SHOULD</bcp14> omit any messages or
message fragments which have already been acknowledged. Once the messages
have been sent, the implementation then sets a retransmit timer
and enters the WAITING state.</t>
          <t indent="0" pn="section-5.8.1-6">There are four ways to exit the WAITING state:</t>
          <ol spacing="normal" type="1" indent="adaptive" start="1" pn="section-5.8.1-7"><li pn="section-5.8.1-7.1" derivedCounter="1.">The retransmit timer expires: the implementation transitions to
the SENDING state, where it retransmits the flight, adjusts and re-arms the
retransmit timer (see <xref target="timer-values" format="default" sectionFormat="of" derivedContent="Section 5.8.2"/>), and returns to the WAITING state.</li>
            <li pn="section-5.8.1-7.2" derivedCounter="2.">The implementation reads an ACK from the peer: upon receiving
an ACK for a partial flight (as mentioned in <xref target="sending-acks" format="default" sectionFormat="of" derivedContent="Section 7.1"/>),
the implementation transitions
to the SENDING state, where it retransmits the unacknowledged portion
of the flight, adjusts and re-arms the retransmit timer, and returns to the
WAITING state.
 Upon receiving an ACK for a complete flight,
the implementation cancels all retransmissions and either
remains in WAITING, or, if the ACK was for the final flight,
transitions to FINISHED.</li>
            <li pn="section-5.8.1-7.3" derivedCounter="3.">The implementation reads a retransmitted flight from the peer
when none of the messages that it sent in response to that flight
   have been acknowledged: the
implementation transitions to the SENDING state, where it
retransmits the flight, adjusts and re-arms the retransmit timer, and returns
to the WAITING state.  The rationale here is that the receipt of a
duplicate message is the likely result of timer expiry on the peer
and therefore suggests that part of one's previous flight was
lost.</li>
            <li pn="section-5.8.1-7.4" derivedCounter="4.">The implementation receives some or all of the next flight of messages: if
this is the final flight of messages, the implementation
transitions to FINISHED.  If the implementation needs to send a new
flight, it transitions to the PREPARING state. Partial reads
(whether partial messages or only some of the messages in the
flight) may also trigger the implementation to send an ACK, as
described in <xref target="sending-acks" format="default" sectionFormat="of" derivedContent="Section 7.1"/>.</li>
          </ol>
          <t indent="0" pn="section-5.8.1-8">Because DTLS clients send the first message (ClientHello), they start
in the PREPARING state.  DTLS servers start in the WAITING state, but
with empty buffers and no retransmit timer.</t>
          <t indent="0" pn="section-5.8.1-9">In addition, for at least twice the default MSL defined for <xref target="RFC0793" format="default" sectionFormat="of" derivedContent="RFC0793"/>,
when in the FINISHED state, the server <bcp14>MUST</bcp14> respond to retransmission
of the client's final flight with a retransmit of its ACK.</t>
          <t indent="0" pn="section-5.8.1-10">Note that because of packet loss, it is possible for one side to be
sending application data even though the other side has not received
the first side's Finished message.  Implementations <bcp14>MUST</bcp14> either
discard or buffer all application data records for epoch 3 and
above until they have received the Finished message from the
peer. Implementations <bcp14>MAY</bcp14> treat receipt of application data with a new
epoch prior to receipt of the corresponding Finished message as
evidence of reordering or packet loss and retransmit their final
flight immediately, shortcutting the retransmission timer.</t>
        </section>
        <section anchor="timer-values" numbered="true" toc="include" removeInRFC="false" pn="section-5.8.2">
          <name slugifiedName="name-timer-values">Timer Values</name>
          <t indent="0" pn="section-5.8.2-1">The configuration of timer settings varies with implementations, and certain
deployment environments require timer value adjustments. Mishandling
of the timer can lead to serious congestion problems -- for example, if
many instances of a DTLS time out early and retransmit too quickly on
a congested link.</t>
          <t indent="0" pn="section-5.8.2-2">Unless implementations have deployment-specific and/or external information about the round trip time,
implementations <bcp14>SHOULD</bcp14> use an initial timer value of 1000 ms and double
the value at each retransmission, up to no less than 60 seconds (the maximum as specified in
RFC 6298 <xref target="RFC6298" format="default" sectionFormat="of" derivedContent="RFC6298"/>). Application-specific profiles <bcp14>MAY</bcp14>
recommend shorter or longer timer values. For instance:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.8.2-3">
            <li pn="section-5.8.2-3.1">Profiles for specific deployment environments, such as in low-power,
multi-hop mesh scenarios as used in some Internet of Things (IoT) networks,
<bcp14>MAY</bcp14> specify longer timeouts. See <xref target="I-D.ietf-uta-tls13-iot-profile" format="default" sectionFormat="of" derivedContent="IOT-PROFILE"/> for
more information about one such DTLS 1.3 IoT profile.</li>
            <li pn="section-5.8.2-3.2">Real-time protocols <bcp14>MAY</bcp14> specify shorter timeouts. It is <bcp14>RECOMMENDED</bcp14>
that for DTLS-SRTP <xref target="RFC5764" format="default" sectionFormat="of" derivedContent="RFC5764"/>, a default timeout of
400 ms be used; because customer experience degrades with one-way latencies
of greater than 200 ms, real-time deployments are less likely
to have long latencies.</li>
          </ul>
          <t indent="0" pn="section-5.8.2-4">In settings where there is external information (for instance, from an ICE <xref target="RFC8445" format="default" sectionFormat="of" derivedContent="RFC8445"/> handshake, or from previous connections to the same server)
about the RTT, implementations <bcp14>SHOULD</bcp14> use 1.5 times that RTT estimate
as the retransmit timer.</t>
          <t indent="0" pn="section-5.8.2-5">Implementations <bcp14>SHOULD</bcp14> retain the current timer value until a
message is transmitted and acknowledged without having to
be retransmitted, at which time the value <bcp14>SHOULD</bcp14> be adjusted
to 1.5 times the measured round trip time for that
message. After a long period of idleness, no less
than 10 times the current timer value, implementations <bcp14>MAY</bcp14> reset the
timer to the initial value.</t>
          <t indent="0" pn="section-5.8.2-6">Note that because retransmission is for the handshake and not dataflow, the effect on
congestion of shorter timeouts is smaller than in generic protocols
such as TCP or QUIC. Experience with DTLS 1.2, which uses a
simpler "retransmit everything on timeout" approach, has not shown
serious congestion problems in practice.</t>
        </section>
        <section anchor="large-flight-sizes" numbered="true" toc="include" removeInRFC="false" pn="section-5.8.3">
          <name slugifiedName="name-large-flight-sizes">Large Flight Sizes</name>
          <t indent="0" pn="section-5.8.3-1">DTLS does not have any built-in congestion control or rate control;
in general, this is not an issue because messages tend to be small.
However, in principle, some messages -- especially Certificate -- can
be quite large. If all the messages in a large flight are sent
at once, this can result in network congestion. A better strategy
is to send out only part of the flight, sending more when
messages are acknowledged. Several extensions have been standardized
to reduce the size of the Certificate message -- for example,
the "cached_info" extension <xref target="RFC7924" format="default" sectionFormat="of" derivedContent="RFC7924"/>; certificate
compression <xref target="RFC8879" format="default" sectionFormat="of" derivedContent="RFC8879"/>; and <xref target="RFC6066" format="default" sectionFormat="of" derivedContent="RFC6066"/>, which defines the "client_certificate_url"
extension allowing DTLS clients to send a sequence of Uniform
Resource Locators (URLs) instead of the client certificate.</t>
          <t indent="0" pn="section-5.8.3-2">DTLS stacks <bcp14>SHOULD NOT</bcp14> send more than 10 records in a single transmission.</t>
        </section>
        <section anchor="state-machine-duplication" numbered="true" toc="include" removeInRFC="false" pn="section-5.8.4">
          <name slugifiedName="name-state-machine-duplication-f">State Machine Duplication for Post-Handshake Messages</name>
          <t indent="0" pn="section-5.8.4-1">DTLS 1.3 makes use of the following categories of post-handshake messages:</t>
          <ol spacing="normal" type="1" indent="adaptive" start="1" pn="section-5.8.4-2"><li pn="section-5.8.4-2.1" derivedCounter="1.">NewSessionTicket</li>
            <li pn="section-5.8.4-2.2" derivedCounter="2.">KeyUpdate</li>
            <li pn="section-5.8.4-2.3" derivedCounter="3.">NewConnectionId</li>
            <li pn="section-5.8.4-2.4" derivedCounter="4.">RequestConnectionId</li>
            <li pn="section-5.8.4-2.5" derivedCounter="5.">Post-handshake client authentication</li>
          </ol>
          <t indent="0" pn="section-5.8.4-3">Messages of each category can be sent independently, and reliability is established
via independent state machines, each of which behaves as described in <xref target="state-machine" format="default" sectionFormat="of" derivedContent="Section 5.8.1"/>.
For example, if a server sends a NewSessionTicket and a CertificateRequest message,
two independent state machines will be created.</t>
          <t indent="0" pn="section-5.8.4-4">Sending multiple instances of messages of
a given category without having completed earlier transmissions is allowed for some
categories, but not for others.
 Specifically, a server <bcp14>MAY</bcp14> send multiple NewSessionTicket
messages at once without awaiting ACKs for earlier NewSessionTicket messages first. Likewise, a
server <bcp14>MAY</bcp14> send multiple CertificateRequest messages at once without having completed
earlier client authentication requests before. In contrast, implementations <bcp14>MUST NOT</bcp14>
send KeyUpdate, NewConnectionId, or RequestConnectionId messages if an earlier message
of the same type has not yet been acknowledged.</t>
          <t indent="3" pn="section-5.8.4-5">Note: Except for post-handshake client authentication, which involves handshake messages
in both directions, post-handshake messages are single-flight, and their respective state
machines on the sender side reduce to waiting for an ACK and retransmitting the original
message. In particular, note that a RequestConnectionId message does not force the receiver
to send a NewConnectionId message in reply, and both messages are therefore treated
independently.</t>
          <t indent="0" pn="section-5.8.4-6">Creating and correctly updating multiple state machines requires feedback from the handshake
logic to the state machine layer, indicating which message belongs to which state machine.
For example, if a server sends multiple CertificateRequest messages and receives a Certificate
message in response, the corresponding state machine can only be determined after inspecting the
certificate_request_context field. Similarly, a server sending a single CertificateRequest
and receiving a NewConnectionId message in response can only decide that the NewConnectionId
message should be treated through an independent state machine after inspecting the handshake
message type.</t>
        </section>
      </section>
      <section anchor="cryptographic-label-prefix" numbered="true" toc="include" removeInRFC="false" pn="section-5.9">
        <name slugifiedName="name-cryptographic-label-prefix">Cryptographic Label Prefix</name>
        <t indent="0" pn="section-5.9-1"><xref target="RFC8446" sectionFormat="of" section="7.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8446#section-7.1" derivedContent="TLS13"/> specifies that HKDF-Expand-Label uses
a label prefix of "tls13 ". For DTLS 1.3, that label <bcp14>SHALL</bcp14> be
"dtls13".  This ensures key separation between DTLS 1.3 and
TLS 1.3. Note that there is no trailing space; this is necessary
in order to keep the overall label size inside of one hash
iteration because "DTLS" is one letter longer than "TLS".</t>
      </section>
      <section anchor="alert-messages" numbered="true" toc="include" removeInRFC="false" pn="section-5.10">
        <name slugifiedName="name-alert-messages">Alert Messages</name>
        <t indent="0" pn="section-5.10-1">Note that alert messages are not retransmitted at all, even when they
occur in the context of a handshake.  However, a DTLS implementation
which would ordinarily issue an alert <bcp14>SHOULD</bcp14> generate a new alert
message if the offending record is received again (e.g., as a
retransmitted handshake message).  Implementations <bcp14>SHOULD</bcp14> detect when
a peer is persistently sending bad messages and terminate the local
connection state after such misbehavior is detected. Note that alerts
are not reliably transmitted; implementations <bcp14>SHOULD NOT</bcp14> depend on
receiving alerts in order to signal errors or connection closure.</t>
        <t indent="0" pn="section-5.10-2">
Any data received with an epoch/sequence number pair after
that of a valid received closure alert <bcp14>MUST</bcp14> be ignored. Note:
this is a change from TLS 1.3 which depends on the order of
receipt rather than the epoch and sequence number.</t>
      </section>
      <section anchor="establishing-new-associations-with-existing-parameters" numbered="true" toc="include" removeInRFC="false" pn="section-5.11">
        <name slugifiedName="name-establishing-new-associatio">Establishing New Associations with Existing Parameters</name>
        <t indent="0" pn="section-5.11-1">If a DTLS client-server pair is configured in such a way that
repeated connections happen on the same host/port quartet, then it is
possible that a client will silently abandon one connection and then
initiate another with the same parameters (e.g., after a reboot).
This will appear to the server as a new handshake with epoch=0.  In
cases where a server believes it has an existing association on a
given host/port quartet and it receives an epoch=0 ClientHello, it
<bcp14>SHOULD</bcp14> proceed with a new handshake but <bcp14>MUST NOT</bcp14> destroy the existing
association until the client has demonstrated reachability either by
completing a cookie exchange or by completing a complete handshake
including delivering a verifiable Finished message.  After a correct
Finished message is received, the server <bcp14>MUST</bcp14> abandon the previous
association to avoid confusion between two valid associations with
overlapping epochs.  The reachability requirement prevents
off-path/blind attackers from destroying associations merely by
sending forged ClientHellos.</t>
        <t indent="3" pn="section-5.11-2">Note: It is not always possible to distinguish which association
a given record is from. For instance, if the client performs
a handshake, abandons the connection, and then immediately starts
a new handshake, it may not be possible to tell which connection
a given protected record is for. In these cases, trial decryption
may be necessary, though implementations could use CIDs to avoid
the 5-tuple-based ambiguity.</t>
      </section>
    </section>
    <section anchor="example-of-handshake-with-timeout-and-retransmission" numbered="true" toc="include" removeInRFC="false" pn="section-6">
      <name slugifiedName="name-example-of-handshake-with-t">Example of Handshake with Timeout and Retransmission</name>
      <t indent="0" pn="section-6-1">The following is an example of a handshake with lost packets and
retransmissions. Note that the client sends an empty ACK message
because it can only acknowledge Record 2 sent by the server once it has
processed messages in Record 0 needed to establish epoch 2 keys, which
are needed to encrypt or decrypt messages found in Record 2.  <xref target="ack-msg" format="default" sectionFormat="of" derivedContent="Section 7"/>
provides the necessary background details for this interaction.
Note: For simplicity, we are not resetting record numbers in this
diagram, so "Record 1" is really "Epoch 2, Record 0", etc.
</t>
      <figure anchor="dtls-msg-loss" align="left" suppress-title="false" pn="figure-12">
        <name slugifiedName="name-example-dtls-exchange-illus">Example DTLS Exchange Illustrating Message Loss</name>
        <artwork name="" type="" align="left" alt="" pn="section-6-2.1">
Client                                                Server
------                                                ------

 Record 0                  --------&gt;
 ClientHello
 (message_seq=0)

                             X&lt;-----                 Record 0
                             (lost)               ServerHello
                                              (message_seq=0)
                                                     Record 1
                                          EncryptedExtensions
                                              (message_seq=1)
                                                  Certificate
                                              (message_seq=2)


                           &lt;--------                 Record 2
                                            CertificateVerify
                                              (message_seq=3)
                                                     Finished
                                              (message_seq=4)

 Record 1                  --------&gt;
 ACK []


                           &lt;--------                 Record 3
                                                  ServerHello
                                              (message_seq=0)
                                          EncryptedExtensions
                                              (message_seq=1)
                                                  Certificate
                                              (message_seq=2)

                           &lt;--------                 Record 4
                                            CertificateVerify
                                              (message_seq=3)
                                                     Finished
                                              (message_seq=4)


 Record 2                  --------&gt;
 Certificate
 (message_seq=1)
 CertificateVerify
 (message_seq=2)
 Finished
 (message_seq=3)

                           &lt;--------               Record 5
                                                    ACK [2]
</artwork>
      </figure>
      <section anchor="dtls-epoch" numbered="true" toc="include" removeInRFC="false" pn="section-6.1">
        <name slugifiedName="name-epoch-values-and-rekeying">Epoch Values and Rekeying</name>
        <t indent="0" pn="section-6.1-1">A recipient of a DTLS message needs to select the correct keying material
in order to process an incoming message. With the possibility of message
 loss and reordering, an identifier is needed to determine which cipher state
has been used to protect the record payload. The epoch value fulfills this
role in DTLS. In addition to the TLS 1.3-defined key derivation steps (see
<xref target="RFC8446" sectionFormat="of" section="7" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8446#section-7" derivedContent="TLS13"/>), a sender may want to rekey at any time during
the lifetime of the connection. It therefore needs to indicate that it is
updating its sending cryptographic keys.</t>
        <t indent="0" pn="section-6.1-2">This version of DTLS assigns dedicated epoch values to messages in the
protocol exchange to allow identification of the correct cipher state:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6.1-3">
          <li pn="section-6.1-3.1">Epoch value (0) is used with unencrypted messages. There are
three unencrypted messages in DTLS, namely ClientHello, ServerHello,
and HelloRetryRequest.</li>
          <li pn="section-6.1-3.2">Epoch value (1) is used for messages protected using keys derived
from client_early_traffic_secret. Note that this epoch is skipped if
the client does not offer early data.</li>
          <li pn="section-6.1-3.3">Epoch value (2) is used for messages protected using keys derived
from [sender]_handshake_traffic_secret. Messages transmitted during
the initial handshake, such as EncryptedExtensions,
CertificateRequest, Certificate, CertificateVerify, and Finished,
belong to this category. Note, however, that post-handshake messages are
protected under the appropriate application traffic key and are not included in this category.</li>
          <li pn="section-6.1-3.4">Epoch value (3) is used for payloads protected using keys derived
from the initial [sender]_application_traffic_secret_0. This may include
handshake messages, such as post-handshake messages (e.g., a
NewSessionTicket message).</li>
          <li pn="section-6.1-3.5">Epoch values (4 to 2^64-1) are used for payloads protected using keys from
the [sender]_application_traffic_secret_N (N&gt;0).</li>
        </ul>
        <t indent="0" pn="section-6.1-4">Using these reserved epoch values, a receiver knows what cipher state
has been used to encrypt and integrity protect a
message. Implementations that receive a record with an epoch value
for which no corresponding cipher state can be determined <bcp14>SHOULD</bcp14>
handle it as a record which fails deprotection.</t>
        <t indent="0" pn="section-6.1-5">Note that epoch values do not wrap. If a DTLS implementation would
need to wrap the epoch value, it <bcp14>MUST</bcp14> terminate the connection.</t>
        <t indent="0" pn="section-6.1-6">The traffic key calculation is described in <xref target="RFC8446" sectionFormat="of" section="7.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8446#section-7.3" derivedContent="TLS13"/>.</t>
        <t indent="0" pn="section-6.1-7"><xref target="dtls-msg-epoch" format="default" sectionFormat="of" derivedContent="Figure 13"/> illustrates the epoch values in an example DTLS handshake.</t>
        <figure anchor="dtls-msg-epoch" align="left" suppress-title="false" pn="figure-13">
          <name slugifiedName="name-example-dtls-exchange-with-">Example DTLS Exchange with Epoch Information</name>
          <artwork name="" type="" align="left" alt="" pn="section-6.1-8.1">
Client                                             Server
------                                             ------

 Record 0
 ClientHello
 (epoch=0)
                            --------&gt;
                                                     Record 0
                            &lt;--------       HelloRetryRequest
                                                    (epoch=0)
 Record 1
 ClientHello                --------&gt;
 (epoch=0)
                                                     Record 1
                            &lt;--------             ServerHello
                                                    (epoch=0)
                                        {EncryptedExtensions}
                                                    (epoch=2)
                                                {Certificate}
                                                    (epoch=2)
                                          {CertificateVerify}
                                                    (epoch=2)
                                                   {Finished}
                                                    (epoch=2)
 Record 2
 {Certificate}              --------&gt;
 (epoch=2)
 {CertificateVerify}
 (epoch=2)
 {Finished}
 (epoch=2)
                                                     Record 2
                            &lt;--------                   [ACK]
                                                    (epoch=3)
 Record 3
 [Application Data]         --------&gt;
 (epoch=3)
                                                     Record 3
                            &lt;--------      [Application Data]
                                                    (epoch=3)

                         Some time later ...
                 (Post-Handshake Message Exchange)
                                                     Record 4
                            &lt;--------      [NewSessionTicket]
                                                    (epoch=3)
 Record 4
 [ACK]                      --------&gt;
 (epoch=3)

                         Some time later ...
                           (Rekeying)
                                                     Record 5
                            &lt;--------      [Application Data]
                                                    (epoch=4)
 Record 5
 [Application Data]         --------&gt;
 (epoch=4)
</artwork>
        </figure>
      </section>
    </section>
    <section anchor="ack-msg" numbered="true" toc="include" removeInRFC="false" pn="section-7">
      <name slugifiedName="name-ack-message">ACK Message</name>
      <t indent="0" pn="section-7-1">The ACK message is used by an endpoint to indicate which handshake records
it has received and processed from the other side. ACK is not
a handshake message but is rather a separate content type,
with code point 26. This avoids having ACK being added
to the handshake transcript. Note that ACKs can still be
sent in the same UDP datagram as handshake records.</t>
      <sourcecode name="" type="tls-presentation" markers="false" pn="section-7-2">
    struct {
        RecordNumber record_numbers&lt;0..2^16-1&gt;;
    } ACK;
</sourcecode>
      <dl newline="false" spacing="normal" indent="3" pn="section-7-3">
        <dt pn="section-7-3.1">record_numbers:</dt>
        <dd pn="section-7-3.2">
  A list of the records containing handshake messages in the current
flight which the endpoint has received and either processed or buffered,
in numerically increasing
order.</dd>
      </dl>
      <t indent="0" pn="section-7-4">Implementations <bcp14>MUST NOT</bcp14> acknowledge records containing
handshake messages or fragments which have not been
processed or buffered. Otherwise, deadlock can ensue.
As an example, implementations <bcp14>MUST NOT</bcp14> send ACKs for
handshake messages which they discard because they are
not the next expected message.</t>
      <t indent="0" pn="section-7-5">During the handshake, ACKs only cover the current outstanding flight (this is
possible because DTLS is generally a lock-step protocol). In particular,
receiving a message from a handshake flight implicitly acknowledges all
messages from the previous flight(s).  Accordingly, an ACK
from the server would not cover both the ClientHello and the client's Certificate message, because the ClientHello and client Certificate are in different
flights. Implementations can accomplish this by clearing their ACK
list upon receiving the start of the next flight.</t>
      <t indent="0" pn="section-7-6">For post-handshake messages, ACKs <bcp14>SHOULD</bcp14> be sent once for each received
and processed handshake record (potentially subject to some delay) and <bcp14>MAY</bcp14>
cover more than one flight. This includes records containing messages which are
discarded because a previous copy has been received.</t>
      <t indent="0" pn="section-7-7">During the handshake, ACK records <bcp14>MUST</bcp14> be sent with an epoch which is
equal to or higher than the record which is being acknowledged.
Note that some care is required when processing flights spanning
multiple epochs. For instance, if the client receives only the ServerHello
and Certificate and wishes to ACK them in a single record,
it must do so in epoch 2, as it is required to use an epoch
greater than or equal to 2 and cannot yet send with any greater
epoch. Implementations <bcp14>SHOULD</bcp14> simply use the highest
current sending epoch, which will generally be the highest available.
After the handshake, implementations <bcp14>MUST</bcp14> use the highest available
sending epoch.</t>
      <section anchor="sending-acks" numbered="true" toc="include" removeInRFC="false" pn="section-7.1">
        <name slugifiedName="name-sending-acks">Sending ACKs</name>
        <t indent="0" pn="section-7.1-1">When an implementation detects a disruption in the receipt of the
current incoming flight, it <bcp14>SHOULD</bcp14> generate an ACK that covers the
messages from that flight which it has received and processed so far.
Implementations have some discretion about which events to treat
as signs of disruption, but it is <bcp14>RECOMMENDED</bcp14> that they generate
ACKs under two circumstances:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-7.1-2">
          <li pn="section-7.1-2.1">When they receive a message or fragment which is out of order,
either because it is not the next expected message or because
it is not the next piece of the current message.</li>
          <li pn="section-7.1-2.2">When they have received part of a flight and do not immediately
receive the rest of the flight (which may be in the same UDP
datagram). "Immediately" is hard to define. One approach is to
set a timer for 1/4 the current retransmit timer value when
the first record in the flight is received and then send an
ACK when that timer expires. Note: The 1/4 value here is somewhat
arbitrary. Given that the round trip estimates in the DTLS
handshake are generally very rough (or the default), any
value will be an approximation, and there is an inherent
compromise due to competition between retransmission due to over-aggressive ACKing
and over-aggressive timeout-based retransmission.
As a comparison point,
QUIC's loss-based recovery algorithms
(<xref target="RFC9002" sectionFormat="comma" section="6.1.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc9002#section-6.1.2" derivedContent="RFC9002"/>)
work out to a delay of about 1/3 of the retransmit timer.</li>
        </ul>
        <t indent="0" pn="section-7.1-3">In general, flights <bcp14>MUST</bcp14> be ACKed unless they are implicitly
acknowledged. In the present specification, the following flights are implicitly acknowledged
by the receipt of the next flight, which generally immediately follows the flight:</t>
        <ol spacing="normal" type="1" indent="adaptive" start="1" pn="section-7.1-4"><li pn="section-7.1-4.1" derivedCounter="1.">Handshake flights other than the client's final flight of the
main handshake.</li>
          <li pn="section-7.1-4.2" derivedCounter="2.">The server's post-handshake CertificateRequest.</li>
        </ol>
        <t indent="0" pn="section-7.1-5">ACKs <bcp14>SHOULD NOT</bcp14> be sent for these flights unless
        the responding flight cannot be generated immediately.
        All other flights <bcp14>MUST</bcp14> be ACKed.
In this case,
implementations <bcp14>MAY</bcp14> send explicit ACKs for the complete received
flight even though it will eventually also be implicitly acknowledged
through the responding flight. A notable example for this is
the case of client authentication in constrained
environments, where generating the CertificateVerify message can
take considerable time on the client.
Implementations <bcp14>MAY</bcp14> acknowledge the records corresponding to each transmission of
each flight or simply acknowledge the most recent one. In general,
implementations <bcp14>SHOULD</bcp14> ACK as many received packets as can fit
into the ACK record, as this provides the most complete information
and thus reduces the chance of spurious retransmission; if space
is limited, implementations <bcp14>SHOULD</bcp14> favor including records which
have not yet been acknowledged.</t>
        <t indent="3" pn="section-7.1-6">Note: While some post-handshake messages follow a request/response
pattern, this does not necessarily imply receipt.
For example, a KeyUpdate sent in response to a KeyUpdate with
request_update set to "update_requested" does not implicitly
acknowledge the earlier KeyUpdate message because the two KeyUpdate
messages might have crossed in flight.</t>
        <t indent="0" pn="section-7.1-7">ACKs <bcp14>MUST NOT</bcp14> be sent for records of any content type
other than handshake or for records which cannot be deprotected.
</t>
        <t indent="0" pn="section-7.1-8">Note that in some cases it may be necessary to send an ACK which
does not contain any record numbers. For instance, a client
might receive an EncryptedExtensions message prior to receiving
a ServerHello. Because it cannot decrypt the EncryptedExtensions,
it cannot safely acknowledge it (as it might be damaged). If the client
does not send an ACK, the server will eventually retransmit
its first flight, but this might take far longer than the
actual round trip time between client and server. Having
the client send an empty ACK shortcuts this process.</t>
      </section>
      <section anchor="receiving-acks" numbered="true" toc="include" removeInRFC="false" pn="section-7.2">
        <name slugifiedName="name-receiving-acks">Receiving ACKs</name>
        <t indent="0" pn="section-7.2-1">When an implementation receives an ACK, it <bcp14>SHOULD</bcp14> record that the
messages or message fragments sent in the records being
ACKed were received and omit them from any future
retransmissions. Upon receipt of an ACK that leaves it with
only some messages from a flight having been acknowledged,
an implementation <bcp14>SHOULD</bcp14> retransmit the unacknowledged
messages or fragments. Note that this requires implementations to
track which messages appear in which records. Once all the messages in a flight have been
acknowledged, the implementation <bcp14>MUST</bcp14> cancel all retransmissions
of that flight.
Implementations <bcp14>MUST</bcp14> treat a record
as having been acknowledged if it appears in any ACK; this
prevents spurious retransmission in cases where a flight is
very large and the receiver is forced to elide acknowledgements
for records which have already been ACKed.
As noted above, the receipt of any record responding
to a given flight <bcp14>MUST</bcp14> be taken as an implicit acknowledgement for the entire
flight to which it is responding.</t>
      </section>
      <section anchor="design-rationale" numbered="true" toc="include" removeInRFC="false" pn="section-7.3">
        <name slugifiedName="name-design-rationale">Design Rationale</name>
        <t indent="0" pn="section-7.3-1">ACK messages are used in two circumstances, namely:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-7.3-2">
          <li pn="section-7.3-2.1">On sign of disruption, or lack of progress; and</li>
          <li pn="section-7.3-2.2">To indicate complete receipt of the last flight in a handshake.</li>
        </ul>
        <t indent="0" pn="section-7.3-3">In the first case, the use of the ACK message is optional, because
 the peer will retransmit in any case and therefore the ACK just
 allows for selective or early retransmission, as opposed to the
 timeout-based whole flight retransmission in previous
 versions of DTLS.
 When DTLS 1.3 is used in deployments
with lossy networks, such as low-power, long-range radio networks as well as
low-power mesh networks, the use of ACKs is recommended.</t>
        <t indent="0" pn="section-7.3-4">The use of the ACK for the second case is mandatory for the proper functioning of the
protocol. For instance, the ACK message sent by the client in <xref target="dtls-msg-epoch" format="default" sectionFormat="of" derivedContent="Figure 13"/>
acknowledges receipt and processing of Record 4 (containing the NewSessionTicket
message), and if it is not sent, the server will continue retransmission
of the NewSessionTicket indefinitely until its maximum retransmission count is reached.</t>
      </section>
    </section>
    <section anchor="key-updates" numbered="true" toc="include" removeInRFC="false" pn="section-8">
      <name slugifiedName="name-key-updates">Key Updates</name>
      <t indent="0" pn="section-8-1">As with TLS 1.3, DTLS 1.3 implementations send a KeyUpdate message to
indicate that they are updating their sending keys.  As with other
handshake messages with no built-in response, KeyUpdates <bcp14>MUST</bcp14> be
acknowledged.  In order to facilitate epoch reconstruction
(<xref target="reconstructing" format="default" sectionFormat="of" derivedContent="Section 4.2.2"/>), implementations <bcp14>MUST NOT</bcp14> send records with the new keys or
send a new KeyUpdate until the previous KeyUpdate has been
acknowledged (this avoids having too many epochs in active use).</t>
      <t indent="0" pn="section-8-2">Due to loss and/or reordering, DTLS 1.3 implementations
may receive a record with an older epoch than the
current one (the requirements above preclude receiving
a newer record). They <bcp14>SHOULD</bcp14> attempt to process those records
with that epoch (see <xref target="reconstructing" format="default" sectionFormat="of" derivedContent="Section 4.2.2"/> for information
on determining the correct epoch) but <bcp14>MAY</bcp14> opt to discard
such out-of-epoch records.</t>
      <t indent="0" pn="section-8-3">Due to the possibility of an ACK message for a KeyUpdate being lost and thereby
preventing the sender of the KeyUpdate from updating its keying material,
receivers <bcp14>MUST</bcp14> retain the pre-update keying material until receipt and successful
decryption of a message using the new keys.</t>
      <t indent="0" pn="section-8-4"><xref target="dtls-key-update" format="default" sectionFormat="of" derivedContent="Figure 14"/> shows an example exchange illustrating that successful
ACK processing updates the keys of the KeyUpdate message sender, which is
reflected in the change of epoch values.</t>
      <figure anchor="dtls-key-update" align="left" suppress-title="false" pn="figure-14">
        <name slugifiedName="name-example-dtls-key-update">Example DTLS Key Update</name>
        <artwork name="" type="" align="left" alt="" pn="section-8-5.1">
Client                                             Server

      /-------------------------------------------\
     |                                             |
     |             Initial Handshake               |
      \-------------------------------------------/


 [Application Data]         --------&gt;
 (epoch=3)

                            &lt;--------      [Application Data]
                                                    (epoch=3)

      /-------------------------------------------\
     |                                             |
     |              Some time later ...            |
      \-------------------------------------------/


 [Application Data]         --------&gt;
 (epoch=3)


 [KeyUpdate]
 (+ update_requested        --------&gt;
 (epoch 3)


                            &lt;--------      [Application Data]
                                                    (epoch=3)


                                                        [ACK]
                            &lt;--------               (epoch=3)


 [Application Data]
 (epoch=4)                  --------&gt;



                            &lt;--------             [KeyUpdate]
                                                    (epoch=3)


 [ACK]                      --------&gt;
 (epoch=4)


                            &lt;--------      [Application Data]
                                                    (epoch=4)
</artwork>
      </figure>
      <t indent="0" pn="section-8-6">
With a 128-bit key as in AES-128, rekeying 2^64 times has a high
probability of key reuse within a given connection. Note that even if
the key repeats, the IV is also independently generated. In order to
provide an extra margin of security, sending implementations <bcp14>MUST NOT</bcp14>
allow the epoch to exceed 2^48-1. In order to allow this value to
be changed later, receiving implementations <bcp14>MUST NOT</bcp14>
enforce this rule. If a sending implementation receives a KeyUpdate
with request_update set to "update_requested", it <bcp14>MUST NOT</bcp14> send
its own KeyUpdate if that would cause it to exceed these limits
and <bcp14>SHOULD</bcp14> instead ignore the "update_requested" flag.
Note: this overrides the requirement in TLS 1.3 to always
send a KeyUpdate in response to "update_requested".
      </t>
    </section>
    <section anchor="connection-id-updates" numbered="true" toc="include" removeInRFC="false" pn="section-9">
      <name slugifiedName="name-connection-id-updates">Connection ID Updates</name>
      <t indent="0" pn="section-9-1">If the client and server have negotiated the "connection_id"
extension <xref target="RFC9146" format="default" sectionFormat="of" derivedContent="RFC9146"/>, either side
can send a new CID that it wishes the other side to use
in a NewConnectionId message.</t>
      <sourcecode name="" type="tls-presentation" markers="false" pn="section-9-2">
    enum {
        cid_immediate(0), cid_spare(1), (255)
    } ConnectionIdUsage;

    opaque ConnectionId&lt;0..2^8-1&gt;;

    struct {
        ConnectionId cids&lt;0..2^16-1&gt;;
        ConnectionIdUsage usage;
    } NewConnectionId;
</sourcecode>
      <dl newline="false" spacing="normal" indent="3" pn="section-9-3">
        <dt pn="section-9-3.1">cids:</dt>
        <dd pn="section-9-3.2">
  Indicates the set of CIDs that the sender wishes the peer to use.</dd>
        <dt pn="section-9-3.3">usage:</dt>
        <dd pn="section-9-3.4">
  Indicates whether the new CIDs should be used immediately or are
spare.  If usage is set to "cid_immediate", then one of the new CIDs
<bcp14>MUST</bcp14> be used immediately for all future records. If it is set to
"cid_spare", then either an existing or new CID <bcp14>MAY</bcp14> be used.</dd>
      </dl>
      <t indent="0" pn="section-9-4">Endpoints <bcp14>SHOULD</bcp14> use receiver-provided CIDs in the order they were provided.
Implementations which receive more spare CIDs than they wish to maintain
<bcp14>MAY</bcp14> simply discard any extra CIDs.
Endpoints <bcp14>MUST NOT</bcp14> have more than one NewConnectionId message outstanding.</t>
      <t indent="0" pn="section-9-5">Implementations which either did not negotiate the "connection_id" extension
or which have negotiated receiving an empty CID <bcp14>MUST NOT</bcp14>
send NewConnectionId. Implementations <bcp14>MUST NOT</bcp14> send RequestConnectionId
when sending an empty Connection ID. Implementations which detect a violation
of these rules <bcp14>MUST</bcp14> terminate the connection with an "unexpected_message"
alert.</t>
      <t indent="0" pn="section-9-6">Implementations <bcp14>SHOULD</bcp14> use a new CID whenever sending on a new path
and <bcp14>SHOULD</bcp14> request new CIDs for this purpose if path changes are anticipated.</t>
      <sourcecode name="" type="tls-presentation" markers="false" pn="section-9-7">
    struct {
      uint8 num_cids;
    } RequestConnectionId;
</sourcecode>
      <dl newline="false" spacing="normal" indent="3" pn="section-9-8">
        <dt pn="section-9-8.1">num_cids:</dt>
        <dd pn="section-9-8.2">
  The number of CIDs desired.</dd>
      </dl>
      <t indent="0" pn="section-9-9">Endpoints <bcp14>SHOULD</bcp14> respond to RequestConnectionId by sending a
NewConnectionId with usage "cid_spare" containing num_cids CIDs as soon as
possible.  Endpoints <bcp14>MUST NOT</bcp14> send a RequestConnectionId message
when an existing request is still unfulfilled; this implies that
endpoints need to request new CIDs well in advance.  An endpoint <bcp14>MAY</bcp14>
handle requests which it considers excessive by responding with
a NewConnectionId message containing fewer than num_cids CIDs,
including no CIDs at all. Endpoints <bcp14>MAY</bcp14> handle an excessive number
of RequestConnectionId messages by terminating the connection
using a "too_many_cids_requested" (alert number 52) alert.</t>
      <t indent="0" pn="section-9-10">Endpoints <bcp14>MUST NOT</bcp14> send either of these messages if they did not negotiate a
CID. If an implementation receives these messages when CIDs
were not negotiated, it <bcp14>MUST</bcp14> abort the connection with an "unexpected_message"
alert.</t>
      <section anchor="connection-id-example" numbered="true" toc="include" removeInRFC="false" pn="section-9.1">
        <name slugifiedName="name-connection-id-example">Connection ID Example</name>
        <t indent="0" pn="section-9.1-1">Below is an example exchange for DTLS 1.3 using a single
CID in each direction.</t>
        <t indent="3" pn="section-9.1-2">Note: The "connection_id" extension, which is used in ClientHello and ServerHello messages, is defined in
<xref target="RFC9146" format="default" sectionFormat="of" derivedContent="RFC9146"/>.</t>
        <figure anchor="dtls-example" align="left" suppress-title="false" pn="figure-15">
          <name slugifiedName="name-example-dtls-13-exchange-wi">Example DTLS 1.3 Exchange with CIDs</name>
          <artwork name="" type="" align="left" alt="" pn="section-9.1-3.1">
Client                                             Server
------                                             ------

ClientHello
(connection_id=5)
                            --------&gt;


                            &lt;--------       HelloRetryRequest
                                                     (cookie)

ClientHello                 --------&gt;
(connection_id=5)
  + cookie

                            &lt;--------             ServerHello
                                          (connection_id=100)
                                          EncryptedExtensions
                                                      (cid=5)
                                                  Certificate
                                                      (cid=5)
                                            CertificateVerify
                                                      (cid=5)
                                                     Finished
                                                      (cid=5)

Certificate                --------&gt;
(cid=100)
CertificateVerify
(cid=100)
Finished
(cid=100)
                           &lt;--------                      ACK
                                                      (cid=5)

Application Data           ========&gt;
(cid=100)
                           &lt;========         Application Data
                                                      (cid=5)
</artwork>
        </figure>
        <t indent="0" pn="section-9.1-4">If no CID is negotiated, then the receiver <bcp14>MUST</bcp14> reject any
records it receives that contain a CID.</t>
      </section>
    </section>
    <section anchor="application-data-protocol" numbered="true" toc="include" removeInRFC="false" pn="section-10">
      <name slugifiedName="name-application-data-protocol">Application Data Protocol</name>
      <t indent="0" pn="section-10-1">Application data messages are carried by the record layer and are split
into records
and encrypted based on the current connection state. The messages
are treated as transparent data to the record layer.</t>
    </section>
    <section anchor="security-considerations" numbered="true" toc="include" removeInRFC="false" pn="section-11">
      <name slugifiedName="name-security-considerations">Security Considerations</name>
      <t indent="0" pn="section-11-1">Security issues are discussed primarily in <xref target="RFC8446" format="default" sectionFormat="of" derivedContent="TLS13"/>.</t>
      <t indent="0" pn="section-11-2">The primary additional security consideration raised by DTLS is that
of denial of service by excessive resource consumption.  DTLS includes a cookie exchange designed to
protect against denial of service.  However, implementations that do
not use this cookie exchange are still vulnerable to DoS.  In
particular, DTLS servers that do not use the cookie exchange may be
used as attack amplifiers even if they themselves are not
experiencing DoS.  Therefore, DTLS servers <bcp14>SHOULD</bcp14> use the cookie
exchange unless there is good reason to believe that amplification is
not a threat in their environment.  Clients <bcp14>MUST</bcp14> be prepared to do a
cookie exchange with every handshake.</t>
      <t indent="0" pn="section-11-3">Some key properties required of the cookie for the cookie-exchange mechanism
to be functional are described in <xref target="RFC2522" sectionFormat="of" section="3.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc2522#section-3.3" derivedContent="RFC2522"/>:</t>
      <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-11-4">
        <li pn="section-11-4.1">The cookie <bcp14>MUST</bcp14> depend on the client's address.</li>
        <li pn="section-11-4.2">It <bcp14>MUST NOT</bcp14> be possible for anyone other than the issuing entity to generate
cookies that are accepted as valid by that entity.  This typically entails
an integrity check based on a secret key.</li>
        <li pn="section-11-4.3">Cookie generation and verification are triggered by unauthenticated parties,
and as such their resource consumption needs to be restrained in order to
avoid having the cookie-exchange mechanism itself serve as a DoS vector.</li>
      </ul>
      <t indent="0" pn="section-11-5">Although the cookie must allow the server to produce the right handshake
transcript, it <bcp14>SHOULD</bcp14> be constructed so that knowledge of the cookie
is insufficient to reproduce the ClientHello contents. Otherwise,
this may create problems with future extensions such as Encrypted Client Hello <xref target="TLS-ECH" format="default" sectionFormat="of" derivedContent="TLS-ECH"/>.</t>
      <t indent="0" pn="section-11-6">When cookies are generated using a keyed authentication mechanism,
it should be possible to rotate the associated
secret key, so that temporary compromise of the key does not permanently
compromise the integrity of the cookie-exchange mechanism.  Though this secret
is not as high-value as, e.g., a session-ticket-encryption key, rotating the
cookie-generation key on a similar timescale would ensure that the
key rotation functionality is exercised regularly and thus in working order.</t>
      <t indent="0" pn="section-11-7">The cookie exchange provides address validation during the initial handshake.
DTLS with Connection IDs allows for endpoint addresses to change during the
association; any such updated addresses are not covered by the cookie exchange
during the handshake.
DTLS implementations <bcp14>MUST NOT</bcp14> update the address they send to in response
to packets from a different address unless they first perform some
reachability test; no such test is defined in this specification
and a future specification would need to specify a complete procedure for
how and when to update addresses. Even
with such a test, an active on-path adversary can also black-hole traffic or
create a reflection attack against third parties because a DTLS peer
has no means to distinguish a genuine address update event (for
example, due to a NAT rebinding) from one that is malicious. This
attack is of concern when there is a large asymmetry of
request/response message sizes.</t>
      <t indent="0" pn="section-11-8">With the exception of order protection and non-replayability, the security
guarantees for DTLS 1.3 are the same as TLS 1.3. While TLS always provides
order protection and non-replayability, DTLS does not provide order protection
and may not provide replay protection.</t>
      <t indent="0" pn="section-11-9">Unlike TLS implementations, DTLS implementations <bcp14>SHOULD NOT</bcp14> respond
to invalid records by terminating the connection.</t>
      <t indent="0" pn="section-11-10">TLS 1.3 requires replay protection for 0-RTT data (or rather, for connections
that use 0-RTT data; see <xref target="RFC8446" sectionFormat="of" section="8" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8446#section-8" derivedContent="TLS13"/>).  DTLS provides an optional
per-record replay-protection mechanism, since datagram protocols are
inherently subject to message reordering and replay.  These two
replay-protection mechanisms are orthogonal, and neither mechanism meets the
      requirements for the other.</t>
      <t indent="0" pn="section-11-11">
        DTLS 1.3's handshake transcript does not include the new DTLS fields,
which makes it have the same format as TLS 1.3. However, the DTLS 1.3 and
TLS 1.3 transcripts are disjoint because they use different version
numbers. Additionally, the DTLS 1.3 key schedule uses a different label
and so will produce different keys for the same transcript.
      </t>
      <t indent="0" pn="section-11-12">The security and privacy properties of the CID for DTLS 1.3 build
on top of what is described for DTLS 1.2 in <xref target="RFC9146" format="default" sectionFormat="of" derivedContent="RFC9146"/>. There are,
however, several differences:</t>
      <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-11-13">
        <li pn="section-11-13.1">In both versions of DTLS, extension negotiation is used to agree on the use of the CID
feature and the CID values. In both versions, the CID is carried in the DTLS record header (if negotiated).
However, the way the CID is included in the record header differs between the two versions.</li>
        <li pn="section-11-13.2">The use of the post-handshake message allows the client and the server
to update their CIDs, and those values are exchanged with confidentiality
protection.</li>
        <li pn="section-11-13.3">The ability to use multiple CIDs allows for improved privacy properties
in multihomed scenarios. When only a single CID is in use on multiple
paths from such a host, an adversary can correlate the communication
interaction across paths, which adds further privacy concerns. In order
to prevent this, implementations <bcp14>SHOULD</bcp14> attempt to use fresh CIDs
whenever they change local addresses or ports (though this is not always
possible to detect). The RequestConnectionId message can be used by a peer
to ask for new CIDs to ensure that a pool of suitable CIDs is available.</li>
        <li pn="section-11-13.4">The mechanism for encrypting sequence numbers (<xref target="rne" format="default" sectionFormat="of" derivedContent="Section 4.2.3"/>) prevents
trivial tracking by on-path adversaries that attempt to correlate the
pattern of sequence numbers received on different paths; such tracking
could occur even when different CIDs are used on each path, in the
absence of sequence number encryption. Switching CIDs based on certain
events, or even regularly, helps against tracking by on-path
adversaries.  Note that sequence number encryption is used for all
encrypted DTLS 1.3 records irrespective of whether a CID is used or
not.  Unlike the sequence number, the epoch is not encrypted because it acts as a key identifier, which
may improve correlation of packets from a single connection across
different network paths.</li>
        <li pn="section-11-13.5">DTLS 1.3 encrypts handshake messages much earlier than in previous
DTLS versions. Therefore, less information identifying the DTLS client, such as
the client certificate, is available to an on-path adversary.</li>
      </ul>
    </section>
    <section anchor="changes-since-dtls-12" numbered="true" toc="include" removeInRFC="false" pn="section-12">
      <name slugifiedName="name-changes-since-dtls-12">Changes since DTLS 1.2</name>
      <t indent="0" pn="section-12-1">Since TLS 1.3 introduces a large number of changes with respect to TLS 1.2, the list
of changes from DTLS 1.2 to DTLS 1.3 is equally large. For this reason,
this section focuses on the most important changes only.</t>
      <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-12-2">
        <li pn="section-12-2.1">New handshake pattern, which leads to a shorter message exchange.</li>
        <li pn="section-12-2.2">Only AEAD ciphers are supported. Additional data calculation has been simplified.</li>
        <li pn="section-12-2.3">Removed support for weaker and older cryptographic algorithms.</li>
        <li pn="section-12-2.4">HelloRetryRequest of TLS 1.3 used instead of HelloVerifyRequest.</li>
        <li pn="section-12-2.5">More flexible cipher suite negotiation.</li>
        <li pn="section-12-2.6">New session resumption mechanism.</li>
        <li pn="section-12-2.7">PSK authentication redefined.</li>
        <li pn="section-12-2.8">New key derivation hierarchy utilizing a new key derivation construct.</li>
        <li pn="section-12-2.9">Improved version negotiation.</li>
        <li pn="section-12-2.10">Optimized record layer encoding and thereby its size.</li>
        <li pn="section-12-2.11">Added CID functionality.</li>
        <li pn="section-12-2.12">Sequence numbers are encrypted.</li>
      </ul>
    </section>
    <section anchor="updates-affecting-dtls-12" numbered="true" toc="include" removeInRFC="false" pn="section-13">
      <name slugifiedName="name-updates-affecting-dtls-12">Updates Affecting DTLS 1.2</name>
      <t indent="0" pn="section-13-1">This document defines several changes that optionally affect
implementations of DTLS 1.2, including those which do not also support
DTLS 1.3.</t>
      <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-13-2">
        <li pn="section-13-2.1">A version downgrade protection mechanism as described
in <xref target="RFC8446" sectionFormat="comma" section="4.1.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8446#section-4.1.3" derivedContent="TLS13"/> and applying to DTLS as
described in <xref target="clienthello-message" format="default" sectionFormat="of" derivedContent="Section 5.3"/>.</li>
        <li pn="section-13-2.2">The updates described in <xref target="RFC8446" sectionFormat="comma" section="1.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8446#section-1.3" derivedContent="TLS13"/>.</li>
        <li pn="section-13-2.3">The new compliance requirements described in <xref target="RFC8446" sectionFormat="comma" section="9.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8446#section-9.3" derivedContent="TLS13"/>.</li>
      </ul>
    </section>
    <section anchor="iana-considerations" numbered="true" toc="include" removeInRFC="false" pn="section-14">
      <name slugifiedName="name-iana-considerations">IANA Considerations</name>
      <t indent="0" pn="section-14-1">IANA has allocated the content type value 26 in the "TLS ContentType"
registry for the ACK message, defined in <xref target="ack-msg" format="default" sectionFormat="of" derivedContent="Section 7"/>.
The value for the "DTLS-OK" column is "Y".  IANA has reserved
the content type range 32-63 so that content types in this range are not
allocated.</t>
      <t indent="0" pn="section-14-2">IANA has allocated value 52 for the "too_many_cids_requested" alert in
the "TLS Alerts" registry. The value for the "DTLS-OK" column is "Y".
</t>
      <t indent="0" pn="section-14-3">IANA has allocated two values in the "TLS HandshakeType"
registry, defined in <xref target="RFC8446" format="default" sectionFormat="of" derivedContent="TLS13"/>, for request_connection_id (9) and
new_connection_id (10), as defined in this document.  The value for the
"DTLS-OK" column is "Y".</t>
      <t indent="0" pn="section-14-4">IANA has added this RFC as a reference to the "TLS Cipher Suites" registry
along with the following Note:</t>
      <blockquote pn="section-14-5">
Any TLS cipher suite that is specified for use with DTLS <bcp14>MUST</bcp14>
define limits on the use of the associated AEAD function that
preserves margins for both confidentiality and integrity,
as specified in <xref target="aead-limits" format="default" sectionFormat="of" derivedContent="Section 4.5.3"/> of RFC 9147.
</blockquote>
    </section>
  </middle>
  <back>
    <displayreference target="RFC8446" to="TLS13"/>
    <displayreference target="RFC8439" to="CHACHA"/>
    <displayreference target="RFC8996" to="DEPRECATE"/>
    <displayreference target="I-D.ietf-uta-tls13-iot-profile" to="IOT-PROFILE"/>
    <references pn="section-15">
      <name slugifiedName="name-references">References</name>
      <references pn="section-15.1">
        <name slugifiedName="name-normative-references">Normative References</name>
        <reference anchor="RFC8439" target="https://www.rfc-editor.org/info/rfc8439" quoteTitle="true" derivedAnchor="CHACHA">
          <front>
            <title>ChaCha20 and Poly1305 for IETF Protocols</title>
            <author initials="Y." surname="Nir" fullname="Y. Nir">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="A." surname="Langley" fullname="A. Langley">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2018" month="June"/>
            <abstract>
              <t indent="0">This document defines the ChaCha20 stream cipher as well as the use of the Poly1305 authenticator, both as stand-alone algorithms and as a "combined mode", or Authenticated Encryption with Associated Data (AEAD) algorithm.</t>
              <t indent="0">RFC 7539, the predecessor of this document, was meant to serve as a stable reference and an implementation guide.  It was a product of the Crypto Forum Research Group (CFRG).  This document merges the errata filed against RFC 7539 and adds a little text to the Security Considerations section.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8439"/>
          <seriesInfo name="DOI" value="10.17487/RFC8439"/>
        </reference>
        <reference anchor="RFC0768" target="https://www.rfc-editor.org/info/rfc768" quoteTitle="true" derivedAnchor="RFC0768">
          <front>
            <title>User Datagram Protocol</title>
            <author initials="J." surname="Postel" fullname="J. Postel">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="1980" month="August"/>
          </front>
          <seriesInfo name="STD" value="6"/>
          <seriesInfo name="RFC" value="768"/>
          <seriesInfo name="DOI" value="10.17487/RFC0768"/>
        </reference>
        <reference anchor="RFC0793" target="https://www.rfc-editor.org/info/rfc793" quoteTitle="true" derivedAnchor="RFC0793">
          <front>
            <title>Transmission Control Protocol</title>
            <author initials="J." surname="Postel" fullname="J. Postel">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="1981" month="September"/>
          </front>
          <seriesInfo name="STD" value="7"/>
          <seriesInfo name="RFC" value="793"/>
          <seriesInfo name="DOI" value="10.17487/RFC0793"/>
        </reference>
        <reference anchor="RFC1191" target="https://www.rfc-editor.org/info/rfc1191" quoteTitle="true" derivedAnchor="RFC1191">
          <front>
            <title>Path MTU discovery</title>
            <author initials="J.C." surname="Mogul" fullname="J.C. Mogul">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S.E." surname="Deering" fullname="S.E. Deering">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="1990" month="November"/>
            <abstract>
              <t indent="0">This memo describes a technique for dynamically discovering the maximum transmission unit (MTU) of an arbitrary internet path.  It specifies a small change to the way routers generate one type of ICMP message.  For a path that passes through a router that has not been so changed, this technique might not discover the correct Path MTU, but it will always choose a Path MTU as accurate as, and in many cases more accurate than, the Path MTU that would be chosen by current practice.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="1191"/>
          <seriesInfo name="DOI" value="10.17487/RFC1191"/>
        </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="RFC4443" target="https://www.rfc-editor.org/info/rfc4443" quoteTitle="true" derivedAnchor="RFC4443">
          <front>
            <title>Internet Control Message Protocol (ICMPv6) for the Internet Protocol Version 6 (IPv6) Specification</title>
            <author initials="A." surname="Conta" fullname="A. Conta">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Deering" fullname="S. Deering">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="M." surname="Gupta" fullname="M. Gupta" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2006" month="March"/>
            <abstract>
              <t indent="0">This document describes the format of a set of control messages used in ICMPv6 (Internet Control Message Protocol).  ICMPv6 is the Internet Control Message Protocol for Internet Protocol version 6 (IPv6).  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="89"/>
          <seriesInfo name="RFC" value="4443"/>
          <seriesInfo name="DOI" value="10.17487/RFC4443"/>
        </reference>
        <reference anchor="RFC4821" target="https://www.rfc-editor.org/info/rfc4821" quoteTitle="true" derivedAnchor="RFC4821">
          <front>
            <title>Packetization Layer Path MTU Discovery</title>
            <author initials="M." surname="Mathis" fullname="M. Mathis">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Heffner" fullname="J. Heffner">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2007" month="March"/>
            <abstract>
              <t indent="0">This document describes a robust method for Path MTU Discovery (PMTUD) that relies on TCP or some other Packetization Layer to probe an Internet path with progressively larger packets.  This method is described as an extension to RFC 1191 and RFC 1981, which specify ICMP-based Path MTU Discovery for IP versions 4 and 6, respectively.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="4821"/>
          <seriesInfo name="DOI" value="10.17487/RFC4821"/>
        </reference>
        <reference anchor="RFC6298" target="https://www.rfc-editor.org/info/rfc6298" quoteTitle="true" derivedAnchor="RFC6298">
          <front>
            <title>Computing TCP's Retransmission Timer</title>
            <author initials="V." surname="Paxson" fullname="V. Paxson">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="M." surname="Allman" fullname="M. Allman">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Chu" fullname="J. Chu">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="M." surname="Sargent" fullname="M. Sargent">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2011" month="June"/>
            <abstract>
              <t indent="0">This document defines the standard algorithm that Transmission Control Protocol (TCP) senders are required to use to compute and manage their retransmission timer.  It expands on the discussion in Section 4.2.3.1 of RFC 1122 and upgrades the requirement of supporting the algorithm from a SHOULD to a MUST.  This document obsoletes RFC 2988.   [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6298"/>
          <seriesInfo name="DOI" value="10.17487/RFC6298"/>
        </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="RFC9146" target="https://www.rfc-editor.org/info/rfc9146" quoteTitle="true" derivedAnchor="RFC9146">
          <front>
            <title>Connection Identifier for DTLS 1.2</title>
            <author initials="E." surname="Rescorla" fullname="E. Rescorla" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="H." surname="Tschofenig" fullname="H. Tschofenig" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="T." surname="Fossati" fullname="T. Fossati">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="A." surname="Kraus" fullname="A. Kraus">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2022" month="March"/>
            <abstract>
              <t indent="0">This document specifies the Connection ID (CID) construct for the Datagram Transport Layer Security (DTLS) protocol version 1.2.</t>
              <t indent="0">A CID is an identifier carried in the record layer header that gives the recipient additional information for selecting the appropriate security association. In "classical" DTLS, selecting a security association of an incoming DTLS record is accomplished with the help of the 5-tuple. If the source IP address and/or source port changes during the lifetime of an ongoing DTLS session, then the receiver will be unable to locate the correct security context.</t>
              <t indent="0">The new ciphertext record format with the CID also provides content type encryption and record layer padding.</t>
              <t indent="0">This document updates RFC 6347.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9146"/>
          <seriesInfo name="DOI" value="10.17487/RFC9146"/>
        </reference>
        <reference anchor="RFC8446" target="https://www.rfc-editor.org/info/rfc8446" quoteTitle="true" derivedAnchor="TLS13">
          <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-15.2">
        <name slugifiedName="name-informative-references">Informative References</name>
        <reference anchor="AEAD-LIMITS" quoteTitle="true" target="https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-aead-limits-04" derivedAnchor="AEAD-LIMITS">
          <front>
            <title>Usage Limits on AEAD Algorithms</title>
            <author initials="F" surname="Günther" fullname="Felix Günther">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="M" surname="Thomson" fullname="Martin Thomson">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="C. A." surname="Wood" fullname="Christopher Wood">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2022" month="March" day="7"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-irtf-cfrg-aead-limits-04"/>
          <refcontent>Work in Progress</refcontent>
        </reference>
        <reference anchor="AEBounds" target="https://www.isg.rhul.ac.uk/~kp/TLS-AEbounds.pdf" quoteTitle="true" derivedAnchor="AEBounds">
          <front>
            <title>Limits on Authenticated Encryption Use in TLS</title>
            <author initials="A." surname="Luykx">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="K." surname="Paterson">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2017" month="August" day="28"/>
          </front>
        </reference>
        <reference anchor="CCM-ANALYSIS" quoteTitle="true" target="https://doi.org/10.1007/3-540-36492-7_7" derivedAnchor="CCM-ANALYSIS">
          <front>
            <title>On the Security of CTR + CBC-MAC</title>
            <author initials="J." surname="Jonsson" fullname="Jakob Jonsson">
              <organization showOnFrontPage="true"/>
            </author>
            <date month="February" year="2003"/>
          </front>
          <refcontent>Selected Areas in Cryptography pp. 76-93</refcontent>
          <seriesInfo name="DOI" value="10.1007/3-540-36492-7_7"/>
        </reference>
        <reference anchor="RFC8996" target="https://www.rfc-editor.org/info/rfc8996" quoteTitle="true" derivedAnchor="DEPRECATE">
          <front>
            <title>Deprecating TLS 1.0 and TLS 1.1</title>
            <author initials="K." surname="Moriarty" fullname="K. Moriarty">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Farrell" fullname="S. Farrell">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2021" month="March"/>
            <abstract>
              <t indent="0">This document formally deprecates Transport Layer Security (TLS) versions 1.0 (RFC 2246) and 1.1 (RFC 4346). Accordingly, those documents have been moved to Historic status. These versions lack support for current and recommended cryptographic algorithms and mechanisms, and various government and industry profiles of applications using TLS now mandate avoiding these old TLS versions. TLS version 1.2 became the recommended version for IETF protocols in 2008 (subsequently being obsoleted by TLS version 1.3 in 2018), providing sufficient time to transition away from older versions. Removing support for older versions from implementations reduces the attack surface, reduces opportunity for misconfiguration, and streamlines library and product maintenance. </t>
              <t indent="0">This document also deprecates Datagram TLS (DTLS) version 1.0 (RFC 4347) but not DTLS version 1.2, and there is no DTLS version 1.1.</t>
              <t indent="0">This document updates many RFCs that normatively refer to TLS version 1.0 or TLS version 1.1, as described herein. This document also updates the best practices for TLS usage in RFC 7525; hence, it is part of BCP 195.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="195"/>
          <seriesInfo name="RFC" value="8996"/>
          <seriesInfo name="DOI" value="10.17487/RFC8996"/>
        </reference>
        <reference anchor="I-D.ietf-uta-tls13-iot-profile" quoteTitle="true" target="https://datatracker.ietf.org/doc/html/draft-ietf-uta-tls13-iot-profile-04" derivedAnchor="IOT-PROFILE">
          <front>
            <title>TLS/DTLS 1.3 Profiles for the Internet of Things</title>
            <author fullname="Hannes Tschofenig">
              <organization showOnFrontPage="true">Arm Limited</organization>
            </author>
            <author fullname="Thomas Fossati">
              <organization showOnFrontPage="true">Arm Limited</organization>
            </author>
            <date month="March" day="7" year="2022"/>
            <abstract>
              <t indent="0">   This document is a companion to RFC 7925 and defines TLS/DTLS 1.3
   profiles for Internet of Things devices.  It also updates RFC 7925
   with regards to the X.509 certificate profile.

Discussion Venues

   This note is to be removed before publishing as an RFC.

   Source for this draft and an issue tracker can be found at
   https://github.com/thomas-fossati/draft-tls13-iot.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-uta-tls13-iot-profile-04"/>
          <format type="TXT" target="https://www.ietf.org/archive/id/draft-ietf-uta-tls13-iot-profile-04.txt"/>
          <refcontent>Work in Progress</refcontent>
        </reference>
        <reference anchor="RFC2522" target="https://www.rfc-editor.org/info/rfc2522" quoteTitle="true" derivedAnchor="RFC2522">
          <front>
            <title>Photuris: Session-Key Management Protocol</title>
            <author initials="P." surname="Karn" fullname="P. Karn">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="W." surname="Simpson" fullname="W. Simpson">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="1999" month="March"/>
            <abstract>
              <t indent="0">This document defines the basic protocol mechanisms. This document defines an Experimental Protocol for the Internet community.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="2522"/>
          <seriesInfo name="DOI" value="10.17487/RFC2522"/>
        </reference>
        <reference anchor="RFC4303" target="https://www.rfc-editor.org/info/rfc4303" quoteTitle="true" derivedAnchor="RFC4303">
          <front>
            <title>IP Encapsulating Security Payload (ESP)</title>
            <author initials="S." surname="Kent" fullname="S. Kent">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2005" month="December"/>
            <abstract>
              <t indent="0">This document describes an updated version of the Encapsulating Security Payload (ESP) protocol, which is designed to provide a mix of security services in IPv4 and IPv6.  ESP is used to provide confidentiality, data origin authentication, connectionless integrity, an anti-replay service (a form of partial sequence integrity), and limited traffic flow confidentiality.  This document obsoletes RFC 2406 (November 1998).  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="4303"/>
          <seriesInfo name="DOI" value="10.17487/RFC4303"/>
        </reference>
        <reference anchor="RFC4340" target="https://www.rfc-editor.org/info/rfc4340" quoteTitle="true" derivedAnchor="RFC4340">
          <front>
            <title>Datagram Congestion Control Protocol (DCCP)</title>
            <author initials="E." surname="Kohler" fullname="E. Kohler">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="M." surname="Handley" fullname="M. Handley">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Floyd" fullname="S. Floyd">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2006" month="March"/>
            <abstract>
              <t indent="0">The Datagram Congestion Control Protocol (DCCP) is a transport protocol that provides bidirectional unicast connections of congestion-controlled unreliable datagrams.  DCCP is suitable for applications that transfer fairly large amounts of data and that can benefit from control over the tradeoff between timeliness and reliability.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="4340"/>
          <seriesInfo name="DOI" value="10.17487/RFC4340"/>
        </reference>
        <reference anchor="RFC4346" target="https://www.rfc-editor.org/info/rfc4346" quoteTitle="true" derivedAnchor="RFC4346">
          <front>
            <title>The Transport Layer Security (TLS) Protocol Version 1.1</title>
            <author initials="T." surname="Dierks" fullname="T. Dierks">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="E." surname="Rescorla" fullname="E. Rescorla">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2006" month="April"/>
            <abstract>
              <t indent="0">This document specifies Version 1.1 of the Transport Layer Security (TLS) protocol.  The TLS protocol provides communications security over the Internet.  The protocol allows client/server applications to communicate in a way that is designed to prevent eavesdropping, tampering, or message forgery.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="4346"/>
          <seriesInfo name="DOI" value="10.17487/RFC4346"/>
        </reference>
        <reference anchor="RFC4347" target="https://www.rfc-editor.org/info/rfc4347" quoteTitle="true" derivedAnchor="RFC4347">
          <front>
            <title>Datagram Transport Layer Security</title>
            <author initials="E." surname="Rescorla" fullname="E. Rescorla">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="N." surname="Modadugu" fullname="N. Modadugu">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2006" month="April"/>
            <abstract>
              <t indent="0">This document specifies Version 1.0 of the Datagram Transport Layer Security (DTLS) protocol.  The DTLS protocol provides communications privacy for datagram protocols.  The protocol allows client/server applications to communicate in a way that is designed to prevent eavesdropping, tampering, or message forgery.  The DTLS protocol is based on the Transport Layer Security (TLS) protocol and provides equivalent security guarantees.  Datagram semantics of the underlying transport are preserved by the DTLS protocol.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="4347"/>
          <seriesInfo name="DOI" value="10.17487/RFC4347"/>
        </reference>
        <reference anchor="RFC4960" target="https://www.rfc-editor.org/info/rfc4960" quoteTitle="true" derivedAnchor="RFC4960">
          <front>
            <title>Stream Control Transmission Protocol</title>
            <author initials="R." surname="Stewart" fullname="R. Stewart" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2007" month="September"/>
            <abstract>
              <t indent="0">This document obsoletes RFC 2960 and RFC 3309.  It describes the Stream Control Transmission Protocol (SCTP).  SCTP is designed to transport Public Switched Telephone Network (PSTN) signaling messages over IP networks, but is capable of broader applications.</t>
              <t indent="0">SCTP is a reliable transport protocol operating on top of a connectionless packet network such as IP.  It offers the following services to its users:</t>
              <t indent="0">--  acknowledged error-free non-duplicated transfer of user data,</t>
              <t indent="0">--  data fragmentation to conform to discovered path MTU size,</t>
              <t indent="0">--  sequenced delivery of user messages within multiple streams, with an option for order-of-arrival delivery of individual user messages,</t>
              <t indent="0">--  optional bundling of multiple user messages into a single SCTP packet, and</t>
              <t indent="0">--  network-level fault tolerance through supporting of multi-homing at either or both ends of an association.</t>
              <t indent="0"> The design of SCTP includes appropriate congestion avoidance behavior and resistance to flooding and masquerade attacks.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="4960"/>
          <seriesInfo name="DOI" value="10.17487/RFC4960"/>
        </reference>
        <reference anchor="RFC5238" target="https://www.rfc-editor.org/info/rfc5238" quoteTitle="true" derivedAnchor="RFC5238">
          <front>
            <title>Datagram Transport Layer Security (DTLS) over the Datagram Congestion Control Protocol (DCCP)</title>
            <author initials="T." surname="Phelan" fullname="T. Phelan">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2008" month="May"/>
            <abstract>
              <t indent="0">This document specifies the use of Datagram Transport Layer Security (DTLS) over the Datagram Congestion Control Protocol (DCCP).  DTLS provides communications privacy for applications that use datagram transport protocols and allows client/server applications to communicate in a way that is designed to prevent eavesdropping and detect tampering or message forgery.  DCCP is a transport protocol that provides a congestion-controlled unreliable datagram service.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5238"/>
          <seriesInfo name="DOI" value="10.17487/RFC5238"/>
        </reference>
        <reference anchor="RFC5246" target="https://www.rfc-editor.org/info/rfc5246" quoteTitle="true" derivedAnchor="RFC5246">
          <front>
            <title>The Transport Layer Security (TLS) Protocol Version 1.2</title>
            <author initials="T." surname="Dierks" fullname="T. Dierks">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="E." surname="Rescorla" fullname="E. Rescorla">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2008" month="August"/>
            <abstract>
              <t indent="0">This document specifies Version 1.2 of the Transport Layer Security (TLS) protocol.  The TLS protocol provides communications security over the Internet.  The protocol allows client/server applications to communicate in a way that is designed to prevent eavesdropping, tampering, or message forgery.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5246"/>
          <seriesInfo name="DOI" value="10.17487/RFC5246"/>
        </reference>
        <reference anchor="RFC5763" target="https://www.rfc-editor.org/info/rfc5763" quoteTitle="true" derivedAnchor="RFC5763">
          <front>
            <title>Framework for Establishing a Secure Real-time Transport Protocol (SRTP) Security Context Using Datagram Transport Layer Security (DTLS)</title>
            <author initials="J." surname="Fischl" fullname="J. Fischl">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="H." surname="Tschofenig" fullname="H. Tschofenig">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="E." surname="Rescorla" fullname="E. Rescorla">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2010" month="May"/>
            <abstract>
              <t indent="0">This document specifies how to use the Session Initiation Protocol (SIP) to establish a Secure Real-time Transport Protocol (SRTP) security context using the Datagram Transport Layer Security (DTLS) protocol.  It describes a mechanism of transporting a fingerprint attribute in the Session Description Protocol (SDP) that identifies the key that will be presented during the DTLS handshake.  The key exchange travels along the media path as opposed to the signaling path.  The SIP Identity mechanism can be used to protect the integrity of the fingerprint attribute from modification by intermediate proxies.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5763"/>
          <seriesInfo name="DOI" value="10.17487/RFC5763"/>
        </reference>
        <reference anchor="RFC5764" target="https://www.rfc-editor.org/info/rfc5764" quoteTitle="true" derivedAnchor="RFC5764">
          <front>
            <title>Datagram Transport Layer Security (DTLS) Extension to Establish Keys for the Secure Real-time Transport Protocol (SRTP)</title>
            <author initials="D." surname="McGrew" fullname="D. McGrew">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="E." surname="Rescorla" fullname="E. Rescorla">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2010" month="May"/>
            <abstract>
              <t indent="0">This document describes a Datagram Transport Layer Security (DTLS) extension to establish keys for Secure RTP (SRTP) and Secure RTP Control Protocol (SRTCP) flows.  DTLS keying happens on the media path, independent of any out-of-band signalling channel present. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5764"/>
          <seriesInfo name="DOI" value="10.17487/RFC5764"/>
        </reference>
        <reference anchor="RFC6066" target="https://www.rfc-editor.org/info/rfc6066" quoteTitle="true" derivedAnchor="RFC6066">
          <front>
            <title>Transport Layer Security (TLS) Extensions: Extension Definitions</title>
            <author initials="D." surname="Eastlake 3rd" fullname="D. Eastlake 3rd">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2011" month="January"/>
            <abstract>
              <t indent="0">This document provides specifications for existing TLS extensions.  It is a companion document for RFC 5246, "The Transport Layer Security (TLS) Protocol Version 1.2".  The extensions specified are server_name, max_fragment_length, client_certificate_url, trusted_ca_keys, truncated_hmac, and status_request.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6066"/>
          <seriesInfo name="DOI" value="10.17487/RFC6066"/>
        </reference>
        <reference anchor="RFC6347" target="https://www.rfc-editor.org/info/rfc6347" quoteTitle="true" derivedAnchor="RFC6347">
          <front>
            <title>Datagram Transport Layer Security Version 1.2</title>
            <author initials="E." surname="Rescorla" fullname="E. Rescorla">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="N." surname="Modadugu" fullname="N. Modadugu">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2012" month="January"/>
            <abstract>
              <t indent="0">This document specifies version 1.2 of the Datagram Transport Layer Security (DTLS) protocol.  The DTLS protocol provides communications privacy for datagram protocols.  The protocol allows client/server applications to communicate in a way that is designed to prevent eavesdropping, tampering, or message forgery.  The DTLS protocol is based on the Transport Layer Security (TLS) protocol and provides equivalent security guarantees.  Datagram semantics of the underlying transport are preserved by the DTLS protocol.  This document updates DTLS 1.0 to work with TLS version 1.2.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6347"/>
          <seriesInfo name="DOI" value="10.17487/RFC6347"/>
        </reference>
        <reference anchor="RFC7296" target="https://www.rfc-editor.org/info/rfc7296" quoteTitle="true" derivedAnchor="RFC7296">
          <front>
            <title>Internet Key Exchange Protocol Version 2 (IKEv2)</title>
            <author initials="C." surname="Kaufman" fullname="C. Kaufman">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="P." surname="Hoffman" fullname="P. Hoffman">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="Y." surname="Nir" fullname="Y. Nir">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="P." surname="Eronen" fullname="P. Eronen">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="T." surname="Kivinen" fullname="T. Kivinen">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2014" month="October"/>
            <abstract>
              <t indent="0">This document describes version 2 of the Internet Key Exchange (IKE) protocol.  IKE is a component of IPsec used for performing mutual authentication and establishing and maintaining Security Associations (SAs).  This document obsoletes RFC 5996, and includes all of the errata for it.  It advances IKEv2 to be an Internet Standard.</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="79"/>
          <seriesInfo name="RFC" value="7296"/>
          <seriesInfo name="DOI" value="10.17487/RFC7296"/>
        </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="RFC7924" target="https://www.rfc-editor.org/info/rfc7924" quoteTitle="true" derivedAnchor="RFC7924">
          <front>
            <title>Transport Layer Security (TLS) Cached Information Extension</title>
            <author initials="S." surname="Santesson" fullname="S. Santesson">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="H." surname="Tschofenig" fullname="H. Tschofenig">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2016" month="July"/>
            <abstract>
              <t indent="0">Transport Layer Security (TLS) handshakes often include fairly static information, such as the server certificate and a list of trusted certification authorities (CAs).  This information can be of considerable size, particularly if the server certificate is bundled with a complete certificate chain (i.e., the certificates of intermediate CAs up to the root CA).</t>
              <t indent="0">This document defines an extension that allows a TLS client to inform a server of cached information, thereby enabling the server to omit already available information.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7924"/>
          <seriesInfo name="DOI" value="10.17487/RFC7924"/>
        </reference>
        <reference anchor="RFC7983" target="https://www.rfc-editor.org/info/rfc7983" quoteTitle="true" derivedAnchor="RFC7983">
          <front>
            <title>Multiplexing Scheme Updates for Secure Real-time Transport Protocol (SRTP) Extension for Datagram Transport Layer Security (DTLS)</title>
            <author initials="M." surname="Petit-Huguenin" fullname="M. Petit-Huguenin">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="G." surname="Salgueiro" fullname="G. Salgueiro">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2016" month="September"/>
            <abstract>
              <t indent="0">This document defines how Datagram Transport Layer Security (DTLS), Real-time Transport Protocol (RTP), RTP Control Protocol (RTCP), Session Traversal Utilities for NAT (STUN), Traversal Using Relays around NAT (TURN), and ZRTP packets are multiplexed on a single receiving socket.  It overrides the guidance from RFC 5764 ("SRTP                Extension for DTLS"), which suffered from four issues described and fixed in this document.</t>
              <t indent="0">This document updates RFC 5764.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7983"/>
          <seriesInfo name="DOI" value="10.17487/RFC7983"/>
        </reference>
        <reference anchor="RFC8201" target="https://www.rfc-editor.org/info/rfc8201" quoteTitle="true" derivedAnchor="RFC8201">
          <front>
            <title>Path MTU Discovery for IP version 6</title>
            <author initials="J." surname="McCann" fullname="J. McCann">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Deering" fullname="S. Deering">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Mogul" fullname="J. Mogul">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="R." surname="Hinden" fullname="R. Hinden" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2017" month="July"/>
            <abstract>
              <t indent="0">This document describes Path MTU Discovery (PMTUD) for IP version 6. It is largely derived from RFC 1191, which describes Path MTU Discovery for IP version 4.  It obsoletes RFC 1981.</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="87"/>
          <seriesInfo name="RFC" value="8201"/>
          <seriesInfo name="DOI" value="10.17487/RFC8201"/>
        </reference>
        <reference anchor="RFC8445" target="https://www.rfc-editor.org/info/rfc8445" quoteTitle="true" derivedAnchor="RFC8445">
          <front>
            <title>Interactive Connectivity Establishment (ICE): A Protocol for Network Address Translator (NAT) Traversal</title>
            <author initials="A." surname="Keranen" fullname="A. Keranen">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="C." surname="Holmberg" fullname="C. Holmberg">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Rosenberg" fullname="J. Rosenberg">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2018" month="July"/>
            <abstract>
              <t indent="0">This document describes a protocol for Network Address Translator (NAT) traversal for UDP-based communication.  This protocol is called Interactive Connectivity Establishment (ICE).  ICE makes use of the Session Traversal Utilities for NAT (STUN) protocol and its extension, Traversal Using Relay NAT (TURN).</t>
              <t indent="0">This document obsoletes RFC 5245.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8445"/>
          <seriesInfo name="DOI" value="10.17487/RFC8445"/>
        </reference>
        <reference anchor="RFC8879" target="https://www.rfc-editor.org/info/rfc8879" quoteTitle="true" derivedAnchor="RFC8879">
          <front>
            <title>TLS Certificate Compression</title>
            <author initials="A." surname="Ghedini" fullname="A. Ghedini">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="V." surname="Vasiliev" fullname="V. Vasiliev">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2020" month="December"/>
            <abstract>
              <t indent="0">In TLS handshakes, certificate chains often take up the majority of the bytes transmitted.</t>
              <t indent="0">This document describes how certificate chains can be compressed to reduce the amount of data transmitted and avoid some round trips.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8879"/>
          <seriesInfo name="DOI" value="10.17487/RFC8879"/>
        </reference>
        <reference anchor="RFC9000" target="https://www.rfc-editor.org/info/rfc9000" quoteTitle="true" derivedAnchor="RFC9000">
          <front>
            <title>QUIC: A UDP-Based Multiplexed and Secure Transport</title>
            <author initials="J." surname="Iyengar" fullname="J. Iyengar" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="M." surname="Thomson" fullname="M. Thomson" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2021" month="May"/>
            <abstract>
              <t indent="0">This document defines the core of the QUIC transport protocol.  QUIC provides applications with flow-controlled streams for structured communication, low-latency connection establishment, and network path migration. QUIC includes security measures that ensure confidentiality, integrity, and availability in a range of deployment circumstances.  Accompanying documents describe the integration of TLS for key negotiation, loss detection, and an exemplary congestion control algorithm.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9000"/>
          <seriesInfo name="DOI" value="10.17487/RFC9000"/>
        </reference>
        <reference anchor="RFC9002" target="https://www.rfc-editor.org/info/rfc9002" quoteTitle="true" derivedAnchor="RFC9002">
          <front>
            <title>QUIC Loss Detection and Congestion Control</title>
            <author initials="J." surname="Iyengar" fullname="J. Iyengar" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="I." surname="Swett" fullname="I. Swett" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2021" month="May"/>
            <abstract>
              <t indent="0">This document describes loss detection and congestion control mechanisms for QUIC.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9002"/>
          <seriesInfo name="DOI" value="10.17487/RFC9002"/>
        </reference>
        <reference anchor="ROBUST" target="https://eprint.iacr.org/2020/718" quoteTitle="true" derivedAnchor="ROBUST">
          <front>
            <title>Robust Channels: Handling Unreliable Networks in the Record Layers of QUIC and DTLS 1.3</title>
            <author initials="M." surname="Fischlin">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="F." surname="Günther">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="C." surname="Janson">
              <organization showOnFrontPage="true"/>
            </author>
            <date/>
          </front>
          <refcontent>received 15 June 2020, last revised 22 February 2021</refcontent>
        </reference>
        <reference anchor="TLS-ECH" quoteTitle="true" target="https://datatracker.ietf.org/doc/html/draft-ietf-tls-esni-14" derivedAnchor="TLS-ECH">
          <front>
            <title>TLS Encrypted Client Hello</title>
            <author initials="E" surname="Rescorla" fullname="Eric Rescorla">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="K" surname="Oku" fullname="Kazuho Oku">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="N" surname="Sullivan" fullname="Nick Sullivan">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="C.A." surname="Wood" fullname="Christopher A. Wood">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2022" month="February" day="13"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-tls-esni-14"/>
          <refcontent>Work in Progress</refcontent>
        </reference>
      </references>
    </references>
    <section anchor="protocol-data-structures-and-constant-values" numbered="true" toc="include" removeInRFC="false" pn="section-appendix.a">
      <name slugifiedName="name-protocol-data-structures-an">Protocol Data Structures and Constant Values</name>
      <t indent="0" pn="section-appendix.a-1">This section provides the normative protocol types and constants definitions.</t>
      <section anchor="record-layer" numbered="true" toc="include" removeInRFC="false" pn="section-appendix.a.1">
        <name slugifiedName="name-record-layer">Record Layer</name>
        <artwork name="" type="" align="left" alt="" pn="section-appendix.a.1-1">
    struct {
        ContentType type;
        ProtocolVersion legacy_record_version;
        uint16 epoch = 0
        uint48 sequence_number;
        uint16 length;
        opaque fragment[DTLSPlaintext.length];
    } DTLSPlaintext;

    struct {
         opaque content[DTLSPlaintext.length];
         ContentType type;
         uint8 zeros[length_of_padding];
    } DTLSInnerPlaintext;

    struct {
        opaque unified_hdr[variable];
        opaque encrypted_record[length];
    } DTLSCiphertext;

    0 1 2 3 4 5 6 7
    +-+-+-+-+-+-+-+-+
    |0|0|1|C|S|L|E E|
    +-+-+-+-+-+-+-+-+
    | Connection ID |   Legend:
    | (if any,      |
    /  length as    /   C   - Connection ID (CID) present
    |  negotiated)  |   S   - Sequence number length
    +-+-+-+-+-+-+-+-+   L   - Length present
    |  8 or 16 bit  |   E   - Epoch
    |Sequence Number|
    +-+-+-+-+-+-+-+-+
    | 16 bit Length |
    | (if present)  |
    +-+-+-+-+-+-+-+-+

    struct {
        uint64 epoch;
        uint64 sequence_number;
    } RecordNumber;
</artwork>
      </section>
      <section anchor="handshake-protocol" numbered="true" toc="include" removeInRFC="false" pn="section-appendix.a.2">
        <name slugifiedName="name-handshake-protocol">Handshake Protocol</name>
        <sourcecode name="" type="tls-presentation" markers="false" pn="section-appendix.a.2-1">
    enum {
        hello_request_RESERVED(0),
        client_hello(1),
        server_hello(2),
        hello_verify_request_RESERVED(3),
        new_session_ticket(4),
        end_of_early_data(5),
        hello_retry_request_RESERVED(6),
        encrypted_extensions(8),
        request_connection_id(9),           /* New */
        new_connection_id(10),              /* New */
        certificate(11),
        server_key_exchange_RESERVED(12),
        certificate_request(13),
        server_hello_done_RESERVED(14),
        certificate_verify(15),
        client_key_exchange_RESERVED(16),
        finished(20),
        certificate_url_RESERVED(21),
        certificate_status_RESERVED(22),
        supplemental_data_RESERVED(23),
        key_update(24),
        message_hash(254),
        (255)
    } HandshakeType;

    struct {
        HandshakeType msg_type;    /* handshake type */
        uint24 length;             /* bytes in message */
        uint16 message_seq;        /* DTLS-required field */
        uint24 fragment_offset;    /* DTLS-required field */
        uint24 fragment_length;    /* DTLS-required field */
        select (msg_type) {
            case client_hello:          ClientHello;
            case server_hello:          ServerHello;
            case end_of_early_data:     EndOfEarlyData;
            case encrypted_extensions:  EncryptedExtensions;
            case certificate_request:   CertificateRequest;
            case certificate:           Certificate;
            case certificate_verify:    CertificateVerify;
            case finished:              Finished;
            case new_session_ticket:    NewSessionTicket;
            case key_update:            KeyUpdate;
            case request_connection_id: RequestConnectionId;
            case new_connection_id:     NewConnectionId;
        } body;
    } Handshake;

    uint16 ProtocolVersion;
    opaque Random[32];

    uint8 CipherSuite[2];    /* Cryptographic suite selector */

    struct {
        ProtocolVersion legacy_version = { 254,253 }; // DTLSv1.2
        Random random;
        opaque legacy_session_id&lt;0..32&gt;;
        opaque legacy_cookie&lt;0..2^8-1&gt;;                  // DTLS
        CipherSuite cipher_suites&lt;2..2^16-2&gt;;
        opaque legacy_compression_methods&lt;1..2^8-1&gt;;
        Extension extensions&lt;8..2^16-1&gt;;
    } ClientHello;
</sourcecode>
      </section>
      <section anchor="acks" numbered="true" toc="include" removeInRFC="false" pn="section-appendix.a.3">
        <name slugifiedName="name-acks">ACKs</name>
        <sourcecode name="" type="tls-presentation" markers="false" pn="section-appendix.a.3-1">
    struct {
        RecordNumber record_numbers&lt;0..2^16-1&gt;;
    } ACK;
</sourcecode>
      </section>
      <section anchor="connection-id-management" numbered="true" toc="include" removeInRFC="false" pn="section-appendix.a.4">
        <name slugifiedName="name-connection-id-management">Connection ID Management</name>
        <sourcecode name="" type="tls-presentation" markers="false" pn="section-appendix.a.4-1">
    enum {
        cid_immediate(0), cid_spare(1), (255)
    } ConnectionIdUsage;

    opaque ConnectionId&lt;0..2^8-1&gt;;

    struct {
        ConnectionId cids&lt;0..2^16-1&gt;;
        ConnectionIdUsage usage;
    } NewConnectionId;

    struct {
      uint8 num_cids;
    } RequestConnectionId;
</sourcecode>
      </section>
    </section>
    <section anchor="ccm-bounds" numbered="true" toc="include" removeInRFC="false" pn="section-appendix.b">
      <name slugifiedName="name-analysis-of-limits-on-ccm-u">Analysis of Limits on CCM Usage</name>
      <t indent="0" pn="section-appendix.b-1">TLS <xref target="RFC8446" format="default" sectionFormat="of" derivedContent="TLS13"/> and <xref target="AEBounds" format="default" sectionFormat="of" derivedContent="AEBounds"/> do not specify limits on key usage for
AEAD_AES_128_CCM.
 However, any AEAD that is used with DTLS requires limits on
use that ensure that both confidentiality and integrity are preserved. This
section documents that analysis for AEAD_AES_128_CCM.</t>
      <t indent="0" pn="section-appendix.b-2"><xref target="CCM-ANALYSIS" format="default" sectionFormat="of" derivedContent="CCM-ANALYSIS"/> is used as the basis of this
analysis. The results of that analysis are used to derive usage limits that are
based on those chosen in <xref target="RFC8446" format="default" sectionFormat="of" derivedContent="TLS13"/>.</t>
      <t indent="0" pn="section-appendix.b-3">This analysis uses symbols for multiplication (*), division (/), and
exponentiation (^), plus parentheses for establishing precedence. The following
symbols are also used:</t>
      <dl newline="false" spacing="normal" indent="4" pn="section-appendix.b-4">
        <dt pn="section-appendix.b-4.1">t:</dt>
        <dd pn="section-appendix.b-4.2">
  The size of the authentication tag in bits. For this cipher, t is 128.</dd>
        <dt pn="section-appendix.b-4.3">n:</dt>
        <dd pn="section-appendix.b-4.4">
  The size of the block function in bits. For this cipher, n is 128.</dd>
        <dt pn="section-appendix.b-4.5">l:</dt>
        <dd pn="section-appendix.b-4.6">
  The number of blocks in each packet (see below).</dd>
        <dt pn="section-appendix.b-4.7">q:</dt>
        <dd pn="section-appendix.b-4.8">
  The number of genuine packets created and protected by endpoints. This value
is the bound on the number of packets that can be protected before updating
keys.</dd>
        <dt pn="section-appendix.b-4.9">v:</dt>
        <dd pn="section-appendix.b-4.10">
  The number of forged packets that endpoints will accept. This value is the
bound on the number of forged packets that an endpoint can reject before
updating keys.</dd>
      </dl>
      <t indent="0" pn="section-appendix.b-5">The analysis of AEAD_AES_128_CCM relies on a count of the number of block
operations involved in producing each message. For simplicity, and to match the
analysis of other AEAD functions in <xref target="AEBounds" format="default" sectionFormat="of" derivedContent="AEBounds"/>, this analysis assumes a
packet length of 2^10 blocks and a packet size limit of 2^14 bytes.</t>
      <t indent="0" pn="section-appendix.b-6">For AEAD_AES_128_CCM, the total number of block cipher operations is the sum
of: the length of the associated data in blocks, the length of the ciphertext in blocks, and the length of the plaintext in blocks, plus 1. In this analysis,
this is simplified to a value of twice the maximum length of a record in blocks
(that is, <tt>2l = 2^11</tt>). This simplification is based on the associated data
being limited to one block.</t>
      <section anchor="ccm-confidentiality" numbered="true" toc="include" removeInRFC="false" pn="section-appendix.b.1">
        <name slugifiedName="name-confidentiality-limits">Confidentiality Limits</name>
        <t indent="0" pn="section-appendix.b.1-1">For confidentiality, Theorem 2 in <xref target="CCM-ANALYSIS" format="default" sectionFormat="of" derivedContent="CCM-ANALYSIS"/> establishes that an attacker
gains a distinguishing advantage over an ideal pseudorandom permutation (PRP) of
no more than:</t>
        <artwork name="" type="" align="left" alt="" pn="section-appendix.b.1-2">
(2l * q)^2 / 2^n
</artwork>
        <t indent="0" pn="section-appendix.b.1-3">For a target advantage in a single-key setting of 2^-60, which matches that used by TLS 1.3, as summarized in <xref target="AEAD-LIMITS" format="default" sectionFormat="of" derivedContent="AEAD-LIMITS"/>, this results in the relation:</t>
        <artwork name="" type="" align="left" alt="" pn="section-appendix.b.1-4">
q &lt;= 2^23
</artwork>
        <t indent="0" pn="section-appendix.b.1-5">That is, endpoints cannot protect more than 2^23 packets with the same set of
keys without causing an attacker to gain a larger advantage than the target of
2^-60.</t>
      </section>
      <section anchor="ccm-integrity" numbered="true" toc="include" removeInRFC="false" pn="section-appendix.b.2">
        <name slugifiedName="name-integrity-limits">Integrity Limits</name>
        <t indent="0" pn="section-appendix.b.2-1">For integrity, Theorem 1 in <xref target="CCM-ANALYSIS" format="default" sectionFormat="of" derivedContent="CCM-ANALYSIS"/> establishes that an attacker
gains an advantage over an ideal PRP of no more than:</t>
        <artwork name="" type="" align="left" alt="" pn="section-appendix.b.2-2">
v / 2^t + (2l * (v + q))^2 / 2^n
</artwork>
        <t indent="0" pn="section-appendix.b.2-3">The goal is to limit this advantage to 2^-57, to match the target in
TLS 1.3, as summarized in <xref target="AEAD-LIMITS" format="default" sectionFormat="of" derivedContent="AEAD-LIMITS"/>. As <tt>t</tt> and <tt>n</tt> are both 128, the first term is negligible relative
to the second, so that term can be removed without a significant effect on the
result. This produces the relation:</t>
        <artwork name="" type="" align="left" alt="" pn="section-appendix.b.2-4">
v + q &lt;= 2^24.5
</artwork>
        <t indent="0" pn="section-appendix.b.2-5">Using the previously established value of 2^23 for <tt>q</tt> and rounding, this leads
to an upper limit on <tt>v</tt> of 2^23.5. That is, endpoints cannot attempt to
authenticate more than 2^23.5 packets with the same set of keys without causing
an attacker to gain a larger advantage than the target of 2^-57.</t>
      </section>
      <section anchor="ccm-short" numbered="true" toc="include" removeInRFC="false" pn="section-appendix.b.3">
        <name slugifiedName="name-limits-for-aead_aes_128_ccm">Limits for AEAD_AES_128_CCM_8</name>
        <t indent="0" pn="section-appendix.b.3-1">The TLS_AES_128_CCM_8_SHA256 cipher suite uses the AEAD_AES_128_CCM_8 function,
which uses a short authentication tag (that is, t=64).</t>
        <t indent="0" pn="section-appendix.b.3-2">The confidentiality limits of AEAD_AES_128_CCM_8 are the same as those for
AEAD_AES_128_CCM, as this does not depend on the tag length; see
<xref target="ccm-confidentiality" format="default" sectionFormat="of" derivedContent="Appendix B.1"/>.</t>
        <t indent="0" pn="section-appendix.b.3-3">The shorter tag length of 64 bits means that the simplification used in
<xref target="ccm-integrity" format="default" sectionFormat="of" derivedContent="Appendix B.2"/> does not apply to AEAD_AES_128_CCM_8. If the goal is to
preserve the same margins as other cipher suites, then the limit on forgeries
is largely dictated by the first term of the advantage formula:</t>
        <artwork name="" type="" align="left" alt="" pn="section-appendix.b.3-4">
v &lt;= 2^7
</artwork>
        <t indent="0" pn="section-appendix.b.3-5">As this represents attempts that fail authentication, applying this limit might
be feasible in some environments. However, applying this limit in an
implementation intended for general use exposes connections to an inexpensive
denial-of-service attack.</t>
        <t indent="0" pn="section-appendix.b.3-6">This analysis supports the view that TLS_AES_128_CCM_8_SHA256 is not suitable
for general use. Specifically, TLS_AES_128_CCM_8_SHA256 cannot be used without
additional measures to prevent forgery of records, or to mitigate the effect of
forgeries. This might require understanding the constraints that exist in a
particular deployment or application. For instance, it might be possible to set
a different target for the advantage an attacker gains based on an
understanding of the constraints imposed on a specific usage of DTLS.</t>
      </section>
    </section>
    <section anchor="implementation-pitfalls" numbered="true" toc="include" removeInRFC="false" pn="section-appendix.c">
      <name slugifiedName="name-implementation-pitfalls">Implementation Pitfalls</name>
      <t indent="0" pn="section-appendix.c-1">In addition to the aspects of TLS that have been a source of interoperability
and security problems (<xref target="RFC8446" sectionFormat="of" section="C.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8446#appendix-C.3" derivedContent="TLS13"/>), DTLS presents a few new
potential sources of issues, noted here.</t>
      <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-appendix.c-2">
        <li pn="section-appendix.c-2.1">Do you correctly handle messages received from multiple epochs during a key
transition?  This includes locating the correct key as well as performing
replay detection, if enabled.</li>
        <li pn="section-appendix.c-2.2">Do you retransmit handshake messages that are not (implicitly or explicitly)
acknowledged (<xref target="timeout-retransmissions" format="default" sectionFormat="of" derivedContent="Section 5.8"/>)?</li>
        <li pn="section-appendix.c-2.3">Do you correctly handle handshake message fragments received, including
when they are out of order?</li>
        <li pn="section-appendix.c-2.4">Do you correctly handle handshake messages received out of order?
This may include either buffering or discarding them.</li>
        <li pn="section-appendix.c-2.5">Do you limit how much data you send to a peer before its address is
validated?</li>
        <li pn="section-appendix.c-2.6">Do you verify that the explicit record length is contained within the
datagram in which it is contained?</li>
      </ul>
    </section>
    <section anchor="contributors" numbered="false" toc="include" removeInRFC="false" pn="section-appendix.d">
      <name slugifiedName="name-contributors">Contributors</name>
      <t indent="0" pn="section-appendix.d-1">Many people have contributed to previous DTLS versions, and they are acknowledged
in prior versions of DTLS specifications or in the referenced specifications.</t>
      <contact fullname="Hanno Becker">
        <organization showOnFrontPage="true">Arm Limited</organization>
        <address>
          <email>Hanno.Becker@arm.com</email>
        </address>
      </contact>
      <contact fullname="David Benjamin">
        <organization showOnFrontPage="true">Google</organization>
        <address>
          <email>davidben@google.com</email>
        </address>
      </contact>
      <contact fullname="Thomas Fossati">
        <organization showOnFrontPage="true">Arm Limited</organization>
        <address>
          <email>thomas.fossati@arm.com</email>
        </address>
      </contact>
      <contact fullname="Tobias Gondrom">
        <organization showOnFrontPage="true">Huawei</organization>
        <address>
          <email>tobias.gondrom@gondrom.org</email>
        </address>
      </contact>
      <contact fullname="Felix Günther">
        <organization showOnFrontPage="true">ETH Zurich</organization>
        <address>
          <email>mail@felixguenther.info</email>
        </address>
      </contact>
      <contact fullname="Benjamin Kaduk">
        <organization showOnFrontPage="true">Akamai Technologies</organization>
        <address>
          <email>kaduk@mit.edu</email>
        </address>
      </contact>
      <contact fullname="Ilari Liusvaara">
        <organization showOnFrontPage="true">Independent</organization>
        <address>
          <email>ilariliusvaara@welho.com</email>
        </address>
      </contact>
      <contact fullname="Martin Thomson">
        <organization showOnFrontPage="true">Mozilla</organization>
        <address>
          <email>martin.thomson@gmail.com</email>
        </address>
      </contact>
      <contact fullname="Christopher A. Wood">
        <organization showOnFrontPage="true">Cloudflare</organization>
        <address>
          <email>caw@heapingbits.net</email>
        </address>
      </contact>
      <contact fullname="Yin Xinxing">
        <organization showOnFrontPage="true">Huawei</organization>
        <address>
          <email>yinxinxing@huawei.com</email>
        </address>
      </contact>
      <t indent="0" pn="section-appendix.d-2"> The
sequence number encryption concept is taken from QUIC <xref target="RFC9000" format="default" sectionFormat="of" derivedContent="RFC9000"/>. We would
like to thank the authors of RFC 9000 for their work. <contact fullname="Felix Günther"/> and <contact fullname="Martin  Thomson"/> contributed the analysis in <xref target="ccm-bounds" format="default" sectionFormat="of" derivedContent="Appendix B"/>.
      We would like to thank <contact fullname="Jonathan Hammell"/>, <contact fullname="Bernard Aboba"/>, and <contact fullname="Andy Cunningham"/> for their review comments.</t>
      <t indent="0" pn="section-appendix.d-3">Additionally, we would like to thank the IESG members for their review comments: <contact fullname="Martin Duke"/>, <contact fullname="Erik Kline"/>, <contact fullname="Francesca Palombini"/>, <contact fullname="Lars Eggert"/>, <contact fullname="Zaheduzzaman Sarker"/>, <contact fullname="John Scudder"/>, <contact fullname="Éric Vyncke"/>, <contact fullname="Robert Wilton"/>, <contact fullname="Roman Danyliw"/>, <contact fullname="Benjamin Kaduk"/>, <contact fullname="Murray Kucherawy"/>, <contact fullname="Martin Vigoureux"/>, and <contact fullname="Alvaro Retana"/>.</t>
    </section>
    <section anchor="authors-addresses" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.e">
      <name slugifiedName="name-authors-addresses">Authors' Addresses</name>
      <author initials="E." surname="Rescorla" fullname="Eric Rescorla">
        <organization showOnFrontPage="true">Mozilla</organization>
        <address>
          <email>ekr@rtfm.com</email>
        </address>
      </author>
      <author initials="H." surname="Tschofenig" fullname="Hannes Tschofenig">
        <organization showOnFrontPage="true">Arm Limited</organization>
        <address>
          <email>hannes.tschofenig@arm.com</email>
        </address>
      </author>
      <author initials="N." surname="Modadugu" fullname="Nagendra Modadugu">
        <organization showOnFrontPage="true">Google, Inc.</organization>
        <address>
          <email>nagendra@cs.stanford.edu</email>
        </address>
      </author>
    </section>
  </back>
</rfc>
