<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC6066 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6066.xml">
<!ENTITY RFC6347 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6347.xml">
<!ENTITY RFC7250 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7250.xml">
<!ENTITY RFC7525 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7525.xml">
<!ENTITY RFC7918 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7918.xml">
<!ENTITY RFC7924 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7924.xml">
<!ENTITY RFC8094 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8094.xml">
<!ENTITY RFC8174 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes"?>
<?rfc tocdepth="2"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="no" ?>
<rfc category="std"
    updates="6126bis"
    obsoletes=""
    docName="draft-decimo-babel-dtls-01"
    ipr="trust200902">
<front>
<title abbrev="Babel over DTLS">Babel Routing Protocol over Datagram
Transport Layer Security</title>
<author fullname="Antonin Decimo" initials="A." surname="Decimo">
<organization>IRIF, University of Paris-Diderot</organization>
<address>
<postal>
<street></street>
<city>Paris</city>
<region></region>
<code></code>
<country>France</country>
</postal>
<email>antonin.decimo@gmail.com</email>
</address>
</author>

<author fullname='David Schinazi' surname='Schinazi' initials='D.'>
<organization>Apple Inc.</organization>
<address>
<postal>
<street>One Apple Park Way</street>
<city>Cupertino</city>
<region>California</region>
<code>95014</code>
<country>USA</country>
</postal>
<email>dschinazi@apple.com</email>
</address>
</author>

<author fullname="Juliusz Chroboczek" initials="J." surname="Chroboczek">
<organization>IRIF, University of Paris-Diderot</organization>
<address>
<postal>
<street>Case 7014</street>
<city>75205 Paris Cedex 13</city>
<region></region>
<code></code>
<country>France</country>
</postal>
<email>jch@irif.fr</email>
</address>
</author>

<date year="2018" />

<abstract>
<t>This documents describes how to use Datagram Transport Layer
Security (DTLS) to secure the Babel Routing Protocol.</t>
</abstract>

</front>

<middle>

<section title="Introduction">

<t>Babel over DTLS is a security protocol for the Babel routing
protocol <xref target="RFC6126bis"/>, that uses Datagram Transport
Layer Security (DTLS) <xref target="RFC6347"/>.  This document
describes how to protect Babel with Babel over DTLS.</t>

<t>The motivation for proposing Babel over DTLS is that DTLS provides
a sub-layer of security that is well-defined, whose security has been
shown, and that has multiple implementations.  Babel over DTLS has the
following properties, inherited from DTLS:
<list style="symbols">
<t>authentication of peers;</t>
<t>integrity of data;</t>
<t>confidentiality of data;</t>
<t>use of asymmetric keys.</t>
</list></t>

<t>The main change to the Babel protocol is that Babel over DTLS
requires most packets to be sent over unicast.</t>

<t>A malicious entity in range of a non-secured deployment of Babel
can learn properties of the network, but also reroute legitimate
traffic by advertising routes with a low metric.</t>

<section title="Specification of Requirements">

<t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP
14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only
when, they appear in all capitals, as shown here.</t>

</section>

</section>

<section title="Operation of the Protocol">

<t>At first sight, there are incompatibilities between Babel and DTLS.
Babel is a pure peer-to-peer protocol, while DTLS is a two parties
client-server protocol.  A Babel implementation typically uses unicast
and multicast, while DTLS can only protect unicast.</t>

<t>The problem of assigning a client of server role for a DTLS
handshake to Babel nodes is solved by a simple arbitrary choice.  The
addresses of the two nodes are compared, and the node with the lowest
address acts as the server.</t>

<t>Babel is sufficiently flexible to work almost without multicast.
In Babel over DTLS, almost all packets are sent via unicast.  Packets
that would have been sent via unicast needs to be duplicated and sent
to all of the original recipients via unicast.  The cost of
duplication is balanced by the fact that on networks with low
throughput, unicast is often far more effective than multicast.  Only
neighbour discovery packets are sent via multicast, as they do not
represent a security threat.</t>

</section>

<section title="Handling protected and unprotected data">

<t>A Babel node needs to receive unprotected data for bootstrapping
reasons, as well as protected data.  Protected and unprotected traffic
needs to be differentiated.</t>
<t>[ NOTE TO READER: AUTHORS ARE CONSIDERING THESE TWO OPTIONS BUT
ONLY ONE WILL BE RETAINED IN THE FINAL DOCUMENT. ]</t>

<section title="Cleartext and DTLS on the same port" anchor="same_ports">

<t>In this approach, Babel and Babel over DTLS traffic is received on
the same port.  The DTLS client port, the DTLS server port, and the
Babel port (6696) are equal.  When a packet is received, it is
unconditionally treated as a DTLS packet and decrypted.
<list style="symbols">
<t>If the decryption is successful, the decrypted content is parsed as
a Babel packet and the node acts on it.</t>
<t>Otherwise, the packet is parsed as a Babel packet and the node MUST
silently ignore all TLVs except Hello and IHU.</t>
</list>
</t>
<t>Since the source port is fixed as 6696, a node that loses its DTLS
state (e.g. if it reboots), will reuse the same source and destination
ports for the new session.  In order to avoid discarding these new
packets, nodes receiving an unexpected DTLS ClientHello MUST proceed
with a new handshake and MUST NOT destroy the existing session until
the new session's handshake completes to avoid denial of service
attacks (Section 4.2.8 of <xref target="RFC6347"/>).</t>

</section>

<section title="Cleartext and DTLS on separate ports" anchor="separate_ports">

<t>In this approach, a different port (number TBD) is allocated by
IANA for Babel over DTLS traffic.  The Babel over DTLS server listens
on this port and Babel over DTLS clients use an ephemeral source port
to initiate outbound DTLS connections.  Unprotected Babel messages are
sent and received over the standard Babel port (6696).  When parsing
unprotected packets, all Babel TLVs except Hello and IHU MUST be
silently ignored.</t>

</section>

</section>

<section title="Establishing and handling Babel over DTLS sessions">

<section title="Session Initiation">

<t>When a node A acquires a new neighbour B (e.g.  when A first
receives a Babel packet from B, see Section 3.4 of <xref
target="RFC6126bis"/>),
<list style="symbols">
<t>if the IP address A uses to send and receive Babel packets is
smaller than the source IP address of the received Babel packet from
B, A initialises its DTLS state as a server for peer B;</t>
<t>otherwise, A initialises its DTLS state as a client for peer B, and
initiates a DTLS handshake.</t>
</list></t>

<t>Once the handshake succeeds and a DTLS session is established,
nodes send all unicast Babel messages over DTLS.</t>

</section>

<section title="Transmission">

<t>Since DTLS cannot secure multicast, nodes SHOULD send all TLVs over
unicast DTLS, if possible.  All TLVs that are not Hello nor IHU MUST
be sent over unicast DTLS.  Hello and IHU TLVs MAY be sent either over
unicast DTLS or unprotected multicast.  Nodes MUST NOT send any
unprotected packets over unicast.</t>

</section>

<section title="Reception">

<t>Packets received over unicast DTLS are parsed the same way as any
packets in the original specification of Babel.  Nodes MUST parse
unprotected packets received over multicast, however they MUST
silently ignore any TLV that is not Hello or IHU.  Unprotected packets
received over unicast MUST be silently ignored.</t>

</section>

<section title="Neighbour flush">

<t>When a neighbour entry is flushed from the neighbour table
(Appendix A of <xref target="RFC6126bis"/>), its associated DTLS state
SHOULD be discarded.  The node MAY send a DTLS close_notify alert to
the neighbour.</t>

</section>

</section>

<section title="Interface MTU Issues">

<t>Compared to normal Babel, DTLS adds at least 13 octets of header,
plus cipher and authentication overhead to every packet.  This reduces
the size of the Babel payload that can be carried.</t>

<t>As stated in Section 4 of <xref target="RFC6126bis"/>, in order to
minimise the number of packets being sent while avoiding lower-layer
fragmentation, a Babel node SHOULD attempt to maximise the size of the
packets it sends, up to the outgoing interface's MTU adjusted for
lower-layer headers (28 octets for UDP over IPv4, 48 octets for UDP
over IPv6).  It MUST NOT send packets larger than the attached
interface's MTU adjusted for lower-layer headers or 512 octets,
whichever is larger, but not exceeding 2^16 - 1 adjusted for
lower-layer headers.  Every Babel speaker MUST be able to receive
packets that are as large as any attached interface's MTU adjusted for
lower-layer headers or 512 octets, whichever is larger.  Babel packets
MUST NOT be sent in IPv6 Jumbograms.</t>

<t>Theses requirements are retained by this specification, but are
extended to take DTLS overhead into account as follows.  The Babel
node MUST ensure that the DTLS datagram size does not exceed the
interface MTU, i.e., each DTLS record MUST fit within a single
datagram, as required by <xref target="RFC6347"/>.  A Babel node MUST
consider the amount of record expansion expected by the DTLS
processing when calculating the maximum size of Babel packet that fits
within the interface MTU.  The overhead can be computed as DTLS
overhead of 13 octets + authentication overhead of the negotiated DTLS
cipher suite + block padding (Section 4.1.1.1 of <xref
target="RFC6347"/>).</t>

</section>

<section title="IANA Considerations">

<t>If the final version of this specification uses the standard Babel
port for unprotected packets and DTLS <xref target="same_ports"/>, no
actions are required from IANA.</t>
<t>If the final version of this specification uses separate ports for
unprotected packets and DTLS <xref target="separate_ports"/>, IANA is
requested to assign a UDP port with label "Babel_DTLS".</t>

</section>

<section title="Security Considerations">

<t>The interaction between two Babel peers requires Datagram Transport
Layer Security (DTLS) with a cipher suite offering confidentiality
protection.  The guidance given in <xref target="RFC7525"/> MUST be
followed to avoid attacks on DTLS.  The DTLS client SHOULD use the TLS
Certificate Status Request extension (Section 8 of <xref
target="RFC6066"/>).</t>

<t>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 and can be obfuscated with IPv4 address sharing and
with IPv6 temporary addresses, a server needs to mitigate the impact
of such an attack.  Such mitigation might involve rate limiting
handshakes from a given subnet or more advanced DoS/DDoS avoidance
techniques beyond the scope of this document.</t>

</section>

</middle>

<back>

<references title="Normative References">

&RFC2119;
&RFC6347;
&RFC8174;

<reference anchor="RFC6126bis"><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="October" year="2017"/></front>
<seriesInfo name="Internet Draft" value="draft-ietf-babel-rfc6126bis-05"/>
</reference>

</references>

<references title="Informative References">

&RFC7250;
&RFC7918;
&RFC7924;
&RFC6066;
&RFC7525;
&RFC8094;

</references>

<section title="Performance Considerations">

<t>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"/> or the Cached Information Extension <xref
target="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"/> can reduce round trips by
allowing the TLS second flight of messages (ChangeCipherSpec) to also
contain the (encrypted) Babel packet.</t>

<t>These performance considerations were inspired from the ones for
DNS over DTLS <xref target="RFC8094"/>.</t>

</section>

</back>

</rfc>
