<?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-babel-dtls-10" indexInclude="true" ipr="trust200902" number="8968" prepTime="2021-01-11T12:21:11" scripts="Common,Latin" sortRefs="true" submissionType="IETF" symRefs="true" tocDepth="2" tocInclude="true" xml:lang="en">
  <link href="https://datatracker.ietf.org/doc/draft-ietf-babel-dtls-10" rel="prev"/>
  <link href="https://dx.doi.org/10.17487/rfc8968" rel="alternate"/>
  <link href="urn:issn:2070-1721" rel="alternate"/>
  <front>
    <title abbrev="Babel over DTLS">Babel Routing Protocol over Datagram Transport Layer Security</title>
    <seriesInfo name="RFC" value="8968" stream="IETF"/>
    <author fullname="Antonin Décimo" initials="A." surname="Décimo">
      <organization showOnFrontPage="true">IRIF, University of Paris-Diderot</organization>
      <address>
        <postal>
          <city>Paris</city>
          <country>France</country>
        </postal>
        <email>antonin.decimo@gmail.com</email>
      </address>
    </author>
    <author fullname="David Schinazi" surname="Schinazi" initials="D.">
      <organization showOnFrontPage="true">Google LLC</organization>
      <address>
        <postal>
          <street>1600 Amphitheatre Parkway</street>
          <city>Mountain View</city>
          <region>CA</region>
          <code>94043</code>
          <country>United States of America</country>
        </postal>
        <email>dschinazi.ietf@gmail.com</email>
      </address>
    </author>
    <author fullname="Juliusz Chroboczek" initials="J." surname="Chroboczek">
      <organization showOnFrontPage="true">IRIF, University of Paris-Diderot</organization>
      <address>
        <postal>
          <street>Case 7014</street>
          <city>Paris CEDEX 13</city>
          <code>75205</code>
          <country>France</country>
        </postal>
        <email>jch@irif.fr</email>
      </address>
    </author>
    <date month="01" year="2021"/>
    <abstract pn="section-abstract">
      <t indent="0" pn="section-abstract-1">The Babel Routing Protocol does not contain any means to authenticate
neighbours or provide integrity or confidentiality for messages sent between
them.  This document specifies a mechanism to ensure these properties using
Datagram Transport Layer Security (DTLS).</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/rfc8968" 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) 2021 IETF Trust and the persons identified as the
            document authors. All rights reserved.
        </t>
        <t indent="0" pn="section-boilerplate.2-2">
            This document is subject to BCP 78 and the IETF Trust's Legal
            Provisions Relating to IETF Documents
            (<eref target="https://trustee.ietf.org/license-info" brackets="none"/>) in effect on the date of
            publication of this document. Please review these documents
            carefully, as they describe your rights and restrictions with
            respect to this document. Code Components extracted from this
            document must include Simplified BSD License text as described in
            Section 4.e of the Trust Legal Provisions and are provided without
            warranty as described in the Simplified BSD License.
        </t>
      </section>
    </boilerplate>
    <toc>
      <section anchor="toc" numbered="false" removeInRFC="false" toc="exclude" pn="section-toc.1">
        <name slugifiedName="name-table-of-contents">Table of Contents</name>
        <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1">
          <li pn="section-toc.1-1.1">
            <t indent="0" 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>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.1.2">
              <li pn="section-toc.1-1.1.2.1">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.1.1"><xref derivedContent="1.1" format="counter" sectionFormat="of" target="section-1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-specification-of-requiremen">Specification of Requirements</xref></t>
              </li>
              <li pn="section-toc.1-1.1.2.2">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.2.1"><xref derivedContent="1.2" format="counter" sectionFormat="of" target="section-1.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-applicability">Applicability</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.2">
            <t indent="0" pn="section-toc.1-1.2.1"><xref derivedContent="2" format="counter" sectionFormat="of" target="section-2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-operation-of-the-protocol">Operation of the Protocol</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.2.2">
              <li pn="section-toc.1-1.2.2.1">
                <t indent="0" pn="section-toc.1-1.2.2.1.1"><xref derivedContent="2.1" format="counter" sectionFormat="of" target="section-2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-dtls-connection-initiation">DTLS Connection Initiation</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.2">
                <t indent="0" pn="section-toc.1-1.2.2.2.1"><xref derivedContent="2.2" format="counter" sectionFormat="of" target="section-2.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-protocol-encoding">Protocol Encoding</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.3">
                <t indent="0" pn="section-toc.1-1.2.2.3.1"><xref derivedContent="2.3" format="counter" sectionFormat="of" target="section-2.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-transmission">Transmission</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.4">
                <t indent="0" pn="section-toc.1-1.2.2.4.1"><xref derivedContent="2.4" format="counter" sectionFormat="of" target="section-2.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-reception">Reception</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.5">
                <t indent="0" pn="section-toc.1-1.2.2.5.1"><xref derivedContent="2.5" format="counter" sectionFormat="of" target="section-2.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-neighbour-table-entry">Neighbour Table Entry</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.6">
                <t indent="0" pn="section-toc.1-1.2.2.6.1"><xref derivedContent="2.6" format="counter" sectionFormat="of" target="section-2.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-simultaneous-operation-of-b">Simultaneous Operation of Babel over DTLS and Unprotected Babel on a Node</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.7">
                <t indent="0" pn="section-toc.1-1.2.2.7.1"><xref derivedContent="2.7" format="counter" sectionFormat="of" target="section-2.7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-simultaneous-operation-of-ba">Simultaneous Operation of Babel over DTLS and Unprotected Babel on a Network</xref></t>
              </li>
            </ul>
          </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-interface-maximum-transmiss">Interface Maximum Transmission Unit Issues</xref></t>
          </li>
          <li pn="section-toc.1-1.4">
            <t indent="0" pn="section-toc.1-1.4.1"><xref derivedContent="4" format="counter" sectionFormat="of" target="section-4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-iana-considerations">IANA Considerations</xref></t>
          </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-security-considerations">Security Considerations</xref></t>
          </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-references">References</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-normative-references">Normative References</xref></t>
              </li>
              <li pn="section-toc.1-1.6.2.2">
                <t indent="0" pn="section-toc.1-1.6.2.2.1"><xref derivedContent="6.2" format="counter" sectionFormat="of" target="section-6.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-informative-references">Informative References</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.7">
            <t indent="0" pn="section-toc.1-1.7.1"><xref derivedContent="Appendix A" format="default" sectionFormat="of" target="section-appendix.a"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-performance-considerations">Performance Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.8">
            <t indent="0" pn="section-toc.1-1.8.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.b"/><xref derivedContent="" format="title" sectionFormat="of" target="name-acknowledgments">Acknowledgments</xref></t>
          </li>
          <li pn="section-toc.1-1.9">
            <t indent="0" pn="section-toc.1-1.9.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.c"/><xref derivedContent="" format="title" sectionFormat="of" target="name-authors-addresses">Authors' Addresses</xref></t>
          </li>
        </ul>
      </section>
    </toc>
  </front>
  <middle>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-1">
      <name slugifiedName="name-introduction">Introduction</name>
      <t indent="0" pn="section-1-1">The Babel routing protocol <xref target="RFC8966" format="default" sectionFormat="of" derivedContent="RFC8966"/> does not contain
any means to authenticate neighbours or protect messages sent between them.
Because of this, an attacker is able to send maliciously crafted Babel
messages that could lead a network to route traffic to an attacker or
to an under-resourced target, causing denial of service.
This document specifies a mechanism to prevent such attacks using
Datagram Transport Layer Security (DTLS) <xref target="RFC6347" format="default" sectionFormat="of" derivedContent="RFC6347"/>.</t>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-1.1">
        <name slugifiedName="name-specification-of-requiremen">Specification of Requirements</name>
        <t indent="0" pn="section-1.1-1">
    The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
    "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", 
    "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
    "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
    described in BCP 14 <xref target="RFC2119" format="default" sectionFormat="of" derivedContent="RFC2119"/> <xref target="RFC8174" format="default" sectionFormat="of" derivedContent="RFC8174"/> 
    when, and only when, they appear in all capitals, as shown here.
        </t>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-1.2">
        <name slugifiedName="name-applicability">Applicability</name>
        <t indent="0" pn="section-1.2-1">The protocol described in this document protects Babel packets with
DTLS.  As such, it inherits the features offered by DTLS, notably
authentication, integrity, optional replay protection, confidentiality, and
asymmetric keying.  It is therefore expected to be applicable in a wide
range of environments.</t>
        <t indent="0" pn="section-1.2-2">There exists another mechanism for securing Babel, namely Message Authentication Code (MAC)
authentication for Babel (Babel-MAC) <xref target="RFC8967" format="default" sectionFormat="of" derivedContent="RFC8967"/>.  Babel-MAC only offers basic
features, namely authentication, integrity, and replay protection with
a small number of symmetric keys.  A comparison of Babel security mechanisms
and their applicability can be found in <xref target="RFC8966" format="default" sectionFormat="of" derivedContent="RFC8966"/>.</t>
        <t indent="0" pn="section-1.2-3">Note that Babel over DTLS provides a single authentication domain, meaning
that all nodes that have the right credentials can convey any and all routing
information.</t>
        <t indent="0" pn="section-1.2-4">DTLS supports several mechanisms by which nodes can identify themselves
and prove possession of secrets tied to these identities.  This document
does not prescribe which of these mechanisms to use; details of identity
management are left to deployment profiles of Babel over DTLS.</t>
      </section>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-2">
      <name slugifiedName="name-operation-of-the-protocol">Operation of the Protocol</name>
      <t indent="0" pn="section-2-1">Babel over DTLS requires some changes to how Babel operates.
First, DTLS is a client-server protocol, while Babel is a peer-to-peer
protocol.  Second, DTLS can only protect unicast communication, while
Babel packets can be sent to both unicast and multicast destinations.</t>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-2.1">
        <name slugifiedName="name-dtls-connection-initiation">DTLS Connection Initiation</name>
        <t indent="0" pn="section-2.1-1">Babel over DTLS operates on a different port than unencrypted Babel.
All Babel over DTLS nodes <bcp14>MUST</bcp14> act as DTLS servers on a given UDP port
and <bcp14>MUST</bcp14> listen for unencrypted Babel traffic on another UDP port, which
<bcp14>MUST</bcp14> be distinct from the first one.  The default port for Babel over DTLS is
registered with IANA as the "babel-dtls" port (UDP port 6699, see
<xref target="iana_considerations" format="default" sectionFormat="of" derivedContent="Section 4"/>), and the port exchanging unencrypted
Babel traffic is registered as the "babel" port (UDP port 6696,
see <xref target="RFC8966" sectionFormat="of" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8966#section-5" derivedContent="RFC8966"/>).</t>
        <t indent="0" pn="section-2.1-2">When a Babel node discovers a new neighbour (generally by
receiving an unencrypted multicast Babel packet), it compares the neighbour's
IP address with its own, using network byte ordering.  If a node's
address is lower than the recently discovered neighbour's address, it acts
as a client and connects to the neighbour.  In other words, the node with
the lowest address is the DTLS client for this pairwise relationship.
As an example, fe80::1:2 is considered lower than fe80::2:1.</t>
        <t indent="0" pn="section-2.1-3">The node acting as DTLS client initiates its DTLS connection from an
ephemeral UDP port.  Nodes <bcp14>SHOULD</bcp14> ensure that new client DTLS connections
use different ephemeral ports from recently used connections to allow
servers to differentiate between the new and old DTLS connections.
Alternatively, nodes could use DTLS connection identifiers
<xref target="I-D.ietf-tls-dtls-connection-id" format="default" sectionFormat="of" derivedContent="DTLS-CID"/> as a higher-entropy mechanism to distinguish between
connections.</t>
        <t indent="0" pn="section-2.1-4">When a node receives a new DTLS connection, it <bcp14>MUST</bcp14> verify that the source
IP address is either an IPv6 link-local address or an IPv4 address belonging
to the local network; if it is neither, it <bcp14>MUST</bcp14> reject the
connection.  Nodes use mutual authentication (authenticating
both client and server); clients <bcp14>MUST</bcp14> authenticate servers and servers <bcp14>MUST</bcp14>
authenticate clients.  Implementations <bcp14>MUST</bcp14> support
authenticating peers against a local store of credentials.  If either node
fails to authenticate its peer against its local policy, it <bcp14>MUST</bcp14> abort the DTLS
handshake.  The guidance given in <xref target="BCP195" format="default" sectionFormat="of" derivedContent="BCP195"/> <bcp14>MUST</bcp14> be followed to
avoid attacks on DTLS.  Additionally, nodes <bcp14>MUST</bcp14> only negotiate DTLS version
1.2 or higher.  Nodes <bcp14>MUST</bcp14>
use DTLS replay protection to prevent attackers from replaying stale
information.  Nodes <bcp14>SHOULD</bcp14> drop packets that have been reordered by more than
two IHU (I Heard You) intervals, to avoid letting attackers make stale
information last longer.  If a node receives a new DTLS connection from a
neighbour to whom it already has a connection, the node <bcp14>MUST NOT</bcp14> discard the
older connection until it has completed the handshake of the new one and
validated the identity of the peer.</t>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-2.2">
        <name slugifiedName="name-protocol-encoding">Protocol Encoding</name>
        <t indent="0" pn="section-2.2-1">Babel over DTLS sends all unicast Babel packets protected by DTLS.  The
entire Babel packet, from the Magic byte at the start of the Babel header
to the last byte of the Babel packet trailer, is sent protected by DTLS.</t>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-2.3">
        <name slugifiedName="name-transmission">Transmission</name>
        <t indent="0" pn="section-2.3-1">When sending packets, Babel over DTLS nodes <bcp14>MUST NOT</bcp14> send any TLVs over
the unprotected "babel" port, with the exception of Hello TLVs without the
Unicast flag set.  Babel over DTLS nodes <bcp14>MUST NOT</bcp14> send any unprotected unicast
packets.  This ensures the confidentiality of the information sent in Babel
packets (e.g., the network topology) by only sending it encrypted by DTLS.
Unless some out-of-band neighbour discovery mechanism is available,
nodes <bcp14>SHOULD</bcp14> periodically send unprotected Multicast Hellos to ensure
discovery of new neighbours.  In order to maintain bidirectional reachability,
nodes can either rely entirely on unprotected Multicast Hellos, or send
protected Unicast Hellos in addition to the Multicast Hellos.</t>
        <t indent="0" pn="section-2.3-2">Since Babel over DTLS only protects unicast packets, implementors may
implement Babel over DTLS by modifying an implementation of Babel without DTLS
support and replacing any TLV previously sent over multicast with a separate
TLV sent over unicast for each neighbour.  TLVs previously sent over multicast
can be replaced with the same contents over unicast, with the exception of
Hellos as described above.  Some implementations could also change the contents
of IHU TLVs when converting to unicast in order to remove redundant
information.</t>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-2.4">
        <name slugifiedName="name-reception">Reception</name>
        <t indent="0" pn="section-2.4-1">Babel over DTLS nodes can receive Babel packets either protected over a
DTLS connection or unprotected directly over the "babel" port.  To ensure the
security properties of this mechanism, unprotected packets are treated
differently.  Nodes <bcp14>MUST</bcp14> silently ignore any unprotected packet sent over
unicast.  When parsing an unprotected packet, a node <bcp14>MUST</bcp14> silently
ignore all TLVs that are not of type Hello.  Nodes <bcp14>MUST</bcp14> also silently ignore
any unprotected Hello with the Unicast flag set.  Note that receiving an
unprotected packet can still be used to discover new neighbours, even when
all TLVs in that packet are silently ignored.</t>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-2.5">
        <name slugifiedName="name-neighbour-table-entry">Neighbour Table Entry</name>
        <t indent="0" pn="section-2.5-1">It is <bcp14>RECOMMENDED</bcp14> for nodes to associate the state of their DTLS connection
with their neighbour table.  When a neighbour entry is flushed from the
neighbour table (<xref target="RFC8966" section="A" sectionFormat="of" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8966#appendix-A" derivedContent="RFC8966"/>), its associated
DTLS state <bcp14>SHOULD</bcp14> be discarded.  The node <bcp14>SHOULD</bcp14> send a DTLS close_notify alert
to the neighbour if it believes the link is still viable.</t>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-2.6">
        <name slugifiedName="name-simultaneous-operation-of-b">Simultaneous Operation of Babel over DTLS and Unprotected Babel on a Node</name>
        <t indent="0" pn="section-2.6-1">Implementations <bcp14>MAY</bcp14> implement both Babel over DTLS and unprotected Babel.
Additionally, a node <bcp14>MAY</bcp14> simultaneously run both Babel over DTLS and
unprotected Babel. However, a node running both <bcp14>MUST</bcp14> ensure that it runs
them on separate interfaces, as the security properties of Babel over DTLS
rely on ignoring unprotected Babel packets (other than Multicast Hellos).
An implementation <bcp14>MAY</bcp14> offer configuration options to allow unprotected Babel on
some interfaces but not others, which effectively gives nodes on that interface
the same access as authenticated nodes; however, this <bcp14>SHOULD NOT</bcp14> be done unless that
interface has a mechanism to authenticate nodes at a lower
layer (e.g., IPsec).</t>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-2.7">
        <name slugifiedName="name-simultaneous-operation-of-ba">Simultaneous Operation of Babel over DTLS and Unprotected Babel on a Network</name>
        <t indent="0" pn="section-2.7-1">If Babel over DTLS and unprotected Babel are both operated on the same
network, the Babel over DTLS implementation will receive unprotected Multicast
Hellos and attempt to initiate a DTLS connection.  These connection attempts
can be sent to nodes that only run unprotected Babel, who will not
respond.  Babel over DTLS implementations <bcp14>SHOULD</bcp14> therefore rate-limit their
DTLS connection attempts to avoid causing undue load on the network.</t>
      </section>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-3">
      <name slugifiedName="name-interface-maximum-transmiss">Interface Maximum Transmission Unit Issues</name>
      <t indent="0" pn="section-3-1">Compared to unprotected Babel, DTLS adds header, authentication tag, and
possibly block-size padding overhead to every packet.  This reduces the size of
the Babel payload that can be carried.  This document does not relax the
packet size requirements in <xref target="RFC8966" sectionFormat="of" section="4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8966#section-4" derivedContent="RFC8966"/> but
recommends that DTLS overhead be taken into account when computing maximum
packet size.</t>
      <t indent="0" pn="section-3-2"> More precisely, nodes <bcp14>SHOULD</bcp14> compute the overhead of DTLS depending on
the ciphersuites in use and <bcp14>SHOULD NOT</bcp14> send Babel packets larger than the
interface maximum transmission unit (MTU) minus the overhead of IP, UDP,
and DTLS.  Nodes <bcp14>MUST NOT</bcp14> send Babel packets larger than the attached
interface's MTU adjusted for known lower-layer headers (at least UDP and
IP) or 512 octets, whichever is larger, but not exceeding 2<sup>16</sup> -
1 adjusted for lower-layer headers.  Every Babel speaker <bcp14>MUST</bcp14> be able to
receive packets that are as large as any attached interface's MTU adjusted
for UDP and IP headers or 512 octets, whichever is larger.  Note that this
requirement on reception does not take into account the overhead of DTLS
because the peer may not have the ability to compute the overhead of DTLS,
and the packet may be fragmented by lower layers.</t>
      <t indent="0" pn="section-3-3">Note that distinct DTLS connections can use different ciphers, which can
have different amounts of per-packet overhead.  Therefore, the MTU to one
neighbour can be different from the MTU to another neighbour on the same
link.</t>
    </section>
    <section anchor="iana_considerations" numbered="true" toc="include" removeInRFC="false" pn="section-4">
      <name slugifiedName="name-iana-considerations">IANA Considerations</name>
      <t indent="0" pn="section-4-1">IANA has registered a UDP port
number, called "babel-dtls", for use by Babel over DTLS:
</t>
      <ul empty="true" bare="false" indent="3" spacing="normal" pn="section-4-2">
        <li pn="section-4-2.1">
          <dl spacing="normal" indent="3" newline="false" pn="section-4-2.1.1">
            <dt pn="section-4-2.1.1.1">Service Name:</dt>
            <dd pn="section-4-2.1.1.2"> babel-dtls</dd>
            <dt pn="section-4-2.1.1.3">Port Number:</dt>
            <dd pn="section-4-2.1.1.4"> 6699</dd>
            <dt pn="section-4-2.1.1.5">Transport Protocols:</dt>
            <dd pn="section-4-2.1.1.6"> UDP only</dd>
            <dt pn="section-4-2.1.1.7">Description:</dt>
            <dd pn="section-4-2.1.1.8"> Babel Routing Protocol over DTLS</dd>
            <dt pn="section-4-2.1.1.9">Assignee:</dt>
            <dd pn="section-4-2.1.1.10"> IESG, iesg@ietf.org</dd>
            <dt pn="section-4-2.1.1.11">Contact:</dt>
            <dd pn="section-4-2.1.1.12"> IETF Chair, chair@ietf.org</dd>
            <dt pn="section-4-2.1.1.13">Reference:</dt>
            <dd pn="section-4-2.1.1.14"> RFC 8968</dd>
            <dt pn="section-4-2.1.1.15">Service Code:</dt>
            <dd pn="section-4-2.1.1.16"> None</dd>
          </dl>
        </li>
      </ul>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-5">
      <name slugifiedName="name-security-considerations">Security Considerations</name>
      <t indent="0" pn="section-5-1">A malicious client might attempt to perform a high number of DTLS
handshakes with a server.  As the clients are not uniquely identified
by the protocol until the handshake completes and can be obfuscated with IPv6
temporary addresses, a server needs to mitigate the impact of such an attack.
Note that attackers might attempt to keep in-progress handshakes open for as
long as possible by using variants on the attack commonly known as
Slowloris <xref target="SLOWLORIS" format="default" sectionFormat="of" derivedContent="SLOWLORIS"/>.  Mitigating these attacks might involve
limiting the rate of handshakes from a given subnet or more advanced denial of
service avoidance techniques beyond the scope of this document.</t>
      <t indent="0" pn="section-5-2">Babel over DTLS allows sending Multicast Hellos unprotected; attackers can
therefore tamper with them.  For example, an attacker could send erroneous
values for the Seqno and Interval fields, causing bidirectional
reachability detection to fail.  While implementations <bcp14>MAY</bcp14> use Multicast Hellos
for link quality estimation, they <bcp14>SHOULD</bcp14> also emit protected Unicast Hellos to
prevent this class of denial-of-service attack.</t>
      <t indent="0" pn="section-5-3">While DTLS provides protection against an attacker that replays valid
packets, DTLS is not able to detect when an active on-path attacker intercepts
valid packets and resends them at a later time.  This attack could be used to
make a node believe it has bidirectional reachability to a neighbour even
though that neighbour has disconnected from the network.  To prevent this
attack, nodes <bcp14>MUST</bcp14> discard the DTLS state associated with a neighbour after a
finite time of not receiving valid DTLS packets.  This can be implemented by,
for example, discarding a neighbour's DTLS state when its associated IHU timer
fires. Note that relying solely on the receipt of Hellos is not sufficient as
Multicast Hellos are sent unprotected.  Additionally, an attacker could save
some packets and replay them later in hopes of propagating stale routing
information at a later time.  This can be mitigated by discarding received
packets that have been reordered by more than two IHU intervals.</t>
    </section>
  </middle>
  <back>
    <displayreference target="I-D.ietf-tls-dtls-connection-id" to="DTLS-CID"/>
    <references pn="section-6">
      <name slugifiedName="name-references">References</name>
      <references pn="section-6.1">
        <name slugifiedName="name-normative-references">Normative References</name>
        <reference anchor="BCP195" target="https://www.rfc-editor.org/info/bcp195" quoteTitle="true" derivedAnchor="BCP195">
          <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"/>
        </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="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="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="RFC8966" target="https://www.rfc-editor.org/info/rfc8966" quoteTitle="true" derivedAnchor="RFC8966">
          <front>
            <title>The Babel Routing Protocol</title>
            <author fullname="Juliusz Chroboczek" initials="J." surname="Chroboczek"/>
            <author fullname="David Schinazi" initials="D." surname="Schinazi"/>
            <date month="January" year="2021"/>
          </front>
          <seriesInfo name="RFC" value="8966"/>
          <seriesInfo name="DOI" value="10.17487/RFC8966"/>
        </reference>
      </references>
      <references pn="section-6.2">
        <name slugifiedName="name-informative-references">Informative References</name>
        <reference anchor="I-D.ietf-tls-dtls-connection-id" quoteTitle="true" target="https://tools.ietf.org/html/draft-ietf-tls-dtls-connection-id-08" derivedAnchor="DTLS-CID">
          <front>
            <title>Connection Identifiers for DTLS 1.2</title>
            <author fullname="Eric Rescorla">
              <organization showOnFrontPage="true">RTFM, Inc.</organization>
            </author>
            <author fullname="Hannes Tschofenig">
              <organization showOnFrontPage="true">Arm Limited</organization>
            </author>
            <author fullname="Thomas Fossati">
              <organization showOnFrontPage="true">Arm Limited</organization>
            </author>
            <date month="November" day="2" year="2020"/>
            <abstract>
              <t indent="0">   This document specifies the Connection ID (CID) construct for the
   Datagram Transport Layer Security (DTLS) protocol version 1.2.

   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>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-tls-dtls-connection-id-08"/>
          <format type="TXT" target="https://www.ietf.org/internet-drafts/draft-ietf-tls-dtls-connection-id-08.txt"/>
          <refcontent>Work in Progress</refcontent>
        </reference>
        <reference anchor="RFC7250" target="https://www.rfc-editor.org/info/rfc7250" quoteTitle="true" derivedAnchor="RFC7250">
          <front>
            <title>Using Raw Public Keys in Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS)</title>
            <author initials="P." surname="Wouters" fullname="P. Wouters" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="H." surname="Tschofenig" fullname="H. Tschofenig" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Gilmore" fullname="J. Gilmore">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Weiler" fullname="S. Weiler">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="T." surname="Kivinen" fullname="T. Kivinen">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2014" month="June"/>
            <abstract>
              <t indent="0">This document specifies a new certificate type and two TLS extensions for exchanging raw public keys in Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS).  The new certificate type allows raw public keys to be used for authentication.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7250"/>
          <seriesInfo name="DOI" value="10.17487/RFC7250"/>
        </reference>
        <reference anchor="RFC7918" target="https://www.rfc-editor.org/info/rfc7918" quoteTitle="true" derivedAnchor="RFC7918">
          <front>
            <title>Transport Layer Security (TLS) False Start</title>
            <author initials="A." surname="Langley" fullname="A. Langley">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="N." surname="Modadugu" fullname="N. Modadugu">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="B." surname="Moeller" fullname="B. Moeller">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2016" month="August"/>
            <abstract>
              <t indent="0">This document specifies an optional behavior of Transport Layer Security (TLS) client implementations, dubbed "False Start".  It affects only protocol timing, not on-the-wire protocol data, and can be implemented unilaterally.  A TLS False Start reduces handshake latency to one round trip.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7918"/>
          <seriesInfo name="DOI" value="10.17487/RFC7918"/>
        </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="RFC8094" target="https://www.rfc-editor.org/info/rfc8094" quoteTitle="true" derivedAnchor="RFC8094">
          <front>
            <title>DNS over Datagram Transport Layer Security (DTLS)</title>
            <author initials="T." surname="Reddy" fullname="T. Reddy">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="D." surname="Wing" fullname="D. Wing">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="P." surname="Patil" fullname="P. Patil">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2017" month="February"/>
            <abstract>
              <t indent="0">DNS queries and responses are visible to network elements on the path between the DNS client and its server.  These queries and responses can contain privacy-sensitive information, which is valuable to protect.</t>
              <t indent="0">This document proposes the use of Datagram Transport Layer Security (DTLS) for DNS, to protect against passive listeners and certain active attacks.  As latency is critical for DNS, this proposal also discusses mechanisms to reduce DTLS round trips and reduce the DTLS handshake size.  The proposed mechanism runs over port 853.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8094"/>
          <seriesInfo name="DOI" value="10.17487/RFC8094"/>
        </reference>
        <reference anchor="RFC8967" target="https://www.rfc-editor.org/info/rfc8967" quoteTitle="true" derivedAnchor="RFC8967">
          <front>
            <title>MAC Authentication for the Babel Routing Protocol</title>
            <author initials="C" surname="Dô" fullname="Clara Dô">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="W" surname="Kolodziejak" fullname="Weronika Kolodziejak">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J" surname="Chroboczek" fullname="Juliusz Chroboczek">
              <organization showOnFrontPage="true"/>
            </author>
            <date month="January" year="2021"/>
          </front>
          <seriesInfo name="RFC" value="8967"/>
          <seriesInfo name="DOI" value="10.17487/RFC8967"/>
        </reference>
        <reference anchor="SLOWLORIS" target="https://web.archive.org/web/20150315054838/http://ha.ckers.org/slowloris/" quoteTitle="true" derivedAnchor="SLOWLORIS">
          <front>
            <title>Slowloris HTTP DoS</title>
            <author fullname="RSnake Hansen" initials="R." surname="Hansen"/>
            <date month="June" year="2009"/>
          </front>
        </reference>
      </references>
    </references>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-appendix.a">
      <name slugifiedName="name-performance-considerations">Performance Considerations</name>
      <t indent="0" pn="section-appendix.a-1">To reduce the number of octets taken by the DTLS handshake,
especially the size of the certificate in the ServerHello (which can
be several kilobytes), Babel peers can use raw public keys <xref target="RFC7250" format="default" sectionFormat="of" derivedContent="RFC7250"/> or the Cached Information Extension <xref target="RFC7924" format="default" sectionFormat="of" derivedContent="RFC7924"/>.  The Cached Information Extension avoids
transmitting the server's certificate and certificate chain if the
client has cached that information from a previous TLS handshake.  TLS
False Start <xref target="RFC7918" format="default" sectionFormat="of" derivedContent="RFC7918"/> can reduce round trips by
allowing the TLS second flight of messages (ChangeCipherSpec) to also
contain the (encrypted) Babel packet.</t>
    </section>
    <section numbered="false" toc="include" removeInRFC="false" pn="section-appendix.b">
      <name slugifiedName="name-acknowledgments">Acknowledgments</name>
      <t indent="0" pn="section-appendix.b-1">The authors would like to thank
<contact fullname="Roman Danyliw"/>,
<contact fullname="Donald Eastlake"/>,
<contact fullname="Thomas Fossati"/>,
<contact fullname="Benjamin Kaduk"/>,
<contact fullname="Gabriel Kerneis"/>,
<contact fullname="Mirja Kühlewind"/>,
<contact fullname="Antoni Przygienda"/>,
<contact fullname="Henning Rogge"/>,
<contact fullname="Dan Romascanu"/>,
<contact fullname="Barbara Stark"/>,
<contact fullname="Markus Stenberg"/>,
<contact fullname="Dave Taht"/>,
<contact fullname="Martin Thomson"/>,
<contact fullname="Sean Turner"/>,
and <contact fullname="Martin Vigoureux"/>
for their input and contributions.
The performance considerations in this document were inspired from the ones for
DNS over DTLS <xref target="RFC8094" format="default" sectionFormat="of" derivedContent="RFC8094"/>.</t>
    </section>
    <section anchor="authors-addresses" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.c">
      <name slugifiedName="name-authors-addresses">Authors' Addresses</name>
      <author fullname="Antonin Décimo" initials="A." surname="Décimo">
        <organization showOnFrontPage="true">IRIF, University of Paris-Diderot</organization>
        <address>
          <postal>
            <city>Paris</city>
            <country>France</country>
          </postal>
          <email>antonin.decimo@gmail.com</email>
        </address>
      </author>
      <author fullname="David Schinazi" surname="Schinazi" initials="D.">
        <organization showOnFrontPage="true">Google LLC</organization>
        <address>
          <postal>
            <street>1600 Amphitheatre Parkway</street>
            <city>Mountain View</city>
            <region>CA</region>
            <code>94043</code>
            <country>United States of America</country>
          </postal>
          <email>dschinazi.ietf@gmail.com</email>
        </address>
      </author>
      <author fullname="Juliusz Chroboczek" initials="J." surname="Chroboczek">
        <organization showOnFrontPage="true">IRIF, University of Paris-Diderot</organization>
        <address>
          <postal>
            <street>Case 7014</street>
            <city>Paris CEDEX 13</city>
            <code>75205</code>
            <country>France</country>
          </postal>
          <email>jch@irif.fr</email>
        </address>
      </author>
    </section>
  </back>
</rfc>
