<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd">

<rfc category='std' ipr='trust200902'
     docName='draft-grozev-perc-double-rtx-00'>

<?rfc toc='yes' ?>
<?rfc symrefs='yes' ?>
<?rfc sortrefs='yes'?>
<?rfc iprnotified='no' ?>
<?rfc strict='yes' ?>
<?rfc compact='yes' ?>
  <front>

    <title abbrev='RTX double'>
        Using RTX with Privacy Enhanced RTP Conferencing (PERC)
    </title>
    <author initials='B.' surname='Grozev'
            fullname='Boris Grozev'>
      <organization abbrev='Atlassian'>Atlassian</organization>
      <address>
        <postal>
          <street>303 Colorado Street, #1600</street>
          <city>Austin</city>
          <code>78701</code>
          <country>USA</country>
        </postal>
        <phone>+1-512-640-3000</phone>
        <email>bgrozev@atlassian.com</email>
      </address>
    </author>
    <author initials='E.' surname='Ivov'
            fullname='Emil Ivov'>
      <organization abbrev='Atlassian'>Atlassian</organization>
      <address>
        <postal>
          <street>303 Colorado Street, #1600</street>
          <city>Austin</city>
          <code>78701</code>
          <country>USA</country>
        </postal>
        <phone>+1-512-640-3000</phone>
        <email>eivov@atlassian.com</email>
      </address>
    </author>
    <date />
    <abstract>
      <t>
        This document describes the use of the RTX format for RTP packet
        retransmission in the context of a PERC (Privacy Enhanced RTP
        Conferenceing) conference.
      </t>
    </abstract>
  </front>
  <middle>
    <section title='Introduction'>
      <t>
        In multi-endpoint RTP conferences it is desired for middleboxes (e.g.
        Selecting Forwarding Units (SFUs), or in the case of PERC Media
        Distributors (MDs)) to terminate RTP packet retransmission, because
        this can reduce the retransmission delay and the unnecessary
        retransmission of packets.  In the context of PERC, if RTX is handled
        as a regular media stream, then an MD can not terminate packet
        retransmission.
      </t>
    </section>
    <section title="Terminology">
      <t>
        The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
        NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
        "OPTIONAL" in this document are to be interpreted as described
        in <xref target="RFC2119"/>.
      </t>
    </section>
    <section title='Terminating RTX'>
      <t>
        The RTX format (RFC 4588) uses the first two bytes of the RTP payload
        (the Original Sequence Number field (OSN)) to transport the RTP
        sequence number of the retransmitted packet.
      </t>
      <t>
        If the procedure used for regular media streams is also used for RTX,
        the MD does not have access to the OSN field, because it is E2E
        encrypted as part of the RTP payload, and this prevents it from
        terminating retransmissions.
      </t>
      <t>
        In the context of PERC, RTX should be performed only HBH. That is, the
        payload of the RTX packet must be encrypted with the HBH context, but
        not with the E2E context.
      </t>
      <t>
           Specifically, when an entity retransmits a packet using RTX it:
           <list style="numbers">
             <t>
               Takes an E2E encrypted packet to be retransmitted.
             </t>     
             <t>
               Applies the RTX transformation (replaces the SSRC, payload
               type and sequence number, and inserts the OSN field in the
               payload.
             </t>
             <t>
               Performs the HBH SRTP transformation.
             </t>
           </list>
      </t>
    </section>
    <section title='RTP Padding'>
      <t>
        RFC3550 allows an RTP packet to contain only padding, and no payload.
        The number of padding bytes is contained in the last byte of the
        payload, and it is encrypted by SRTP.
      </t>
      <t>
        In the context of PERC, an MD does not have access to the padding
        length field of an RTX packet, and therefore it can not determine
        whether the packet contains non-padding payload or not.
      </t>
      <t>
        RTX packets with padding only are currently used by some bandwidth
        estimation algorithms when probing for additional bandwidth 
        availability. Bandwidth estimations have a strictly hop-by-hop 
        context, so MDs therefore usually terminate them by recognizing and 
        dropping all incoming probe packets. They then generate new ones 
        for their own estimations. 
      </t>
      <t>           
        In order to recognize an incoming packet as a probe-only one, an MD
        needs to inspect its last octet and compare it to the overall length
        of the payload. Yet, in a PERC scenario this last octet is protected 
        by PERC's end-to-end encryption and will hence be unreadable to the 
        MD. The MD will therefore have no choice but to treat this as a regular
        RTX packet: replace its sequence number, payload type, and SSRC and 
        forward it to receivers that would likely fail in unpredictable ways 
        (e.g., either failing SRTP authentication or maybe even feeding garbage
        data to their decoders).
      </t>
      <t>
        A similar problem also exists for probe packets the the MD generates
        and that receivers have no way to reliably recognize. 
      </t>
      <t>        
        In order for MDs and receivers to properly terminate bandwidth 
        estimation, it is therefore necessary for an MD to reliably recognize 
        such padding-only packets.
      </t>
      <t>
        The use of a single "padding-only" bit in any new or existing RTP 
        header extension is ony way to achieve this. PERC MDs are already
        likely to rely on the framemarking header extension 
        <xref target='I-D.ietf-avtext-framemarking'/> and we propose 
        transporting this bit there. We propose to use the first bit of 
        the unused bits in the format for non-scalable streams,
        which is marked as the P bit in the diagram below.
      </t>
      <t>
        <figure title="Extension Format" anchor="fig-extension-format">
          <artwork>
            <![CDATA[
  0                   1
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  ID=? |  L=0  |S|E|I|D|P 0 0 0|
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            ]]>
          </artwork>
        </figure>  
      </t>

    </section>
    <section title='Security Considerations'>
      <t>
      </t>
    </section>
    <section title='Acknowledgements'>
     <t>   
     </t>
    </section>
  </middle>
  <back>
    <references title='Normative References'>
      <?rfc include="reference.RFC.2119"?>
    </references>
    <references title='Informative References'>
      <?rfc include="reference.RFC.3550"?>
      <?rfc include="reference.RFC.4588"?>
      <?rfc include="reference.RFC.7667"?>
      <reference anchor='I-D.ietf-avtext-framemarking'>
        <front>
          <title>Frame Marking RTP Header Extension</title>
          <author initials='E' surname='Berger' fullname='Espen Berger'>
            <organization />
          </author>
          <author initials='S' surname='Nandakumar' fullname='Suhas Nandakumar'>
            <organization />
          </author>
          <author initials='M' surname='Zanaty' fullname='Mo Zanaty'>
             <organization />
          </author>
          <date month='March' day='13' year='2017' />
          <abstract>
            <t>
              This document describes a Frame Marking RTP header extension used to
              convey information about video frames that is critical for error
              recovery and packet forwarding in RTP middleboxes or network nodes.
              It is most useful when media is encrypted, and essential when the
              middlebox or node has no access to the media decryption keys.  It is
              also useful for codec-agnostic processing of encrypted or unencrypted
              media, while it also supports extensions for codec-specific
              information.
            </t>
          </abstract>
        </front>
        <seriesInfo name='Internet-Draft' value='draft-ietf-avtext-framemarking-04' />
        <format type='HTML'
                target='https://tools.ietf.org/html/draft-ietf-avtext-framemarking-04' />
      </reference>

    </references>
  </back>
</rfc>
