Network Working Group M. Tüxen Internet-Draft Münster Univ. of Applied Sciences Obsoletes: 6083 (if approved) H. Tschofenig Intended status: Standards Track 10 July 2023 Expires: 11 January 2024 Datagram Transport Layer Security (DTLS) 1.3 for Stream Control Transmission Protocol (SCTP) draft-tuexen-tsvwg-rfc6083-bis-02 Abstract 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. 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 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 Notice Copyright (c) 2023 IETF Trust and the persons identified as the document authors. All rights reserved. Tüxen & Tschofenig Expires 11 January 2024 [Page 1] Internet-Draft DTLS 1.3 for SCTP July 2023 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. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Conventions and Terminology . . . . . . . . . . . . . . . . . 5 3. DTLS 1.3 Considerations . . . . . . . . . . . . . . . . . . . 5 3.1. Version of DTLS . . . . . . . . . . . . . . . . . . . . . 5 3.2. Message Sizes . . . . . . . . . . . . . . . . . . . . . . 5 3.3. Replay Detection . . . . . . . . . . . . . . . . . . . . 6 3.4. Path MTU Discovery . . . . . . . . . . . . . . . . . . . 6 3.5. Retransmission of Messages . . . . . . . . . . . . . . . 6 3.6. Exporter . . . . . . . . . . . . . . . . . . . . . . . . 7 3.7. Application Message Length . . . . . . . . . . . . . . . 7 4. SCTP Considerations . . . . . . . . . . . . . . . . . . . . . 7 4.1. Mapping of DTLS Records . . . . . . . . . . . . . . . . . 7 4.2. DTLS Connection Handling . . . . . . . . . . . . . . . . 7 4.3. Payload Protocol Identifier Usage . . . . . . . . . . . . 8 4.4. Stream Usage . . . . . . . . . . . . . . . . . . . . . . 8 4.5. Chunk Handling . . . . . . . . . . . . . . . . . . . . . 8 4.6. Post-Handshake Authentication . . . . . . . . . . . . . . 8 4.7. Rekeying . . . . . . . . . . . . . . . . . . . . . . . . 9 4.8. Handshake . . . . . . . . . . . . . . . . . . . . . . . . 9 4.9. Handling of Endpoint-Pair Shared Secrets . . . . . . . . 9 4.10. Shutdown . . . . . . . . . . . . . . . . . . . . . . . . 10 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 6. Security Considerations . . . . . . . . . . . . . . . . . . . 10 7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 11 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 11 Tüxen & Tschofenig Expires 11 January 2024 [Page 2] Internet-Draft DTLS 1.3 for SCTP July 2023 8.1. Normative References . . . . . . . . . . . . . . . . . . 11 8.2. Informative References . . . . . . . . . . . . . . . . . 13 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 13 1. Introduction 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. Tüxen & Tschofenig Expires 11 January 2024 [Page 3] Internet-Draft DTLS 1.3 for SCTP July 2023 * 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 2^14 bytes although the length field of the protocol allows messages of 2^16 - 1 bytes. The record limit extension does, however, allow extensions to extend the maximum record size beyond 2^14 bytes. This document is such an extension and offers messages of 2^16 - 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: * Re-use RFC 6083 as much as possible. Large parts of RFC 6083 are re-used. * Focus of DTLS 1.3 and use its features and extensions. * Minimize the implementation effort. * Re-use the SCTP-AUTH extension but utilize a modernized version. Tüxen & Tschofenig Expires 11 January 2024 [Page 4] Internet-Draft DTLS 1.3 for SCTP July 2023 2. Conventions and Terminology 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: Association: An SCTP association. Stream: A unidirectional stream of an SCTP association. It is uniquely identified by a stream identifier. This document uses the following terms: DTLS: Datagram Transport Layer Security MTU: Maximum Transmission Unit PPID: Payload Protocol Identifier SCTP: Stream Control Transmission Protocol TCP: Transmission Control Protocol TLS: Transport Layer Security 3. DTLS 1.3 Considerations 3.1. Version of DTLS This document is based on [RFC9147]. 3.2. Message Sizes 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 2^16 utilizing the flags extension [I-D.ietf-tls-tlsflags] and [RFC8449]. Tüxen & Tschofenig Expires 11 January 2024 [Page 5] Internet-Draft DTLS 1.3 for SCTP July 2023 The record_size_limit_64kb flag defined in this document is a short- hand version of conveying a value of 2^16 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. 3.3. Replay Detection 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. 3.4. Path MTU Discovery 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. 3.5. Retransmission of Messages 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. Tüxen & Tschofenig Expires 11 January 2024 [Page 6] Internet-Draft DTLS 1.3 for SCTP July 2023 3.6. Exporter 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. 3.7. Application Message Length 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. 4. SCTP Considerations 4.1. Mapping of DTLS Records 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. 4.2. DTLS Connection Handling Each DTLS connection MUST be established and terminated within the same SCTP association. A DTLS connection MUST NOT span multiple SCTP associations. Tüxen & Tschofenig Expires 11 January 2024 [Page 7] Internet-Draft DTLS 1.3 for SCTP July 2023 4.3. Payload Protocol Identifier Usage 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. 4.4. Stream Usage 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. 4.5. Chunk Handling 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. 4.6. Post-Handshake Authentication 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. Tüxen & Tschofenig Expires 11 January 2024 [Page 8] Internet-Draft DTLS 1.3 for SCTP July 2023 4.7. Rekeying 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 2^64 (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. 4.8. Handshake 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. 4.9. Handling of Endpoint-Pair Shared Secrets 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. Tüxen & Tschofenig Expires 11 January 2024 [Page 9] Internet-Draft DTLS 1.3 for SCTP July 2023 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. 4.10. Shutdown 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. 5. IANA Considerations 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]: * Value shall be TBD. * Flag Name shall be record_size_limit_64kb. * Message shall be RSL64. * Recommended shall be set to no (N). * Reference: [This RFC] 6. Security Considerations The security considerations given in [RFC4347], [RFC4895], and [RFC9260] also apply to this document. Tüxen & Tschofenig Expires 11 January 2024 [Page 10] Internet-Draft DTLS 1.3 for SCTP July 2023 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. 7. Acknowledgments 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. 8. References 8.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, . Tüxen & Tschofenig Expires 11 January 2024 [Page 11] Internet-Draft DTLS 1.3 for SCTP July 2023 [RFC3758] Stewart, R., Ramalho, M., Xie, Q., Tuexen, M., and P. Conrad, "Stream Control Transmission Protocol (SCTP) Partial Reliability Extension", RFC 3758, DOI 10.17487/RFC3758, May 2004, . [RFC4347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer Security", RFC 4347, DOI 10.17487/RFC4347, April 2006, . [RFC4895] Tuexen, M., Stewart, R., Lei, P., and E. Rescorla, "Authenticated Chunks for the Stream Control Transmission Protocol (SCTP)", RFC 4895, DOI 10.17487/RFC4895, August 2007, . [RFC5705] Rescorla, E., "Keying Material Exporters for Transport Layer Security (TLS)", RFC 5705, DOI 10.17487/RFC5705, March 2010, . [RFC5763] Fischl, J., Tschofenig, H., and E. Rescorla, "Framework for Establishing a Secure Real-time Transport Protocol (SRTP) Security Context Using Datagram Transport Layer Security (DTLS)", RFC 5763, DOI 10.17487/RFC5763, May 2010, . [RFC8449] Thomson, M., "Record Size Limit Extension for TLS", RFC 8449, DOI 10.17487/RFC8449, August 2018, . [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, . [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, . [RFC8447] Salowey, J. and S. Turner, "IANA Registry Updates for TLS and DTLS", RFC 8447, DOI 10.17487/RFC8447, August 2018, . [RFC9147] Rescorla, E., Tschofenig, H., and N. Modadugu, "The Datagram Transport Layer Security (DTLS) Protocol Version 1.3", RFC 9147, DOI 10.17487/RFC9147, April 2022, . Tüxen & Tschofenig Expires 11 January 2024 [Page 12] Internet-Draft DTLS 1.3 for SCTP July 2023 [RFC9150] Cam-Winget, N. and J. Visoky, "TLS 1.3 Authentication and Integrity-Only Cipher Suites", RFC 9150, DOI 10.17487/RFC9150, April 2022, . [RFC9260] Stewart, R., Tüxen, M., and K. Nielsen, "Stream Control Transmission Protocol", RFC 9260, DOI 10.17487/RFC9260, June 2022, . [I-D.tuexen-tsvwg-rfc4895-bis] Tüxen, M., Stewart, R. R., Lei, P., Rescorla, E., and H. Tschofenig, "Authenticated Chunks for the Stream Control Transmission Protocol (SCTP)", Work in Progress, Internet- Draft, draft-tuexen-tsvwg-rfc4895-bis-04, 10 July 2023, . [I-D.ietf-tls-tlsflags] Nir, Y., "A Flags Extension for TLS 1.3", Work in Progress, Internet-Draft, draft-ietf-tls-tlsflags-11, 27 January 2023, . 8.2. Informative References [RFC0793] Postel, J., "Transmission Control Protocol", RFC 793, DOI 10.17487/RFC0793, September 1981, . [RFC3436] Jungmaier, A., Rescorla, E., and M. Tuexen, "Transport Layer Security over Stream Control Transmission Protocol", RFC 3436, DOI 10.17487/RFC3436, December 2002, . [RFC5061] Stewart, R., Xie, Q., Tuexen, M., Maruyama, S., and M. Kozuka, "Stream Control Transmission Protocol (SCTP) Dynamic Address Reconfiguration", RFC 5061, DOI 10.17487/RFC5061, September 2007, . [RFC6083] Tuexen, M., Seggelmann, R., and E. Rescorla, "Datagram Transport Layer Security (DTLS) for Stream Control Transmission Protocol (SCTP)", RFC 6083, DOI 10.17487/RFC6083, January 2011, . Authors' Addresses Tüxen & Tschofenig Expires 11 January 2024 [Page 13] Internet-Draft DTLS 1.3 for SCTP July 2023 Michael Tüxen Münster University of Applied Sciences Stegerwaldstr. 39 48565 Steinfurt Germany Email: tuexen@fh-muenster.de Hannes Tschofenig Email: hannes.tschofenig@gmx.net Tüxen & Tschofenig Expires 11 January 2024 [Page 14]