<?xml version='1.0' encoding='utf-8'?>

<rfc xmlns:xi="http://www.w3.org/2001/XInclude"
     xml:lang="en"
     ipr="pre5378Trust200902"
     submissionType="IETF"
     consensus="true"
     category="std"
     docName="draft-tuexen-tsvwg-rfc6083-bis-01"
     obsoletes="6083"
     version="3"
     tocDepth="1">

<front>
<title abbrev="DTLS for SCTP">
       Datagram Transport Layer Security (DTLS)
       for Stream Control Transmission Protocol (SCTP)
</title>
<seriesInfo name="Internet-Draft" value="draft-tuexen-tsvwg-rfc6083-bis-01"/>

<!-- ************** MICHAEL TUEXEN *************** -->
<author initials="M." surname="Tüxen" fullname="Michael Tüxen">
<organization abbrev="Münster Univ. of Applied Sciences">
              Münster University of Applied Sciences</organization>
<address>
    <postal>
        <street>Stegerwaldstr. 39</street>
        <city>48565 Steinfurt</city>
        <country>Germany</country>
    </postal>
    <email>tuexen@fh-muenster.de</email>
</address>
</author>

<!-- ************** ROBIN SEGGELMANN *************** -->
<author initials="R." surname="Seggelmann" fullname="Robin Seggelmann">
<organization abbrev="Muenster Univ. of Applied Sciences">
              Muenster University of Applied Sciences</organization>
<address>
    <postal>
        <street>Stegerwaldstr. 39</street>
        <city>48565 Steinfurt</city>
        <country>Germany</country>
    </postal>
    <email>seggelmann@fh-muenster.de</email>
</address>
</author>

<!-- ************** ERIC RESCORLA *************** -->
<author initials="E." surname="Rescorla" fullname="Eric Rescorla">
<organization>RTFM, Inc.</organization>
<address>
    <postal>
        <street>2064 Edgewood Drive</street>
        <city>Palo Alto, CA 94303</city>
        <country>USA</country>
    </postal>
    <email>ekr@networkresonance.com</email>
</address>
</author>

<date/>

<abstract>
<t>This document describes the usage of the Datagram Transport Layer
Security (DTLS) protocol over the Stream Control Transmission
Protocol (SCTP).</t>
<t>DTLS over SCTP provides communications privacy for applications that
use SCTP as their transport protocol and allows client/server applications to
communicate in a way that is designed to prevent eavesdropping and
detect tampering or message forgery.</t>
<t>Applications using DTLS over SCTP can use almost all transport
features provided by SCTP and its extensions.</t>
</abstract>

</front>

<middle>
<section>
<name>Introduction</name>
<section>
<name>Overview</name>
<t>This document describes the usage of the Datagram Transport Layer
Security (DTLS) protocol, as defined in
<xref target='RFC4347'/>, over the
Stream Control Transmission Protocol (SCTP), as defined in
<xref target='RFC4960'/>.</t>

<t>DTLS over SCTP provides communications privacy for applications that
use SCTP as their transport protocol and allows client/server applications to
communicate in a way that is designed to prevent eavesdropping and
detect tampering or message forgery.</t>
<t>Applications using DTLS over SCTP can use almost all transport
features provided by SCTP and its extensions.</t>

<t>TLS, from which DTLS was derived, is designed to run on top of a
byte-stream-oriented transport protocol providing a reliable,
in-sequence delivery.
Thus, TLS is currently mainly being used on top of the Transmission Control
Protocol (TCP), as defined in <xref target='RFC0793'/>.</t>

<t>TLS over SCTP as described in <xref target='RFC3436'/>
has some serious limitations:</t>
<ul>
<li><t>It does not support the unordered delivery of SCTP user
 messages.</t></li>
<li><t>It does not support partial reliability as defined in
<xref target='RFC3758'/>.</t></li>
<li><t>It only supports the usage of the same number of streams in both
directions.</t></li>
<li><t>It uses a TLS connection for every bidirectional stream, which requires
a substantial amount of resources and message exchanges if a large number
of streams is used.</t></li>
</ul>

<t>DTLS over SCTP as described in this document overcomes these limitations
of TLS over SCTP. In particular, DTLS/SCTP supports:</t>
<ul>
<li><t>preservation of message boundaries.</t></li>
<li><t>a large number of unidirectional and bidirectional streams.</t></li>
<li><t>ordered and unordered delivery of SCTP user messages.</t></li>
<li><t>the partial reliability extension as defined in
<xref target='RFC3758'/>.</t></li>
<li><t>the dynamic address reconfiguration extension as defined in
<xref target='RFC5061'/>.</t></li>
</ul>

<t>However, the following limitations still apply:</t>
<ul>
<li><t>The maximum user message size is 2<sup>14</sup> bytes, which is the DTLS
limit.</t></li>
<li><t>The DTLS user cannot perform the SCTP-AUTH key management
because this is done by the DTLS layer.</t></li>
</ul>

<t>The method described in this document requires that the SCTP implementation
supports the optional feature of fragmentation of SCTP user messages as
defined in <xref target='RFC4960'/> and the SCTP authentication extension
defined in <xref target='RFC4895'/>.</t>
</section>

<section>
<name>Terminology</name>
<t>This document uses the following terms:</t>
<dl>
<dt>Association:</dt>
<dd><t>An SCTP association.</t></dd>
<dt>Stream:</dt>
<dd><t>A unidirectional stream of an SCTP association.
It is uniquely identified by a stream identifier.</t></dd>
</dl>
</section>

<section>
<name>Abbreviations</name>
<dl>
<dt>DTLS:</dt>
<dd><t>Datagram Transport Layer Security</t></dd>
<dt>MTU:</dt>
<dd><t>Maximum Transmission Unit</t></dd>
<dt>PPID:</dt>
<dd><t>Payload Protocol Identifier</t></dd>
<dt>SCTP:</dt>
<dd><t>Stream Control Transmission Protocol</t></dd>
<dt>TCP:</dt>
<dd><t>Transmission Control Protocol</t></dd>
<dt>TLS:</dt>
<dd><t>Transport Layer Security</t></dd>
</dl>
</section>
</section>

<section>
<name>Conventions</name>
<t>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>MAY</bcp14>",
and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in <xref target='RFC2119'/>.</t>
</section>

<section>
<name>DTLS Considerations</name>

<section>
<name>Version of DTLS</name>
<t>This document is based on <xref target='RFC4347'/>, and it
is expected that DTLS/SCTP as described in this document will
work with future versions of DTLS.</t>
</section>

<section anchor="size">
<name>Message Sizes</name>
<t>DTLS limits the DTLS user message size to the current Path MTU
minus the header sizes.
For the purposes of running over SCTP, the DTLS path MTU <bcp14>MUST</bcp14> be
considered to be 2<sup>14</sup>.</t>
</section>

<section>
<name>Replay Detection</name>
<t>The replay detection of DTLS may result in the DTLS layer dropping messages.
Since DTLS/SCTP provides a reliable service if requested by the application,
replay detection cannot be used.
Therefore, replay detection of DTLS <bcp14>MUST NOT</bcp14> be used.</t>
</section>

<section>
<name>Path MTU Discovery</name>
<t>SCTP provides Path MTU discovery and fragmentation/reassembly for user
messages. According to <xref target="size"/>, DTLS can send maximum sized
messages.
Therefore, Path MTU discovery of DTLS <bcp14>MUST NOT</bcp14> be used.</t>
</section>

<section>
<name>Retransmission of Messages</name>
<t>SCTP provides a reliable and in-sequence transport service for DTLS messages
that require it. See <xref target="stream"/>.
Therefore, DTLS procedures for retransmissions <bcp14>MUST NOT</bcp14> be
used.</t>
</section>
</section>

<section>
<name>SCTP Considerations</name>

<section>
<name>Mapping of DTLS Records</name>
<t>The supported maximum length of SCTP user messages <bcp14>MUST</bcp14> be at
least 2<sup>14</sup> + 2048 + 13 = 18445 bytes (2<sup>14</sup> + 2048 is the
maximum length of the DTLSCiphertext.fragment, and 13 is the size of the
DTLS record header).
In particular, the SCTP implementation <bcp14>MUST</bcp14> support fragmentation
of user messages.</t>
<t>Every SCTP user message <bcp14>MUST</bcp14> consist of exactly one DTLS
record.</t>
</section>

<section>
<name>DTLS Connection Handling</name>
<t>Each DTLS connection <bcp14>MUST</bcp14> be established and terminated
within the same SCTP association.
A DTLS connection <bcp14>MUST NOT</bcp14> span multiple SCTP associations.</t>
</section>

<section>
<name>Payload Protocol Identifier Usage</name>
<t>Application protocols using DTLS over SCTP <bcp14>SHOULD</bcp14>
register and use a separate payload protocol identifier (PPID)
and <bcp14>SHOULD NOT</bcp14> reuse the PPID that they registered for running
directly over SCTP.</t>
<t>Using the same PPID does not harm as long as the application can determine
whether or not DTLS is used.
However, for protocol analyzers, for example, it is much easier if a separate
PPID is used.</t>
<t>This means, in particular, that there is no specific PPID for DTLS.</t>
</section>

<section anchor="stream">
<name>Stream Usage</name>
<t>All DTLS messages of the ChangeCipherSpec, Alert, or Handshake protocol
<bcp14>MUST</bcp14> be transported on stream 0 with unlimited reliability and
with the ordered delivery feature.</t>
<t>DTLS messages of the ApplicationData protocol <bcp14>SHOULD</bcp14> use
multiple streams other than stream 0;
they <bcp14>MAY</bcp14> use stream 0 for everything if they do not care about
minimizing head of line blocking.</t>
</section>

<section>
<name>Chunk Handling</name>
<t>DATA chunks of SCTP <bcp14>MUST</bcp14> be sent in an authenticated way
as described in <xref target='RFC4895'/>.
Other chunks <bcp14>MAY</bcp14> be sent in an authenticated way.
This makes sure that an attacker cannot modify the stream in which a message
is sent or affect the ordered/unordered delivery of the message.</t>
<t>If PR-SCTP as defined in <xref target='RFC3758'/> is used,
FORWARD-TSN chunks <bcp14>MUST</bcp14> also be sent in an authenticated way
as described in <xref target='RFC4895'/>.
This makes sure that it is not possible for an attacker to drop messages and
use forged FORWARD-TSN, SACK, and/or SHUTDOWN chunks to hide this dropping.</t>
</section>

<section>
<name>Renegotiation</name>
<t>DTLS supports renegotiation, and therefore this feature is also
available by DTLS/SCTP.
It is up to the upper layer to use/allow it or not.
Application writers should be aware that allowing renegotiations may result in
changes of security parameters.</t>
</section>

<section>
<name>Handshake</name>
<t>A DTLS implementation discards DTLS messages from older epochs
after some time, as described in Section 4.1 of <xref target='RFC4347'/>.
This is not acceptable when the DTLS user performs a reliable
data transfer.
To avoid discarding messages, the following procedures are required.</t>
<t>Before sending a ChangeCipherSpec message, all outstanding
SCTP user messages <bcp14>MUST</bcp14> have been acknowledged by the SCTP peer
and <bcp14>MUST NOT</bcp14> be revoked by the SCTP peer.</t>
<t>Prior to processing a received ChangeCipherSpec, all other
received SCTP user messages that are buffered in the SCTP layer
<bcp14>MUST</bcp14> be read and processed by DTLS.</t>
<t>User messages that arrive between ChangeCipherSpec and Finished messages
and use the new epoch have probably passed the Finished message
and <bcp14>MUST</bcp14> be buffered by DTLS until the Finished message is
read.</t>
</section>

<section>
<name>Handling of Endpoint-Pair Shared Secrets</name>
<t>The endpoint-pair shared secret for Shared Key Identifier 0
is empty and <bcp14>MUST</bcp14> be used when establishing a DTLS connection.
Whenever the master key changes, a 64-byte shared
secret is derived from every master secret and provided as a new
endpoint-pair shared secret by using the exporter described
in <xref target='RFC5705'/>.
The exporter <bcp14>MUST</bcp14> use the label given in <xref target='iana'/>
and no context.
The new Shared Key Identifier <bcp14>MUST</bcp14> be the old Shared Key
Identifier incremented by 1. If the old one is 65535, the new one
<bcp14>MUST</bcp14> be 1.</t>
<t>Before sending the Finished message, the active SCTP-AUTH key
<bcp14>MUST</bcp14> be switched to the new one.</t>
<t>Once the corresponding Finished message from the peer has
been received, the old SCTP-AUTH key <bcp14>SHOULD</bcp14> be removed.</t>
</section>

<section>
<name>Shutdown</name>
<t>To prevent DTLS from discarding DTLS user messages while it is
shutting down, a CloseNotify message <bcp14>MUST</bcp14> only be sent after
all outstanding SCTP user messages have been acknowledged by the
SCTP peer and <bcp14>MUST NOT</bcp14> still be revoked by the SCTP peer.</t>
<t>Prior to processing a received CloseNotify, all other
received SCTP user messages that are buffered in the SCTP layer
<bcp14>MUST</bcp14> be read and processed by DTLS.</t>
</section>
</section>

<section anchor="iana">
<name>IANA Considerations</name>
<t>IANA added a value to the TLS Exporter Label registry
as described in <xref target='RFC5705'/>.
The label is "EXPORTER_DTLS_OVER_SCTP".</t>
</section>

<section>
<name>Security Considerations</name>
<t>The security considerations given in
<xref target='RFC4347'/>,
<xref target='RFC4895'/>, and
<xref target='RFC4960'/>
also apply to this document.</t>
<t>It is possible to authenticate DTLS endpoints based on IP addresses
in certificates.
SCTP associations can use multiple addresses per SCTP endpoint.
Therefore, it is possible that DTLS records will be sent from a different
IP address than that originally authenticated.
This is not a problem provided that no security decisions are made
based on that IP address.
This is a special case of a general rule: all decisions should be based on
the peer's authenticated identity, not on its transport layer identity.</t>
<t>For each message, the SCTP user also provides a stream
identifier, a flag to indicate whether the message is sent
ordered or unordered, and a payload protocol identifier.
Although DTLS can be used to provide privacy for the actual user message,
none of these three are protected by DTLS.
They are sent as clear text, because they are part of the SCTP DATA chunk
header.</t>
<t>DTLS supports cipher suites that contain a NULL cipher algorithm.
Negotiating a NULL cipher algorithm will not provide communications privacy
for applications and will not provide privacy for user messages.</t>
</section>

<section anchor="acks">
<name>Acknowledgments</name>
<t>The authors wish to thank
Anna Brunstrom,
Lars Eggert,
Gorry Fairhurst,
Ian Goldberg,
Alfred Hoenes,
Carsten Hohendorf,
Stefan Lindskog,
Daniel Mentz,
and Sean Turner
for their invaluable comments.</t>
</section>

</middle>

<back>
<references>
<name>References</name>
<references>
<name>Normative References</name>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3758.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4347.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4895.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4960.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5705.xml"/>
</references>
<references>
<name>Informative References</name>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.0793.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3436.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5061.xml"/>
</references>
</references>
</back>
</rfc>
