Network Working Group                                          A. Decimo
Internet-Draft                         IRIF, University of Paris-Diderot
Updates: 6126bis (if approved)                               D. Schinazi
Intended status: Standards Track                              Apple Inc.
Expires: February 16, April 11, 2019                                    J. Chroboczek
                                       IRIF, University of Paris-Diderot
                                                         August 15,
                                                         October 8, 2018

     Babel Routing Protocol over Datagram Transport Layer Security


   The Babel Routing Protocol does not contain any means to authenticate
   neighbours or protect messages sent between them.  This documents
   describes how a mechanism to use ensure these properties, using Datagram
   Transport Layer Security
   (DTLS) to secure the Babel Routing Protocol. (DTLS).  This document updates RFC 6126bis.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on February 16, April 11, 2019.

Copyright Notice

   Copyright (c) 2018 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   ( 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.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Specification of Requirements . . . . . . . . . . . . . .   3
   2.  Operation of the Protocol   2
     1.2.  Applicability . . . . . . . . . . . . . . . . . .   3
   3.  Handling protected and unprotected data . . . .   2
   2.  Operation of the Protocol . . . . . . .   3
     3.1.  Cleartext and DTLS on the same port . . . . . . . . . . .   3
     3.2.  Cleartext and
     2.1.  DTLS on separate ports Connection Initiation  . . . . . . . . . .   4
   4.  Establishing and handling Babel over DTLS sessions . . . . .   4
     4.1.  Session Initiation   3
     2.2.  Protocol Encoding . . . . . . . . . . . . . . . . . . . .   4
     2.3.  Transmission  . . . . . . . . . . . . . . . . . . . . . .   4
     2.4.  Reception . . . . . . . . . . . . . . . . . . . . . . . .   5
     4.4.   4
     2.5.  Neighbour flush . . . table entry . . . . . . . . . . . . . . . . . .   5
   5.   4
   3.  Interface MTU Maximum Transmission Unit Issues  . . . . . . . . . . . . . . . . . . . .   5
   4.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   6
   7.   5
   5.  Security Considerations . . . . . . . . . . . . . . . . . . .   6
   8.   5
   6.  References  . . . . . . . . . . . . . . . . . . . . . . . . .   6
     8.1.   5
     6.1.  Normative References  . . . . . . . . . . . . . . . . . .   6
     6.2.  Informative References  . . . . . . . . . . . . . . . . .   7   6
   Appendix A.  Performance Considerations . . . . . . . . . . . . .   7
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .   8   7

1.  Introduction

   The Babel over DTLS is a security protocol for the Babel routing protocol
   [RFC6126bis], that uses Datagram Transport Layer Security (DTLS)
   [RFC6347].  This document describes how Routing Protocol [RFC6126bis] does not contain any means to
   authenticate neighbours or protect Babel with Babel
   over DTLS.

   The motivation for proposing Babel over DTLS is that DTLS provides a
   sub-layer messages sent between them.
   Because of security that this, an attacker is well-defined, whose security has been
   shown, and that has multiple implementations.  Babel over DTLS has
   the following properties, inherited from DTLS:

   o  authentication of peers;

   o  integrity of data;

   o  confidentiality of data;

   o  use of asymmetric keys.

   The main change able to the Babel protocol is that send maliciously crafted
   Babel over DTLS
   requires most packets to be sent over unicast.

   A malicious entity in range of messages which could lead a non-secured deployment of Babel can
   learn properties of the network, but also reroute legitimate network to route traffic
   by advertising routes with to an
   attacker or to an under-resourced target causing denial of service.
   This documents describes a low metric. mechanism to prevent such attacks, using
   Datagram Transport Layer Security (DTLS) [RFC6347].

1.1.  Specification of Requirements

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "OPTIONAL" in this document are to be interpreted as described in BCP
   14 [RFC2119] [RFC8174] when, and only when, they appear in all
   capitals, as shown here.

2.  Operation of the Protocol

   At first sight, there

1.2.  Applicability

   The current two main mechanisms for securing Babel are incompatibilities between Babel over
   DTLS (as described in this document) 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. Cryptographic
   Authentication [BabelHMAC].  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 latter has the two nodes are compared, advantages of being
   simpler and the node with the lowest address
   acts as the server.

   Babel is sufficiently flexible to work almost without multicast.  In
   Babel over not requiring a dependency on DTLS, almost all packets therefore
   implementers are sent via unicast.  Packets
   that would have been sent via unicast needs encouraged to be duplicated and sent consider it in preference to all of the original recipients via unicast.  The cost
   mechanism defined in this document whenever both are applicable to a
   given deployment.  Both mechanisms ensure integrity of
   duplication is balanced by the fact messages and
   prevent message replay.

   However, DTLS offers several features that on networks with low
   throughput, unicast are not provided by Babel
   Cryptographic Authentication, therefore Babel over DTLS is often far more effective than multicast.  Only
   neighbour discovery packets applicable
   in cases where those features are sent needed.  Examples of such features

   o  Asymmetric keys.  DTLS allows authentication via multicast, as they do not
   represent asymmetric keys,
      which allows a security threat.

3.  Handling protected finer granularity of trust per-peer, and unprotected data

   A Babel node needs to receive unprotected data allows for bootstrapping
   reasons, as well as protected

   o  Confidentiality of data.  Protected and unprotected
   traffic needs to be differentiated.


3.1.  Cleartext and  DTLS on encrypts payloads, preventing an
      on-link attacker from observing the same port

   In this approach, Babel and routing table.

2.  Operation of the Protocol

   Babel over DTLS traffic requires changes to how Babel is received on
   the same port.  The operated, for two
   reasons.  Firstly, because DTLS client port, introduces the DTLS server port, concepts of client and the
   server, while Babel port (6696) are equal.  When a packet is received, it is
   unconditionally treated as a peer-to-peer protocol.  Secondly, DTLS packet and decrypted.

   o  If the decryption is successful, the decrypted content is parsed
      as a can
   only protect unicast, while Babel packet TLVs can be sent over both unicast
   and the node acts on it.

   o  Otherwise, the packet is parsed as a multicast.

2.1.  DTLS Connection Initiation

   All Babel packet and the node over DTLS nodes MUST silently ignore all TLVs except Hello and IHU.

   Since the source port is fixed act as 6696, a node that loses its DTLS
   state (e.g. if it reboots), will reuse servers on the same source "babel-
   dtls" port (UDP port TBD), and
   destination ports MUST listen for multicast traffic on
   the unencrypted "babel" port (UDP port 6696).  When a Babel node
   discovers a new session.  In order to avoid discarding
   these new packets, nodes neighbor (generally by receiving an unexpected DTLS ClientHello
   MUST proceed unencrypted
   multicast Babel packet), it compares the neighbour's IPv6 link-local
   address with its own, using network byte ordering.  If a new handshake node's
   address is lower than the recently discovered neighbor's address, it
   acts as a client and MUST NOT destroy connects to the existing
   session until neighbor.  In other words, the
   node with the lowest address is the new session's handshake completes to avoid denial
   of service attacks (Section 4.2.8 of [RFC6347]).

3.2.  Cleartext and DTLS on separate ports

   In client for this approach, a different port (number TBD) pairwise
   relationship.  As an example, fe80::1:2 is allocated by IANA
   for Babel over DTLS traffic. considered lower than
   fe80::2:1.  The Babel over node acting as DTLS server listens on
   this port and Babel over client initiates its DTLS clients use
   connection from an ephemeral source port UDP port.  Nodes SHOULD ensure that new
   client DTLS connections use different ephemeral ports from recently
   used connections to
   initiate outbound allow servers to differentiate between the new
   and old 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.

4.  Establishing a node receives a new DTLS
   connection, it MUST verify the source IP address, and handling reject the
   connection if the address is not an IPv6 link-local address.

2.2.  Protocol Encoding

   Babel over DTLS sessions

4.1.  Session Initiation

   When a node A acquires a new neighbour B (e.g.  when A first receives
   a sends all unicast Babel packet packets encrypted by DTLS.
   The entire Babel packet, from B, see Section 3.4 the Magic byte at the start of [RFC6126bis]),

   o  if the IP address A uses to send and receive
   Babel packets is
      smaller than header to the source IP address last byte of the received Babel packet
      from B, A initialises its DTLS state as a server for peer B;

   o  otherwise, A initialises its DTLS state as a client for peer B,
      and initiates a DTLS handshake.

   Once the handshake succeeds and a DTLS session trailer, is established, nodes
   send all unicast Babel messages over sent
   protected by DTLS.


2.3.  Transmission


   When sending packets, Babel over DTLS cannot secure multicast, nodes SHOULD MUST NOT send all TLVs over
   unicast DTLS, if possible.  All any TLVs that are not Hello nor IHU MUST
   be sent
   over unicast DTLS. the unprotected "babel" port, with the exception of Hello and IHU TLVs MAY be sent either
   without the Unicast flag set.  Babel over unicast DTLS or unprotected multicast.  Nodes nodes MUST NOT send
   any unprotected packets over unicast.

4.3.  Reception

   Packets received unicast packet.  Unless some out-of-band neighbor
   discovery mechanism is available, nodes SHOULD periodically send
   unprotected multicast Hellos to ensure discovery of new neighbours.
   In order to maintain bidirectional reachability, nodes can either
   rely on unprotected multicast Hellos, or also send protected unicast

   Since Babel over DTLS only protects unicast packets, implementors may
   implement Babel over DTLS are parsed the same way as by modifying an unprotected implementation
   of Babel, and replacing any TLV sent over multicast with a separate
   TLV sent over unicast for each neighbour.

2.4.  Reception

   Babel over DTLS nodes can receive Babel packets in either protected over
   a DTLS connection, or unprotected directly over the "babel" port.  To
   ensure the original specification security properties of Babel. this mechanism, unprotected packets
   are treated differently.  Nodes MUST parse silently ignore any unprotected packets received
   packet sent over multicast, however they unicast.  When parsing an unprotected packet, a node
   MUST silently ignore all TLVs that are not of type Hello.  Nodes MUST
   also silently ignore any TLV unprotected Hello with the Unicast flag set.
   Note that is not Hello or IHU.  Unprotected
   packets received over unicast MUST receiving an unprotected packet can still be used to
   discover new neighbors, even when all TLVs in that packet are
   silently ignored.


2.5.  Neighbour flush table entry

   It is RECOMMENDED for nodes to associate the state of their DTLS
   connection with their neighbour table.  When a neighbour entry is
   flushed from the neighbour table (Appendix A of [RFC6126bis]), its
   associated DTLS state SHOULD be discarded.  The node MAY send a DTLS
   close_notify alert to the neighbour.


3.  Interface MTU Maximum Transmission Unit Issues

   Compared to normal unprotected Babel, DTLS adds at least 13 octets of header,
   plus cipher and authentication tag
   and possibly block-size padding overhead to every packet.  This
   reduces the size of the Babel payload that can be carried.

   As stated in Section 4 of [RFC6126bis], in order to minimise the
   number of packets being sent while avoiding lower-layer
   fragmentation, a Babel node  Nodes
   SHOULD attempt to maximise compute the size overhead of DTLS depending on the ciphers in use,
   and SHOULD NOT send Babel packets it sends, up to larger than the outgoing interface's MTU adjusted for
   lower-layer headers (28 octets for UDP over IPv4, 48 octets for interface maximum
   transmission unit (MTU) minus the overhead of lower layers (IP, UDP
   over IPv6).  It
   and DTLS).  This helps reduce the likelihood of lower-layer
   fragmentation which would negatively impact performance and
   reliability.  Nodes MUST NOT 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^16 - 1 adjusted for lower-
   layer 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 UDP and IP headers or 512
   octets, whichever is larger.  Babel packets MUST
   NOT be sent in IPv6 Jumbograms.

   Theses requirements are retained by  Note that this specification, but are
   extended to requirement on reception
   does not take DTLS overhead into account as follows.  The Babel
   node MUST ensure that the overhead of DTLS datagram size does because the peer may
   not exceed have the
   interface MTU, i.e., each DTLS record MUST fit within a single
   datagram, as required by [RFC6347].  A Babel node MUST consider ability to compute the
   amount overhead of record expansion expected by the DTLS processing when
   calculating and the maximum size of Babel packet that fits within the
   interface MTU.  The overhead can
   may be computed as DTLS overhead of 13
   octets + authentication overhead of the negotiated DTLS cipher suite
   + block padding (Section of [RFC6347]).

6.  IANA Considerations

   If the final version of this specification uses the standard fragmented by lower layers.  Babel
   port for unprotected packets and DTLS Section 3.1, no actions are
   required from IANA. MUST NOT be sent in
   IPv6 Jumbograms.

4.  IANA Considerations

   If the final version of this specification uses separate ports for
   unprotected packets and DTLS Section 3.2, document is approved, IANA is requested to assign register a UDP
   port with label "Babel_DTLS".

7. number, called "babel-dtls", for use by Babel over DTLS.

5.  Security Considerations

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

   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 denial of service
   avoidance techniques beyond the scope of this document.


6.  References

6.1.  Normative References

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119,
              DOI 10.17487/RFC2119, March 1997,

              Chroboczek, J. and D. Schinazi, "The Babel Routing
              Protocol", Internet Draft draft-ietf-babel-rfc6126bis-05,
              October 2017.
              May 2018.

   [RFC6347]  Rescorla, E. and N. Modadugu, "Datagram Transport Layer
              Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347,
              January 2012, <>.

   [RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
              2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
              May 2017, <>.


6.2.  Informative References

              Do, C., Kolodziejak, W., and J. Chroboczek, "Babel
              Cryptographic Authentication", Internet Draft draft-ietf-
              babel-hmac-00, August 2018.

   [RFC6066]  Eastlake 3rd, D., "Transport Layer Security (TLS)
              Extensions: Extension Definitions", RFC 6066,
              DOI 10.17487/RFC6066, January 2011,

   [RFC7250]  Wouters, P., Ed., Tschofenig, H., Ed., Gilmore, J.,
              Weiler, S., and T. Kivinen, "Using Raw Public Keys in
              Transport Layer Security (TLS) and Datagram Transport
              Layer Security (DTLS)", RFC 7250, DOI 10.17487/RFC7250,
              June 2014, <>.

   [RFC7525]  Sheffer, Y., Holz, R., and P. Saint-Andre,
              "Recommendations for Secure Use of Transport Layer
              Security (TLS) and Datagram Transport Layer Security
              (DTLS)", BCP 195, RFC 7525, DOI 10.17487/RFC7525, May
              2015, <>.

   [RFC7918]  Langley, A., Modadugu, N., and B. Moeller, "Transport
              Layer Security (TLS) False Start", RFC 7918,
              DOI 10.17487/RFC7918, August 2016,

   [RFC7924]  Santesson, S. and H. Tschofenig, "Transport Layer Security
              (TLS) Cached Information Extension", RFC 7924,
              DOI 10.17487/RFC7924, July 2016,

   [RFC8094]  Reddy, T., Wing, D., and P. Patil, "DNS over Datagram
              Transport Layer Security (DTLS)", RFC 8094,
              DOI 10.17487/RFC8094, February 2017,

Appendix A.  Performance Considerations

   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 [RFC7250]
   or the Cached Information Extension [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 [RFC7918] can reduce round
   trips by allowing the TLS second flight of messages
   (ChangeCipherSpec) to also contain the (encrypted) Babel packet.

   These performance considerations were inspired from the ones for DNS
   over DTLS [RFC8094].

Authors' Addresses

   Antonin Decimo
   IRIF, University of Paris-Diderot


   David Schinazi
   Apple Inc.
   One Apple Park Way
   Cupertino, California  95014

   Juliusz Chroboczek
   IRIF, University of Paris-Diderot
   Case 7014
   75205 Paris Cedex 13