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

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
  <!ENTITY RFC2119 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"> nbsp    "&#160;">
  <!ENTITY RFC3550 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3550.xml"> zwsp   "&#8203;">
  <!ENTITY RFC3711 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3711.xml"> nbhy   "&#8209;">
  <!ENTITY RFC5764 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5764.xml">
<!ENTITY RFC7983 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7983.xml">
<!ENTITY RFC8174 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
<!ENTITY RFC8489 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8489.xml">
<!ENTITY RFC8656 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8656.xml">
<!ENTITY RFC9000 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9000.xml">
<!ENTITY RFC9001 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9001.xml">
<!ENTITY RFC9147 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9147.xml">
<!ENTITY RFC9287 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9287.xml">
<!ENTITY I-D.ietf-avtcore-rtp-over-quic SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-avtcore-rtp-over-quic.xml">
<!ENTITY I-D.ietf-quic-v2 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-quic-v2.xml">
<!ENTITY RFC6189 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6189.xml"> wj     "&#8288;">
]>

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" submissionType="IETF" docName="draft-ietf-avtcore-rfc7983bis-09" category="std" updates="7983, 5764" ipr="trust200902"> consensus="true" docName="draft-ietf-avtcore-rfc7983bis-09" number="9443" updates="5764, 7983" ipr="trust200902" obsoletes="" xml:lang="en" symRefs="true" sortRefs="true" tocInclude="true" version="3">

  <!-- xml2rfc v2v3 conversion 3.17.0 -->
  <!-- Generated by id2xml 1.5.0 on 2023-04-04T22:59:18Z -->
	<?rfc strict="yes"?>
	<?rfc compact="yes"?>
	<?rfc subcompact="no"?>
	<?rfc symrefs="yes"?>
	<?rfc sortrefs="yes"?>
	<?rfc text-list-symbols="o*+-"?>
	<?rfc toc="yes"?>
	<front>
    <title>Multiplexing Scheme Updates for QUIC</title>
    <seriesInfo name="RFC" value="9443"/>
    <author initials="B." surname="Aboba" fullname="Bernard Aboba">
      <organization>Microsoft Corporation</organization>
	<address><postal><street>One
      <address>
        <postal>
          <street>One Microsoft Way</street>
          <city>Redmond</city>
          <region>WA</region>
          <code>98052</code>
          <country>United States of America</country>
        </postal>
        <email>bernard.aboba@gmail.com</email>
      </address>
    </author>
    <author initials="G." surname="Salgueiro" fullname="Gonzalo Salgueiro">
      <organization>Cisco Systems</organization>
	<address><postal><street>7200-12
      <address>
        <postal>
          <street>7200-12 Kit Creek Road</street>
          <city>Research Triangle Park</city>
          <region>NC</region>
          <code>27709</code>
          <country>United States of America</country>
        </postal>
        <email>gsalguei@cisco.com</email>
      </address>
    </author>
    <author initials="C." surname="Perkins" fullname="Colin Perkins">
      <organization abbrev="University of Glasgow">School of Computing Science</organization>
	<address><postal><street>University
      <address>
        <postal>
          <street>University of Glasgow</street>
          <city>Glasgow</city>
          <code>G12 8QQ</code>
          <country>United Kingdom</country>
        </postal>
        <email>csp@csperkins.org</email>
      </address>
    </author>
    <date year="2023" month="April"/> month="July"/>
    <area>art</area>
    <workgroup>avtcore</workgroup>

<!-- [rfced] Please insert any keywords (beyond those that appear in the title) for use on https://www.rfc-editor.org/search. -->

<keyword>example</keyword>

	<abstract><t>

<keyword>RTP</keyword>
<keyword>ZRTP</keyword>
<keyword>STUN</keyword>
<keyword>TURN</keyword>
<keyword>DTLS</keyword>

    <abstract>
      <t>
   RFC 7983 defines a scheme for a Real-time Transport Protocol (RTP)
   receiver to demultiplex Datagram Transport Layer Security (DTLS),
   Session Traversal Utilities for NAT (STUN), Secure Real-time
   Transport Protocol (SRTP) / Secure Real-time Transport Control
   Protocol (SRTCP), ZRTP ZRTP, and Traversal Using Relays around NAT (TURN)
   Channel
   channel packets arriving on a single port.  This document updates RFC
   7983 and RFC 5764 to also allow QUIC packets to be multiplexed on a
   single receiving socket.</t>
    </abstract>
  </front>
  <middle>
    <section title="Introduction" anchor="sect-1"><t> anchor="sect-1" numbered="true" toc="default">
      <name>Introduction</name>
      <t>
   "Multiplexing Scheme Updates for Secure Real-time Transport Protocol (SRTP) Extension for Datagram Transport Layer Security (DTLS)"
   <xref target="RFC7983"/> target="RFC7983" format="default"/> defines a scheme for a Real-time Transport Protocol (RTP)
   <xref target="RFC3550"/> target="RFC3550" format="default"/> receiver to demultiplex DTLS <xref target="RFC9147"/>, target="RFC9147" format="default"/>, Session Traversal
   Utilities for NAT (STUN) <xref target="RFC8489"/>, target="RFC8489" format="default"/>, Secure Real-time Transport
   Protocol (SRTP) / Secure Real-time Transport Control Protocol (SRTCP)
   <xref target="RFC3711"/>, target="RFC3711" format="default"/>, ZRTP <xref target="RFC6189"/> target="RFC6189" format="default"/>, and Traversal Using Relays around NAT
   (TURN) Channel channel packets arriving on a single port. This document
   updates <xref target="RFC7983"/> target="RFC7983" format="default"/> and "Datagram Transport Layer Security (DTLS) Extension to Establish Keys for the Secure Real-time Transport Protocol (SRTP)" <xref target="RFC5764"/> target="RFC5764" format="default"/> to also allow QUIC <xref target="RFC9000"/> target="RFC9000" format="default"/> to be
   multiplexed on the same port.</t>

      <t>
   The multiplexing scheme described in this document supports multiple
   use cases. Peer-to-peer QUIC in In the WebRTC scenarios, scenarios described in <xref target="P2P-QUIC"/> target="P2P-QUIC" format="default"/> and <xref target="P2P-QUIC-TRIAL"/>, target="P2P-QUIC-TRIAL" format="default"/>, SRTP transports audio and video over SRTP,
   alongside QUIC, while peer-to-peer QUIC is used for data exchange.
For this use case, SRTP
   <xref target="RFC3711"/> target="RFC3711" format="default"/> is keyed using DTLS-SRTP <xref target="RFC5764"/> and therefore target="RFC5764" format="default"/>; therefore, SRTP/SRTCP
   <xref target="RFC3550"/>, target="RFC3550" format="default"/>, STUN, TURN, DTLS DTLS, and QUIC need to be multiplexed on the
   same port.  Were SRTP to be keyed using QUIC-SRTP (not yet
   specified), SRTP/SRTCP, STUN, TURN TURN, and QUIC would need to be
   multiplexed on the same port. Where QUIC is used for peer-to-peer
   transport of data as well as RTP/RTCP <xref target="I-D.ietf-avtcore-rtp-over-quic"/> target="I-D.ietf-avtcore-rtp-over-quic" format="default"/>,
   STUN, TURN TURN, and QUIC need to be multiplexed on the same port.</t>
      <t>
   While the scheme described in this document is compatible with QUIC
   version 2 <xref target="I-D.ietf-quic-v2"/>, target="RFC9369" format="default"/>, it is not compatible with QUIC bit
   greasing <xref target="RFC9287"/>. target="RFC9287" format="default"/>.  As a result, endpoints that wish to use
   multiplexing on their socket MUST NOT <bcp14>MUST NOT</bcp14> send the grease_quic_bit
   transport parameter.</t>
      <section title="Terminology" anchor="sect-1.1"><t> anchor="sect-1.1" numbered="true" toc="default">
        <name>Terminology</name>
        <t>
    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", "<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
   "OPTIONAL" "<bcp14>OPTIONAL</bcp14>" in this document are to be
    interpreted as described in BCP
   14 BCP&nbsp;14 <xref target="RFC2119"/> <xref
    target="RFC8174"/> when, and only when, they appear in all capitals, as
    shown here.</t> here.
        </t>
      </section>
    </section>
    <section title="Multiplexing anchor="sect-2" numbered="true" toc="default">
      <name>Multiplexing of TURN Channels" anchor="sect-2"><t> Channels</name>
      <t>
   TURN channels are an optimization where data packets are exchanged
   with a 4-byte prefix instead of the standard 36-byte STUN overhead
   (see Section 3.5 of <xref target="RFC8656"/>). target="RFC8656" sectionFormat="of" section="3.5"/>).  <xref target="RFC7983"/> target="RFC7983" format="default"/> allocates the values from
   64 to 79 in order to allow TURN channels to be demultiplexed when the
   TURN Client client does the channel binding request in combination with the
   demultiplexing scheme described in <xref target="RFC7983"/>.</t> target="RFC7983" format="default"/>.</t>
      <t>
   In the absence of QUIC bit greasing, the first octet of a QUIC packet
   (e.g. a short header packet in QUIC v1 or v2) may fall in the range
   64 to 127, thereby overlapping with the allocated range for TURN
   channels of 64 to 79.  However, in practice this overlap does not
   represent a problem.  TURN channel packets will only be received from
   a TURN server to which TURN allocation and channel-binding requests
   have been sent.  Therefore, a TURN client receiving packets from the
   source IP address and port of a TURN server only needs to
   disambiguate STUN (i.e. (i.e., regular TURN) packets from TURN channel
   packets; (S)RTP, (S)RTCP, ZRTP, DTLS DTLS, or QUIC packets will not be sent
   from a source IP address and port that had previously responded to
   TURN allocation or channel-binding requests.</t>
      <t>
   As a result, if the source IP address and port of a packet does do not
   match that of a responding TURN server, a packet with a first octet
   of 64 to 127 can be unambiguously demultiplexed as QUIC.</t>
    </section>
    <section title="Updates anchor="sect-3" numbered="true" toc="default">
      <name>Updates to RFC 7983" anchor="sect-3"><t> 7983</name>
      <t>
   This document updates the text in Section 7 of <xref target="RFC7983"/> target="RFC7983" sectionFormat="of" section="7"/> (which in
   turn updates <xref target="RFC5764"/>) target="RFC5764" format="default"/>) as follows:</t>
      <t>
   OLD TEXT</t>
      <blockquote>
	<t>
   The process for demultiplexing a packet is as follows.  The receiver
   looks at the first byte of the packet.  If the value of this byte is
   in between 0 and 3 (inclusive), then the packet is STUN.  If the
   value is between 16 and 19 (inclusive), then the packet is ZRTP.  If
   the value is between 20 and 63 (inclusive), then the packet is DTLS.
   If the value is between 64 and 79 (inclusive), then the packet is
   TURN Channel.  If the value is in between 128 and 191 (inclusive),
   then the packet is RTP (or RTCP, if both RTCP and RTP are being
   multiplexed over the same destination port).  If the value does not
   match any known range, then the packet MUST <bcp14>MUST</bcp14> be dropped
   and an alert
   MAY <bcp14>MAY</bcp14> be logged.  This process is summarized
   in Figure 3.</t>

	<figure title="The DTLS-SRTP receiver's packet demultiplexing algorithm." anchor="fig-1"><artwork><![CDATA[
        <artwork name="" type="" align="left" alt=""><![CDATA[
                 +----------------+
                 |        [0..3] -+--> forward to STUN
                 |                |
                 |      [16..19] -+--> forward to ZRTP
                 |                |
     packet -->  |      [20..63] -+--> forward to DTLS
                 |                |
                 |      [64..79] -+--> forward to TURN Channel
                 |                |
                 |    [128..191] -+--> forward to RTP/RTCP
                 +----------------+

Figure 3: The DTLS-SRTP receiver's packet demultiplexing algorithm.

]]></artwork>
	</figure>
      </blockquote>
      <t>END OLD TEXT</t>
      <t>NEW TEXT </t>
<blockquote>
      <t>
   The process for demultiplexing a packet is as follows.  The receiver
   looks at the first byte of the packet.  If the value of this byte is
   between 0 and 3 (inclusive), then the packet is STUN.  If the value
   is between 16 and 19 (inclusive), then the packet is ZRTP.  If the
   value is between 20 and 63 (inclusive), then the packet is DTLS. If
   the value is between 128 and 191 (inclusive) (inclusive), then the packet is RTP
   (or RTCP, if both RTCP and RTP are being multiplexed over the same
   destination port).  If the value is between 80 and 127 (inclusive)
   or between 192 and 255 (inclusive) (inclusive), then the packet is QUIC. If the
   value is between 64 and 79 (inclusive) and the packet has a source
   IP address and port of a responding TURN server, then the packet
   is TURN channel; if the source IP address and port is are not that of
   a responding TURN server, then the packet is QUIC.</t>
      <t>
   If the value does not match any known range, then the packet MUST <bcp14>MUST</bcp14>
   be dropped and an alert MAY <bcp14>MAY</bcp14> be logged. This process is summarized
   in Figure 3.</t>

	<figure title="The receiver's packet demultiplexing algorithm." anchor="fig-2"><artwork><![CDATA[
        <artwork name="" type="" align="left" alt=""><![CDATA[
                +----------------+
                |        [0..3] -+--> forward to STUN
                |                |
                |       [4..15] -+--> DROP
                |                |
                |      [16..19] -+--> forward to ZRTP
                |                |
    packet -->  |      [20..63] -+--> forward to DTLS
                |                |
                |      [64..79] -+--> forward to TURN Channel
                |                | (if from TURN server), else QUIC
                |     [80..127] -+--> forward to QUIC
                |                |
                |    [128..191] -+--> forward to RTP/RTCP
                |                |
                |    [192..255] -+--> forward to QUIC
                +----------------+

     Figure 3: The receiver's packet demultiplexing algorithm.
]]></artwork>
	</figure>
      <t>Note: Endpoints that wish to demultiplex QUIC MUST NOT <bcp14>MUST NOT</bcp14> send the
   grease_quic_bit transport parameter, as described in [RFC9287].</t> <xref target="RFC9287"/>.</t>
</blockquote>
      <t>END NEW TEXT</t>
    </section>
    <section title="Security Considerations" anchor="sect-4"><t> anchor="sect-4" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>
   The solution discussed in this document could potentially introduce
   some additional security issues beyond those described in <xref target="RFC7983"/>. target="RFC7983" format="default"/>.
   These additional concerns are described below.</t>
      <t>
   In order to support multiplexing of QUIC, this document adds logic to
   the scheme defined in <xref target="RFC7983"/>. target="RFC7983" format="default"/>. If mis-implemented, misimplemented, the logic could
   potentially mis-classify misclassify packets, exposing protocol handlers to
   unexpected input.</t>
      <t>
   When QUIC is used solely for data exchange, the TLS-within-QUIC
   exchange <xref target="RFC9001"/> target="RFC9001" format="default"/> derives keys used solely to protect QUIC data
   packets.  If properly implemented, this should not affect the
   transport of SRTP nor or the derivation of SRTP keys via DTLS-SRTP.
   However, if a future specification were to define use of the TLS-
   within-QUIC exchange to derive SRTP keys, both transport and SRTP key
   derivation could be adversely impacted by a vulnerability in the QUIC
   implementation.</t>
    </section>
    <section title="IANA Considerations" anchor="sect-5"><t> anchor="sect-5" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>
   In the TLS ContentType "TLS ContentType" registry, IANA will replace replaced references to RFC
   7983 <xref target="RFC7983"/> with references to this document.</t>
    </section>
  </middle>
  <back>
	<references title="Normative References">
	&RFC2119;
	&RFC3550;
	&RFC3711;
	&RFC5764;
	&RFC7983;
	&RFC8174;
	&RFC8489;
	&RFC8656;
	&RFC9000;
	&RFC9001;
	&RFC9147;
	&RFC9287;

<displayreference target="I-D.ietf-avtcore-rtp-over-quic" to="RTP-OVER-QUIC"/>

    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3550.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3711.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5764.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7983.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8489.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8656.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9000.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9001.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9147.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9287.xml"/>
      </references>
	<references title="Informative References">
	&I-D.ietf-avtcore-rtp-over-quic;
	&I-D.ietf-quic-v2;
	&RFC6189;
      <references>
        <name>Informative References</name>

<!-- [I-D.ietf-avtcore-rtp-over-quic] IESG state I-D Exists -->
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-avtcore-rtp-over-quic.xml"/>

<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9369.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6189.xml"/>

        <reference anchor="P2P-QUIC" target="https://github.com/w3c/p2p-webtransport"><front> target="https://www.w3.org/p2p-webtransport/">
          <front>
            <title>QUIC API For Peer-to-Peer Connections</title>
            <author initials="P." surname="Thatcher" fullname="P. Thatcher">
	</author>
            <author initials="B." surname="Aboba" fullname="B. Aboba">
	</author>
            <author initials="R." surname="Raymond" fullname="R. Raymond">
	</author>
            <date month="23" year="May 2021"/> day="20" month="May" year="2023" />
          </front>

	<seriesInfo name="W3C" value="ORTC
<refcontent>W3C Community Group Draft (work in progress)"/> Report</refcontent>
<refcontent>commit 50d79c0</refcontent>
        </reference>

        <reference anchor="P2P-QUIC-TRIAL" target="https://developers.google.com/web/updates/2019/01/rtcquictransport-api"><front> target="https://developer.chrome.com/blog/rtcquictransport-api/">
          <front>
            <title>RTCQuicTransport Coming to an Origin Trial Near You (Chrome 73)</title>
            <author initials="S." surname="Hampson" fullname="S. Hampson">
	</author>
            <date month="January" year="2019"/>
          </front>
        </reference>
      </references>
    </references>
    <section title="Acknowledgments" numbered="no" anchor="acknowledgments"><t> numbered="false" anchor="acknowledgments" toc="default">
      <name>Acknowledgments</name>
      <t>
   We would like to thank Martin Thomson, Roni Even, Jonathan Lennox <contact fullname="Martin Thomson"/>, <contact fullname="Roni Even"/>, <contact fullname="Jonathan Lennox"/>, and
   other participants in the IETF QUIC and AVTCORE working groups Working Groups for
   their discussion of the QUIC multiplexing issue, and their input
   relating to potential solutions.</t>
    </section>
  </back>
</rfc>