Internet-Draft | DTLS 1.3 for SCTP | July 2023 |
Tüxen & Tschofenig | Expires 11 January 2024 | [Page] |
This document describes the usage of the Datagram Transport Layer Security (DTLS) 1.3 protocol over the Stream Control Transmission Protocol (SCTP).¶
DTLS 1.3 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.¶
Applications using DTLS 1.3 over SCTP can use almost all transport features provided by SCTP and its extensions.¶
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 https://datatracker.ietf.org/drafts/current/.¶
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 11 January 2024.¶
Copyright (c) 2023 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 (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
This document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.¶
This document describes the usage of the Datagram Transport Layer Security (DTLS) 1.3 protocol, as defined in [RFC9147], over the Stream Control Transmission Protocol (SCTP), as defined in [RFC9260].¶
Prior versions of DTLS are out of scope for this document. The use of DTLS 1.0 is described in [RFC6083]. For the rest of the document we assume version 1.3 when referring to DTLS unless the context requires it to refer to a dedicated version.¶
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.¶
Applications using DTLS over SCTP can use almost all transport features provided by SCTP and its extensions.¶
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.¶
TLS over SCTP, as described in [RFC3436], has limitations:¶
It does not support the unordered delivery of SCTP user messages.¶
It does not support partial reliability, as defined in [RFC3758].¶
It only supports the usage of the same number of streams in both directions.¶
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.¶
DTLS over SCTP, as described in this document, overcomes these limitations of TLS over SCTP. This specification supports:¶
preservation of message boundaries.¶
a large number of unidirectional and bidirectional streams.¶
ordered and unordered delivery of SCTP user messages.¶
the partial reliability extension, as defined in [RFC3758].¶
the dynamic address reconfiguration extension, as defined in [RFC5061].¶
The list above matches the design of DTLS over SCTP based on [RFC6083]. This specification relaxes the message size limitation:¶
The TLS protocol imposes a limit on the maximum record size, which is 214 bytes although the length field of the protocol allows messages of 216 - 1 bytes. The record limit extension does, however, allow extensions to extend the maximum record size beyond 214 bytes. This document is such an extension and offers messages of 216 - 1 bytes.¶
However, the following limitation still apply:¶
The DTLS user cannot perform the SCTP-AUTH key management because this is done by the DTLS layer.¶
DTLS establishes session keys for SCTP-AUTH in the same style as [RFC5763] defines how DTLS establishes keys for SRTP. This specification utilizes a new version of SCTP-AUTH, described in [I-D.tuexen-tsvwg-rfc4895-bis] utilizing modern cryptographic algorithms.¶
The method described in this document requires that the SCTP implementation supports the optional feature of fragmentation of SCTP user messages as defined in [RFC9260] and the SCTP authentication extension defined in [I-D.tuexen-tsvwg-rfc4895-bis].¶
The design of this specification is based on the following principles:¶
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 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
This document uses the following terms:¶
An SCTP association.¶
A unidirectional stream of an SCTP association. It is uniquely identified by a stream identifier.¶
This document uses the following terms:¶
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 MUST be considered to be 216 utilizing the flags extension [I-D.ietf-tls-tlsflags] and [RFC8449].¶
The record_size_limit_64kb flag defined in this document is a short- hand version of conveying a value of 216 in the field of the RecordSizeLimit in the "record_size_limit" extension, which is defined in [RFC8449]. The flags extension, defined in [I-D.ietf-tls-tlsflags], offers an indication that a certain optional feature is supported and is used instead of sending the "record_size_limit" extension for what is essentially 1-bit information.¶
The DTLS protocol allows two forms of replay protection: replay detection of handshake messages and replay detection of application data payloads. Handshake messages must be reliably transmitted and replay detection is essential.¶
Contrary to handshake messages, detecting replays of application data messages is optional. If enabled, this replay detection 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 for application data payloads of DTLS MUST NOT be used.¶
SCTP provides Path MTU discovery and fragmentation/reassembly for user messages. Since DTLS can send maximum sized messages Path MTU discovery of DTLS MUST NOT be used.¶
Still, DTLS cannot completely ignore the PMTU for reasons mentioned in Section 4.4 of [RFC9147]. The DTLS record framing expands the datagram size, thus lowering the effective PMTU.¶
As recommended in Section 4.4 of [RFC9147], the DTLS record layer SHOULD also allow the upper layer protocol to discover the amount of record expansion expected by the DTLS processing.¶
SCTP provides a reliable and in-sequence transport service for DTLS messages that require it. Therefore, DTLS procedures for retransmissions MUST NOT be used. For the DTLS stack the appearance is that there is no message loss and consequently no retransmission needed.¶
TLS defines an exporter interface, which is inherited by DTLS. In [RFC8446] the exporter values is computed as:¶
TLS-Exporter(label, context_value, key_length) = HKDF-Expand-Label(Derive-Secret(Secret, label, ""), "exporter", Hash(context_value), key_length)¶
For use with this specification the label MUST be set to "EXPORTER_DTLS13_OVER_SCTP", an empty context_value field and a key length of 64 bytes.¶
The size of a DTLS record header depends on several factors, namely¶
the use of the DTLS Connection ID (CID) feature,¶
the size of the sequence number,¶
the presence of the length field, and¶
the use of padding to conceal the true message length.¶
While the CID needs to be negotiated with the peer, the other parameters can be configured in DTLS stacks. The size of the records can, however, be influenced with the record size limit extension and the flags extension.¶
Hence, an SCTP user application has a number of configuration options to adjust the use of DTLS to best fit a given deployment environment.¶
The supported maximum length of SCTP user messages MUST be at least the size of the maximum size of a DTLSCiphertext. In particular, the SCTP implementation MUST support fragmentation of user messages.¶
Every SCTP user message MUST consist of exactly one DTLS record.¶
Each DTLS connection MUST be established and terminated within the same SCTP association. A DTLS connection MUST NOT span multiple SCTP associations.¶
Application protocols using DTLS over SCTP SHOULD register and use a separate payload protocol identifier (PPID) and SHOULD NOT reuse the PPID that they registered for running directly over SCTP.¶
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.¶
This means, in particular, that there is no specific PPID for DTLS.¶
All DTLS messages except ApplicationData protocol messages MUST be transported on stream 0 with unlimited reliability and with the ordered delivery feature.¶
DTLS messages of the ApplicationData protocol SHOULD use multiple streams other than stream 0; they MAY use stream 0 for everything if they do not care about minimizing head of line blocking.¶
DATA chunks of SCTP MUST be sent in an authenticated way as described in [I-D.tuexen-tsvwg-rfc4895-bis]. Other chunks MAY 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.¶
If PR-SCTP, as defined in [RFC3758], is used, FORWARD-TSN chunks MUST also be sent in an authenticated way, as described in [I-D.tuexen-tsvwg-rfc4895-bis]. 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.¶
DTLS supports post-handshake authentication, and therefore this feature is also available by DTLS/SCTP. It is up to the upper layer to use/allow it or not.¶
TLS 1.3 introduced the KeyUpdate message to indicate that the sender is updating its sending cryptographic keys. DTLS 1.3 consequently also supports this message. In DTLS, an update of traffic keys requires the epoch value to be incremented. Since epoch values are not allowed to wrap, the maximum number of epoch updates is 264 (which includes epoch updates during the handshake itself).¶
When the sender of the KeyUpdate message receives an ACK, it knows that it can safely switch from the old epoch to the new epoch. This is described in Section 8 of [RFC9147]. While DTLS 1.3 will make this switch automatically, the SCTP application using DTLS 1.3 for updating keys used by SCTP-AUTH requires updating keying material. While it is not required to keep the update of SCTP-AUTH keys in sync with the changes of keys at the DTLS layer, it is RECOMMENDED to switch keys for use with SCTP-AUTH once a KeyUpdate message has been successfully transmitted.¶
A DTLS implementation discards DTLS messages from older epochs after some time, as described in [RFC9147]. This is not acceptable when a reliable data transfer is performed.¶
The endpoint-pair shared secret for Shared Key Identifier 0 is empty and MUST be used when establishing a DTLS connection. A new endpoint-pair shared secret MUST be established using the exporter interface defined in [RFC8446], as described in Section 3.6. The new Shared Key Identifier MUST be the old Shared Key Identifier incremented by 1. If the old one is 65535, the new one MUST be 1.¶
Before sending the Finished message, the active SCTP-AUTH key MUST be switched to the new one.¶
Once the corresponding Finished message from the peer has been received, the old SCTP-AUTH key SHOULD be removed.¶
Since KeyUpdate messages are used to change the application traffic keys it is necessary to update the keying material initially exported via the TLS 1.3 exporter interface.¶
The key derivation function MUST be used once the KeyUpdate has been transmitted successfully. The function follows the design of the exporter interface.¶
Derive-Key(label, context_value, key_length) = HKDF-Expand-Label(Derive-Secret(Secret, label, ""), "derive", Hash(context_value), key_length)¶
For use with this specification the label MUST be set to "DERIVE_DTLS13_OVER_SCTP", a context_value field containing a 64 bit sequence number and a key length of 64 bytes. The 64 bit number logically corresponds to the epoch value but there is no requirement for the DTLS stack to expose the epoch value to this key derivation function interfacing the SCTP stack for setting the SCTP-AUTH keying material. The sequence number MUST be increased with every DTLS key update.¶
To prevent DTLS from discarding DTLS user messages while it is shutting down, a close_notify alert MUST only be sent after all outstanding SCTP user messages have been acknowledged by the SCTP peer and MUST NOT still be revoked by the SCTP peer.¶
Prior to processing a received close_notify, all other received SCTP user messages that are buffered in the SCTP layer MUST be read and processed by DTLS.¶
IANA is asked to update in the the TLS Exporter Label registry, which was established in [RFC5705] and updated by [RFC8447], the Reference of the label "EXPORTER_DTLS_OVER_SCTP" to this document.¶
IANA is asked to add a value to the "tls_flags" registry created by [I-D.ietf-tls-tlsflags]:¶
The security considerations given in [RFC4347], [RFC4895], and [RFC9260] also apply to this document.¶
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.¶
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.¶
While TLS 1.3 reduced the number of supported cipher suites and removed a number of cipher suites, including all NULL cipher algorithm. However, [RFC9150] later re-introduced support for cipher suites that do not support confidentiality protection. Negotiating such cipher suites will not provide communications privacy for SCTP applications and will not provide privacy for user messages and MUST NOT be used with this specification.¶
The authors wish to thank Eric Rescorla and Robin Seggelmann for being coauthors on [RFC6083], which is a basis of this document.¶
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 on [RFC6083].¶
Finally, the authors wish to thank Eric Rescorla and Martin Thomson for his invaluable comments on this document.¶