<?xml version="1.0" encoding="US-ASCII"?>

<!-- Used v2
-->


<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY __reference.RFC.3550 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3550.xml">
<!ENTITY __reference.RFC.2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY __reference.RFC.1918 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.1918.xml">
<!ENTITY __reference.RFC.4122 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4122.xml">
<!ENTITY __reference.RFC.4193 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4193.xml">
<!ENTITY __reference.RFC.5389 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5389.xml">
<!ENTITY __reference.RFC.3022 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3022.xml">
<!ENTITY __reference.RFC.3711 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3711.xml">
<!ENTITY __reference.RFC.4941 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4941.xml">
<!ENTITY __reference.RFC.4648 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4648.xml">
<!ENTITY __reference.RFC.4634 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4634.xml">
<!ENTITY __reference.RFC.5952 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5952.xml">
<!ENTITY __reference.RFC.5905 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5905.xml">
<!ENTITY __reference.RFC.4291 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4291.xml">
<!ENTITY __reference.RFC.5342 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5342.xml">
<!ENTITY __reference.RFC.6222 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6222.xml">
<!ENTITY __reference.RFC.4086 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4086.xml">
<!ENTITY __reference.RFC.5245 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5245.xml">
<!ENTITY __reference.RFC.5764 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5764.xml">
<!ENTITY __reference.RFC.3261 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3261.xml">

]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc compact="yes"?>
<?rfc subcompact="no" ?>
<?rfc sortrefs="no" ?>
<?rfc tocindent='yes' ?>
<?rfc rfcedstyle="yes" ?>
<rfc submissionType="IETF" consensus="yes" category="std" number="7022" ipr="trust200902"
     obsoletes="6222" updates="3550">
  <front>
    <title abbrev="Choosing an RTCP CNAME">Guidelines for Choosing RTP Control
    Protocol (RTCP) Canonical&nbsp;Names&nbsp;(CNAMEs)</title>

    <author fullname="Ali Begen" initials="A." surname="Begen">
      <organization>Cisco</organization>

      <address>
        <postal>
          <street>181 Bay Street</street>

          <city>Toronto</city>

          <region>ON</region>

          <code>M5J 2T3</code>

          <country>CANADA</country>
        </postal>

        <email>abegen@cisco.com</email>
      </address>
    </author>

    <author fullname="Colin Perkins" initials="C." surname="Perkins">
      <organization abbrev="University of Glasgow">University of
      Glasgow</organization>

      <address>
        <postal>
          <street>School of Computing Science</street>

          <city>Glasgow</city>

          <code>G12 8QQ</code>

          <country>UK</country>
        </postal>

        <email>csp@csperkins.org</email>
      </address>
    </author>

    <author fullname="Dan Wing" initials="D." surname="Wing">
      <organization abbrev="Cisco">Cisco Systems, Inc.</organization>

      <address>
        <postal>
          <street>170 West Tasman Drive</street>

          <city>San Jose</city>

          <region>California</region>

          <code>95134</code>

          <country>USA</country>
        </postal>

        <email>dwing@cisco.com</email>
      </address>
    </author>

    <author fullname="Eric Rescorla" initials="E." surname="Rescorla">
      <organization>RTFM, Inc.</organization>

      <address>
        <postal>
          <street>2064 Edgewood Drive</street>

          <city>Palo Alto</city>

          <region>CA</region>

          <code>94303</code>

          <country>USA</country>
        </postal>

        <phone>+1 650 678 2350</phone>

        <email>ekr@rtfm.com</email>
      </address>
    </author>

    <date month="August" year="2013"/>



    <abstract>
      <t>The RTP Control Protocol (RTCP) Canonical Name (CNAME) is a
      persistent transport-level identifier for an RTP endpoint. While the
      Synchronization Source (SSRC) identifier of an RTP endpoint may change
      if a collision is detected or when the RTP application is restarted, its
      RTCP CNAME is meant to stay unchanged, so that RTP endpoints can be
      uniquely identified and associated with their RTP media streams.</t>

      <t>For proper functionality, RTCP CNAMEs should be unique within the
      participants of an RTP session. However, the existing guidelines for
      choosing the RTCP CNAME provided in the RTP standard (RFC 3550) are insufficient to
      achieve this uniqueness. RFC 6222 was published to update those
      guidelines to allow endpoints to choose unique RTCP CNAMEs.
      Unfortunately, later investigations showed that some parts of the new
      algorithms were unnecessarily complicated and/or ineffective. This
      document addresses these concerns and replaces RFC 6222.</t>
    </abstract>
  </front>

  <middle>
    <section anchor="sec_introduction" title="Introduction">
      <t>In Section 6.5.1 of <xref target="RFC3550"/>, there are a number of
      recommendations for choosing a unique RTCP CNAME for an RTP endpoint.
      However, in practice, some of these methods are not guaranteed to
      produce a unique RTCP CNAME. <xref target="RFC6222"/> updated the
      guidelines for choosing RTCP CNAMEs, superseding those presented in
      Section 6.5.1 of <xref target="RFC3550"/>. Unfortunately, some parts of
      the new algorithms are rather complicated and also produce RTCP CNAMEs
      that, in some cases, are potentially linkable over multiple RTCP sessions
      even if a new RTCP CNAME is generated for each session. This document
      specifies a replacement for the algorithm in Section 5 of <xref
      target="RFC6222"/>, which does not have this limitation and is also
      simpler to implement.</t>

      <t>For a discussion on the linkability of RTCP CNAMEs produced by <xref
      target="RFC6222"/>, refer to <xref
      target="RESCORLA"/>.</t>
    </section>

    <section title="Requirements Notation">
      <t>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 <xref
      target="RFC2119"/>.</t>
    </section>

    <section title="Deficiencies with Earlier Guidelines for Choosing an RTCP CNAME">
      <t>The recommendation in <xref target="RFC3550"/> is to generate an RTCP
      CNAME of the form "user@host" for multiuser systems, or "host" if the
      username is not available. The "host" part is specified to be the fully
      qualified domain name (FQDN) of the host from which the real-time data
      originates. While this guidance was appropriate at the time <xref
      target="RFC3550"/> was written, FQDNs are no longer necessarily unique
      and can sometimes be common across several endpoints in large service
      provider networks. This document replaces the use of the FQDN as an RTCP
      CNAME by alternative mechanisms.</t>

      <t>IPv4 addresses are also suggested for use in RTCP CNAMEs in <xref
      target="RFC3550"/>, where the "host" part of the RTCP CNAME is the
      numeric representation of the IPv4 address of the interface from which
      the RTP data originates. As noted in <xref target="RFC3550"/>, the use
      of private network address space <xref target="RFC1918"/> can result in
      hosts having network addresses that are not globally unique.
      Additionally, this shared use of the same IPv4 address can occur
      with public IPv4 addresses if multiple hosts are assigned the same
      public IPv4 address and are connected to a Network Address Translation (NAT)
      device <xref target="RFC3022"/>. When multiple hosts share the same IPv4
      address, whether private or public, using the IPv4 address as the RTCP
      CNAME leads to RTCP CNAMEs that are not necessarily unique.</t>

      <t>It is also noted in <xref target="RFC3550"/> that if hosts with
      private addresses and no direct IP connectivity to the public Internet
      have their RTP packets forwarded to the public Internet through an
      RTP-level translator, they could end up having non-unique RTCP CNAMEs.
      The suggestion in <xref target="RFC3550"/> is that such applications
      provide a configuration option to allow the user to choose a unique RTCP
      CNAME; this technique puts the burden on the translator to translate
      RTCP CNAMEs from private addresses to public addresses if necessary to
      keep private addresses from being exposed. Experience has shown that
      this does not work well in practice.</t>
    </section>

    <section anchor="sec_cname" title="Choosing an RTCP CNAME">
      <t>It is difficult, and in some cases impossible, for a host to
      determine if there is a NAT between itself and its RTP peer.
      Furthermore, even some public IPv4 addresses can be shared by multiple
      hosts in the Internet. Using the numeric representation of the IPv4
      address as the "host" part of the RTCP CNAME is NOT RECOMMENDED.</t>

      <section anchor="sec_types"
               title="Persistent RTCP CNAMEs versus Per-Session RTCP CNAMEs">
        <t>The RTCP CNAME can be either persistent across different RTP
        sessions for an RTP endpoint or unique per session, meaning that an
        RTP endpoint chooses a different RTCP CNAME for each RTP session.</t>

        <t>An RTP endpoint that is emitting multiple related RTP streams that
        require synchronization at the other endpoint(s) MUST use the same
        RTCP CNAME for all streams that are to be synchronized. This requires
        a short-term, persistent RTCP CNAME that is common across several RTP
        streams, and potentially across several related RTP sessions. A common
        example of such use occurs when syncing audio and video streams in
        a multimedia session, where a single participant has to use the same
        RTCP CNAME for its audio RTP session and for its video RTP session.
        Another example might be to synchronize the layers of a layered audio
        codec, where the same RTCP CNAME has to be used for each layer.</t>

        <t>If the multiple RTP streams in an RTP session are not related, and thus
        do not require synchronization, an RTP endpoint can use different RTCP
        CNAMEs for these streams.</t>

        <t>A longer-term persistent RTCP CNAME is sometimes useful to
        facilitate third-party monitoring, consistent with <xref
        target="RFC3550"/>. One such use might be to allow network management
        tools to correlate the ongoing quality of service for a participant
        across multiple RTP sessions for fault diagnosis and to understand
        long-term network performance statistics. An application developer
        that wishes to discourage this type of third-party monitoring can
        choose to generate a unique RTCP CNAME for each RTP session, or group
        of related RTP sessions, that the application will join. Such a
        per-session RTCP CNAME cannot be used for traffic analysis, and so
        provides some limited form of privacy. Note that there are non-RTP
        means that can be used by a third party to correlate RTP sessions, so
        the use of per-session RTCP CNAMEs will not prevent a determined
        traffic analyst from monitoring such sessions.</t>

        <t>This memo defines several different ways by which an implementation
        can choose an RTCP CNAME. It is possible, and legitimate, for
        independent implementations to make different choices of RTCP CNAME
        when running on the same host.  This can hinder third-party monitoring,
        unless some external means is provided to configure a persistent
        choice of RTCP CNAME for those implementations.</t>

        <t>Note that there is no backwards compatibility issue (with implementations compatible with <xref
        target="RFC3550"/>) introduced in this
        memo, since the RTCP CNAMEs are opaque strings to remote peers.</t>
      </section>

      <section title="Requirements">
        <t>RTP endpoints will choose to generate RTCP CNAMEs that are
        persistent or per-session. An RTP endpoint that wishes to generate a
        persistent RTCP CNAME MUST use one of the following two methods:</t>

        <t><list style="symbols">
            <t>To produce a long-term persistent RTCP CNAME, an RTP endpoint
            MUST generate and store a Universally Unique IDentifier (UUID)
            <xref target="RFC4122"/> for use as the "host" part of its RTCP
            CNAME. The UUID MUST be version 1, 2, or 4, as described in <xref
            target="RFC4122"/>, with the "urn:uuid:" stripped, resulting in a
            36-octet printable string representation.</t>

            <t>To produce a short-term persistent RTCP CNAME, an RTP endpoint
            MUST generate and use an identifier by following the procedure
            described in Section 5. That procedure is performed at least once
            per initialization of the software. After obtaining an identifier,
            minimally the least significant 96 bits SHOULD be converted to
            ASCII using Base64 encoding <xref target="RFC4648"/> (to
            compromise between packet size and uniqueness -- refer to <xref
            target="sec_uniqueness"/>). If 96 bits are used, the resulting
            string will be 16 octets. Note the Base64 encoded value cannot
            exceed the maximum RTCP CNAME length of 255 octets <xref
            target="RFC3550"/>.</t>
          </list></t>

        <t>In the two cases above, the "user@" part of the RTCP CNAME MAY be
        omitted on single-user systems and MAY be replaced by an opaque token
        on multi-user systems, to preserve privacy.</t>

        <t>An RTP endpoint that wishes to generate a per-session RTCP CNAME
        MUST use the following method:</t>

        <t><list style="symbols">
            <t>For every new RTP session, a new RTCP CNAME is generated
            following the procedure described in <xref target="identifier"/>.
            After performing that procedure, minimally the least significant
            96 bits SHOULD be converted to ASCII using Base64 encoding <xref
            target="RFC4648"/>. The RTCP CNAME cannot change over the life of
            an RTP session <xref target="RFC3550"/>. The "user@" part of the
            RTCP CNAME is omitted when generating per&nbhy;session RTCP
            CNAMEs.</t>
          </list></t>

        <t>It is believed that obtaining uniqueness (with a high probability)
        is an important property that requires careful evaluation of the
        method. This document provides a number of methods, at least one of which
   would be suitable for any given deployment scenarios. This document
        therefore does not provide for the implementor to define and select an
        alternative method.</t>

        <t>A future specification might define an alternative method for
        generating RTCP CNAMEs, as long as the proposed method has appropriate
        uniqueness and there is consistency between the methods used for
        multiple RTP sessions that are to be correlated. However, such a
        specification needs to be reviewed and approved before deployment.</t>

        <t>The mechanisms described in this document are to be used to
        generate RTCP CNAMEs, and they are not to be used for generating
        general-purpose unique identifiers.</t>
      </section>
    </section>

    <section anchor="identifier"
             title="Procedure to Generate a Unique Identifier">
      <t>To locally produce a unique identifier, one simply generates a
      cryptographically pseudorandom value as described in <xref
      target="RFC4086"/>. This value MUST be at least 96 bits.</t>

      <t>The biggest bottleneck to implementation of this algorithm is the
      availability of an appropriate cryptographically secure pseudorandom
      number generator (CSPRNG). In any setting that already has a secure
      PRNG, this algorithm described is far simpler than the algorithm
      described in Section 5 of <xref target="RFC6222"/>. SIP stacks <xref
      target="RFC3261"/> are required to use cryptographically random numbers
      to generate To and From tags (Section 19.3). Real-Time Communications on the Web (RTCWEB) implementations
      <xref target="ARCH"/> will need to have secure
      PRNGs to implement ICE <xref target="RFC5245"/> and DTLS-SRTP <xref
      target="RFC5764"/>. And, of course, essentially every Web browser
      already supports TLS, which requires a secure PRNG.</t>
    </section>

    <section anchor="sec_security_considerations"
             title="Security Considerations">
      <t>The security considerations of <xref target="RFC3550"/> apply to this
      memo.</t>

      <section anchor="sec_uniqueness"
               title="Considerations on Uniqueness of RTCP CNAMEs">
        <t>The considerations in this section apply to random RTCP CNAMEs.</t>

        <t>The recommendations given in this document for RTCP CNAME
        generation ensure that a set of cooperating participants in an RTP
        session will, with very high probability, have unique RTCP CNAMEs.
        However, neither <xref target="RFC3550"/> nor this document provides
        any way to ensure that participants will choose RTCP CNAMEs
        appropriately; thus, implementations MUST NOT rely on the
        uniqueness of RTCP CNAMEs for any essential security services. This is
        consistent with <xref target="RFC3550"/>, which does not require that
        RTCP CNAMEs are unique within a session but instead says that
        condition SHOULD hold. As described in the Security Considerations
        section of <xref target="RFC3550"/>, because each participant in a
        session is free to choose its own RTCP CNAME, they can do so in such a
        way as to impersonate another participant. That is, participants are
        trusted not to impersonate each other. No recommendation for
        generating RTCP CNAMEs can prevent this impersonation, because an
        attacker can neglect the stipulation. Secure RTP (SRTP) <xref
        target="RFC3711"/> keeps unauthorized entities out of an RTP session,
        but it does not aim to prevent impersonation attacks from authorized
        entities.</t>

        <t>Because of the properties of the PRNG, there is no significant
        privacy/linkability difference between long and short RTCP CNAMEs.
        However, the requirement to generate unique RTCP CNAMEs implies a
        certain minimum length. A length of 96 bits allows on the order of
        2^{40} RTCP CNAMEs globally before there is a large chance of
        collision (there is about a 50% chance of one collision after 2^{48}
        RTCP CNAMEs).</t>
      </section>

      <section title="Session Correlation Based on RTCP CNAMEs">
        <t>Earlier recommendations for RTCP CNAME generation allowed a fixed
        RTCP CNAME value, which allows an attacker to easily link separate RTP
        sessions, eliminating the obfuscation provided by IPv6 privacy
        addresses <xref target="RFC4941"/> or IPv4 Network Address Port
        Translation (NAPT) <xref target="RFC3022"/>.</t>

        <t>This specification no longer describes a procedure to generate
        fixed RTCP CNAME values, so RTCP CNAME values no longer provide such
        linkage between RTP sessions. This was necessary to eliminate such
        linking by an attacker, but of course complicates linking by traffic
        analysis devices (e.g., devices that are looking for dropped or
        delayed packets).</t>
      </section>
    </section>

    <section title="Acknowledgments">
      <t>Thanks to Marc Petit-Huguenin, who suggested using UUIDs in
      generating RTCP CNAMEs. Also, thanks to David McGrew for providing text
      for the Security Considerations section in RFC 6222.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      &__reference.RFC.3550;

      &__reference.RFC.2119;

      &__reference.RFC.4122;

      &__reference.RFC.4648;


      &__reference.RFC.4086;
    </references>

    <references title="Informative References">
      &__reference.RFC.6222;

      &__reference.RFC.1918;

      &__reference.RFC.3022;

      &__reference.RFC.3711;

      &__reference.RFC.4941;

      &__reference.RFC.5245;

      &__reference.RFC.5764;

      &__reference.RFC.3261;

<!--      &I-D.ietf-rtcweb-security-arch; ID Exists-->



<reference anchor='ARCH'>
<front>
<title>WebRTC Security Architecture</title>

<author initials='E' surname='Rescorla' fullname='Eric Rescorla'>
    <organization />
</author>

<date month='July' day='15' year='2013' />

<abstract><t>The Real-Time Communications on the Web (RTCWEB) working group is tasked with standardizing protocols for enabling real-time communications within user-agents using web technologies (commonly called "WebRTC").  This document defines the security architecture for</t></abstract>

</front>

<seriesInfo name='Work in' value='Progress' />

</reference>


<!--      &I-D.rescorla-avtcore-random-cname; ID Expired-->



<reference anchor='RESCORLA'>
<front>
<title>Random algorithm for RTP CNAME generation</title>

<author initials='E' surname='Rescorla' fullname='Eric Rescorla'>
    <organization />
</author>

<date month='July' day='9' year='2012' />

<abstract><t>RFC 6222 describes a number of mechanisms for generating a unique CNAME Unfortunately, these algorithms are rather complicated and also produce CNAMEs which in some cases are potentially linkable over multiple RTCP sessions even if a new CNAME is generated for each session.  This document specifies a replacement algorithm for the algorithm in Section 5 which does not have this limitation and is also simpler to implement.</t></abstract>

</front>

<seriesInfo name='Work in' value='Progress' />

</reference>

    </references> 
  </back>
</rfc>
