<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.5 (Ruby 3.0.2) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-mattsson-tls-super-jumbo-record-limit-01" category="std" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.20.0 -->
  <front>
    <title>Large Record Sizes for TLS and DTLS</title>
    <seriesInfo name="Internet-Draft" value="draft-mattsson-tls-super-jumbo-record-limit-01"/>
    <author initials="J." surname="Preuß Mattsson" fullname="John Preuß Mattsson">
      <organization>Ericsson</organization>
      <address>
        <email>john.mattsson@ericsson.com</email>
      </address>
    </author>
    <author initials="H." surname="Tschofenig" fullname="Hannes Tschofenig">
      <organization>Siemens</organization>
      <address>
        <email>hannes.tschofenig@gmx.net</email>
      </address>
    </author>
    <author initials="M." surname="Tüxen" fullname="Michael Tüxen">
      <organization>Münster Univ. of Applied Sciences</organization>
      <address>
        <email>tuexen@fh-muenster.de</email>
      </address>
    </author>
    <date year="2024" month="February" day="26"/>
    <area>Security</area>
    <workgroup>Transport Layer Security</workgroup>
    <keyword>next generation</keyword>
    <keyword>unicorn</keyword>
    <keyword>sparkling distributed ledger</keyword>
    <abstract>
      <?line 55?>

<t>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 2<sup>14</sup> 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 2<sup>16</sup> bytes.</t>
    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        The latest revision of this draft can be found at <eref target="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 <eref target="https://datatracker.ietf.org/doc/draft-mattsson-tls-super-jumbo-record-limit/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        Transport Layer Security Working Group mailing list (<eref target="mailto:tls@ietf.org"/>),
        which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/tls/"/>.
        Subscribe at <eref target="https://www.ietf.org/mailman/listinfo/tls/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://github.com/emanjon/tls-super-jumbo-record-limit"/>.</t>
    </note>
  </front>
  <middle>
    <?line 59?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>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 <xref target="RFC8446"/>, that limit is 2<sup>14</sup> = 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).</t>
      <t>The "record_size_limit" extension <xref target="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 <xref target="RFC8446"/>, and DTLS 1.3 <xref target="RFC9147"/>. In some use cases such as DTLS over SCTP <xref target="RFC6083"/> the 2<sup>14</sup> bytes limit is a severe limitation.</t>
      <t>This document defines a "large_record_size" flag extension using the TLS flags extension mechanism <xref target="I-D.ietf-tls-tlsflags"/>. The record size limit extension for TLS as specified in <xref target="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 size of protected records to 2<sup>16</sup> - 1 bytes, which is larger than the default limit of 2<sup>14</sup> bytes. This flag extension is defined for version 1.3 of TLS and DTLS.</t>
    </section>
    <section anchor="terminology">
      <name>Terminology</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>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
      <?line -18?>

</section>
    <section anchor="ex">
      <name>The "large_record_size" Flag Extension</name>
      <t>When the "large_record_size" flag extension in addition to the "record_size_limit" extension is negotiated, an endpoint <bcp14>MUST</bcp14> be prepared to accept protected records with ciphertexts of the negotiated length and protected record with plaintext of the negotiated length of minus the allowed expansion. The maximum length of a protected record plaintext that can be negotiated is therefore 2<sup>16</sup> - 257 = 65279 octets. Unprotected messages are still subject to the lower default limits.</t>
      <t>The "large_record_size" flag extension <bcp14>MUST</bcp14> be negotiated together with the "record_size_limit" extension and <bcp14>MUST NOT</bcp14> be negotiated together with the "max_fragment_length" extension. A client <bcp14>MUST</bcp14> 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 <bcp14>SHOULD</bcp14> generate an "illegal_parameter" alert.</t>
      <t>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.</t>
    </section>
    <section anchor="limits-on-key-usage">
      <name>Limits on Key Usage</name>
      <t>The maximum record size limit is an input to the AEAD limits calculations in TLS 1.3 <xref target="RFC8446"/> and DTLS 1.3 <xref target="RFC9147"/>. Increasing the maximum record size to more than 2<sup>14</sup> + 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 <bcp14>SHALL</bcp14> be decreased by a factor of 4. For example, when AES-CGM is used in TLS 1.3 <xref target="RFC8446"/> with a 64 kB record limit, only 2<sup>22.5</sup> records (about 6 million) may be encrypted on a given connection.</t>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>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.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document registers the following entry to the "TLS Flags" registry defined in <xref target="I-D.ietf-tls-tlsflags"/>:</t>
      <ul spacing="normal">
        <li>
          <t>Value: TBD1</t>
        </li>
        <li>
          <t>Flag Name: large_record_size</t>
        </li>
        <li>
          <t>Messages: CH, EE</t>
        </li>
        <li>
          <t>Recommended: Y</t>
        </li>
        <li>
          <t>Reference: [This document]</t>
        </li>
      </ul>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <reference anchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author fullname="S. Bradner" initials="S." surname="Bradner"/>
            <date month="March" year="1997"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B." surname="Leiba"/>
            <date month="May" year="2017"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
        <reference anchor="RFC8446">
          <front>
            <title>The Transport Layer Security (TLS) Protocol Version 1.3</title>
            <author fullname="E. Rescorla" initials="E." surname="Rescorla"/>
            <date month="August" year="2018"/>
            <abstract>
              <t>This document specifies version 1.3 of the Transport Layer Security (TLS) protocol. TLS allows client/server applications to communicate over the Internet in a way that is designed to prevent eavesdropping, tampering, and message forgery.</t>
              <t>This document updates RFCs 5705 and 6066, and obsoletes RFCs 5077, 5246, and 6961. This document also specifies new requirements for TLS 1.2 implementations.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8446"/>
          <seriesInfo name="DOI" value="10.17487/RFC8446"/>
        </reference>
        <reference anchor="RFC8449">
          <front>
            <title>Record Size Limit Extension for TLS</title>
            <author fullname="M. Thomson" initials="M." surname="Thomson"/>
            <date month="August" year="2018"/>
            <abstract>
              <t>An extension to Transport Layer Security (TLS) is defined that allows endpoints to negotiate the maximum size of protected records that each will send the other.</t>
              <t>This replaces the maximum fragment length extension defined in RFC 6066.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8449"/>
          <seriesInfo name="DOI" value="10.17487/RFC8449"/>
        </reference>
        <reference anchor="RFC9147">
          <front>
            <title>The Datagram Transport Layer Security (DTLS) Protocol Version 1.3</title>
            <author fullname="E. Rescorla" initials="E." surname="Rescorla"/>
            <author fullname="H. Tschofenig" initials="H." surname="Tschofenig"/>
            <author fullname="N. Modadugu" initials="N." surname="Modadugu"/>
            <date month="April" year="2022"/>
            <abstract>
              <t>This document specifies version 1.3 of the Datagram Transport Layer Security (DTLS) protocol. DTLS 1.3 allows client/server applications to communicate over the Internet in a way that is designed to prevent eavesdropping, tampering, and message forgery.</t>
              <t>The DTLS 1.3 protocol is based on the Transport Layer Security (TLS) 1.3 protocol and provides equivalent security guarantees with the exception of order protection / non-replayability. Datagram semantics of the underlying transport are preserved by the DTLS protocol.</t>
              <t>This document obsoletes RFC 6347.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9147"/>
          <seriesInfo name="DOI" value="10.17487/RFC9147"/>
        </reference>
        <reference anchor="I-D.ietf-tls-tlsflags">
          <front>
            <title>A Flags Extension for TLS 1.3</title>
            <author fullname="Yoav Nir" initials="Y." surname="Nir">
              <organization>Dell Technologies</organization>
            </author>
            <date day="23" month="July" year="2023"/>
            <abstract>
              <t>   A number of extensions are proposed in the TLS working group that
   carry no interesting information except the 1-bit indication that a
   certain optional feature is supported.  Such extensions take 4 octets
   each.  This document defines a flags extension that can provide such
   indications at an average marginal cost of 1 bit each.  More
   precisely, it provides as many flag extensions as needed at 4 + the
   order of the last set bit divided by 8.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-tls-tlsflags-12"/>
        </reference>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <reference anchor="RFC6083">
          <front>
            <title>Datagram Transport Layer Security (DTLS) for Stream Control Transmission Protocol (SCTP)</title>
            <author fullname="M. Tuexen" initials="M." surname="Tuexen"/>
            <author fullname="R. Seggelmann" initials="R." surname="Seggelmann"/>
            <author fullname="E. Rescorla" initials="E." surname="Rescorla"/>
            <date month="January" year="2011"/>
            <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. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6083"/>
          <seriesInfo name="DOI" value="10.17487/RFC6083"/>
        </reference>
      </references>
    </references>
    <?line 117?>

<section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>Add your name here.</t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA61Y3XLbNha+51NglZu2a9GVYzuJJk2j+KdxayfZWN5OptPx
QCREISYBLgD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