Internet-Draft Large Record Sizes for TLS and DTLS March 2024
Preuß Mattsson, et al. Expires 5 September 2024 [Page]
Workgroup:
Transport Layer Security
Internet-Draft:
draft-mattsson-tls-super-jumbo-record-limit-02
Published:
Intended Status:
Standards Track
Expires:
Authors:
J. Preuß Mattsson
Ericsson
H. Tschofenig
Siemens
M. Tüxen
Münster Univ. of Applied Sciences

Large Record Sizes for TLS and DTLS

Abstract

RFC 8449 defines a record size limit extension for TLS and DTLS allowing endpoints to negotiate a record size limit smaller than the protocol-defined maximum record size, which is around 214 bytes. This document specifies a TLS flag extension to be used in combination with the record size limit extension allowing endpoints to use a record size limit larger than the protocol-defined maximum record size, but not more than about 216 bytes.

About This Document

This note is to be removed before publishing as an RFC.

The latest revision of this draft can be found at https://emanjon.github.io/tls-super-jumbo-record-limit/draft-mattsson-tls-super-jumbo-record-limit.html. Status information for this document may be found at https://datatracker.ietf.org/doc/draft-mattsson-tls-super-jumbo-record-limit/.

Discussion of this document takes place on the Transport Layer Security Working Group mailing list (mailto:tls@ietf.org), which is archived at https://mailarchive.ietf.org/arch/browse/tls/. Subscribe at https://www.ietf.org/mailman/listinfo/tls/.

Source for this draft and an issue tracker can be found at https://github.com/emanjon/tls-super-jumbo-record-limit.

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 5 September 2024.

Table of Contents

1. Introduction

The records in all versions of TLS have an uint16 length field that could theoretically allow records 65535 octets in size. TLS does however have a lower protocol-defined limit for maximum plaintext record size. For TLS 1.3 [RFC8446], that limit is 214 = 16384 octets. In addition, TLS 1.3 expands the plaintext with 1 octet for content type and allow AEAD expansion up to 255 octets (though typically this expansion is only 16 octets).

The "record_size_limit" extension [RFC8449] enables endpoints to negotiate a lower limit for the maximum plaintext record size, but does not allow endpoints to increase the limits enforced by TLS 1.3 [RFC8446], and DTLS 1.3 [RFC9147]. In some use cases such as DTLS over SCTP [RFC6083] the 214 bytes limit is a severe limitation.

This document defines a "large_record_size" flag extension using the TLS flags extension mechanism [I-D.ietf-tls-tlsflags]. The record size limit extension for TLS as specified in [RFC8449] used in combination with the flag extension defined in this document allow endpoints to negotiate a record size limit larger than the protocol-defined maximum record size. This can be used to bump up the maximum plaintext record size for protected records to 216 - 257 bytes, which is larger than the default limit of 214 bytes. This flag extension is defined for version 1.3 of TLS and DTLS.

2. 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.

3. The "large_record_size" Flag Extension

When the "large_record_size" flag extension in addition to the "record_size_limit" extension is negotiated, an endpoint MUST be prepared to accept protected records with plaintext of the negotiated length. Since the 216 - 1 limit also applies to the ciphertext length, the maximum length of a protected record plaintext that can be negotiated is therefore 216 - 257 = 65279 octets. Unprotected messages are still subject to the lower default limits.

The "large_record_size" flag extension MUST be negotiated together with the "record_size_limit" extension and MUST NOT be negotiated together with the "max_fragment_length" extension. A client MUST treat receipt of the "large_record_size" flags extension without the "record_size_limit" extension or together with the "max_fragment_length" extension as a fatal error, and it SHOULD generate an "illegal_parameter" alert.

During resumption, the record size limit is renegotiated. Records are subject to the limits that were set in the handshake that produces the keys that are used to protect those records. This admits the possibility that the extension might not be negotiated when a connection is resumed.

4. Limits on Key Usage

The maximum record size limit is an input to the AEAD limits calculations in TLS 1.3 [RFC8446] and DTLS 1.3 [RFC9147]. Increasing the maximum record size to more than 214 + 256 bytes while keeping the same confidentiality and integrity advantage per write key therefore requires lower AEAD limits. When the "large_record_size" has been negotiated record size limit larger than the protocol-defined maximum record size, existing AEAD limits SHALL be decreased by a factor of 4. For example, when AES-CGM is used in TLS 1.3 [RFC8446] with a 64 kB record limit, only 222.5 records (about 6 million) may be encrypted on a given connection.

5. Security Considerations

Large record sizes might require more memory allocation for senders and receivers. Large record sizes also means that more processing is done before verification of non-authentic records fails.

6. IANA Considerations

This document registers the following entry to the "TLS Flags" registry defined in [I-D.ietf-tls-tlsflags]:

7. References

7.1. Normative References

[I-D.ietf-tls-tlsflags]
Nir, Y., "A Flags Extension for TLS 1.3", Work in Progress, Internet-Draft, draft-ietf-tls-tlsflags-12, , <https://datatracker.ietf.org/doc/html/draft-ietf-tls-tlsflags-12>.
[RFC2119]
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, , <https://www.rfc-editor.org/rfc/rfc2119>.
[RFC8174]
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, , <https://www.rfc-editor.org/rfc/rfc8174>.
[RFC8446]
Rescorla, E., "The Transport Layer Security (TLS) Protocol Version 1.3", RFC 8446, DOI 10.17487/RFC8446, , <https://www.rfc-editor.org/rfc/rfc8446>.
[RFC8449]
Thomson, M., "Record Size Limit Extension for TLS", RFC 8449, DOI 10.17487/RFC8449, , <https://www.rfc-editor.org/rfc/rfc8449>.
[RFC9147]
Rescorla, E., Tschofenig, H., and N. Modadugu, "The Datagram Transport Layer Security (DTLS) Protocol Version 1.3", RFC 9147, DOI 10.17487/RFC9147, , <https://www.rfc-editor.org/rfc/rfc9147>.

7.2. Informative References

[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, , <https://www.rfc-editor.org/rfc/rfc6083>.

Acknowledgments

The authors would like to thank Benjamin Kaduk for his valuable comments and feedback.

Authors' Addresses

John Preuß Mattsson
Ericsson
Hannes Tschofenig
Siemens
Michael Tüxen
Münster Univ. of Applied Sciences