RFC 7022

Guidelines for Choosing RTP Control Protocol (RTCP) Canonical Names (CNAMEs)

πŸ“… published September 2013, from ietf

Guidelines for Choosing RTP Control Protocol (RTCP) Canonical Names (CNAMEs) πŸŽ€

Okay bestie, RFC 7022 is the one! πŸ¦‹ It's a Standards Track document, so this is official Internet protocol stuff, not just vibes πŸ‘‘ It came out in September 2013, and its ISSN is 2070-1721.

The authors are A. Begen (Cisco), C. Perkins (University of Glasgow), D. Wing (Cisco), and E. Rescorla (RTFM, Inc.) πŸ’œ It's the Internet Engineering Task Force (IETF) that put it out, and the Request for Comments number is 7022 ✨

Two things it does to the older docs: it obsoletes RFC 6222 (so it replaces that one πŸ’…) and it updates RFC 3550 🌸

Abstract

Okay so the RTCP CNAME is basically a persistent name tag for an RTP endpoint 🏷️ The SSRC can change if a collision is detected or the RTP app restarts, but the CNAME is meant to stay the same, so endpoints can be uniquely identified and matched up with their RTP media streams. It's giving continuity! ✨

For this to work properly, CNAMEs should be unique among the participants of an RTP session. The old guidance in RFC 3550 just isn't enough to make that happen 😭 RFC 6222 came along to update those guidelines so endpoints could pick unique CNAMEs. Then later it turned out some parts of the new algorithms were unnecessarily complicated and/or ineffective πŸ’€ This doc fixes those concerns and replaces RFC 6222. Periodt πŸ’…

Status of This Memo

This is an Internet Standards Track document.

This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 5741 🫢

Info about the current status of this document, any errata, and how to send feedback on it can be found at http://www.rfc-editor.org/info/rfc7022 🌈

Copyright (c) 2013 IETF Trust and the persons identified as the document authors. All rights reserved. πŸ”’

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, since they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions, and they are provided without warranty as described in the Simplified BSD License πŸ“œ

Table of Contents 🧚

1. Introduction ....................................................2
2. Requirements Notation ...........................................3
3. Deficiencies with Earlier Guidelines for Choosing an
   RTCP CNAME ......................................................3
4. Choosing an RTCP CNAME ..........................................4
   4.1. Persistent RTCP CNAMEs versus Per-Session RTCP CNAMEs ......4
   4.2. Requirements ...............................................5
5. Procedure to Generate a Unique Identifier .......................6
6. Security Considerations .........................................7
   6.1. Considerations on Uniqueness of RTCP CNAMEs ................7
   6.2. Session Correlation Based on RTCP CNAMEs ...................7
7. Acknowledgments .................................................8
8. References ......................................................8
   8.1. Normative References .......................................8
   8.2. Informative References .....................................8

1. Introduction ✨

Okay so Section 6.5.1 of [RFC3550] has a bunch of recommendations for picking a unique RTCP CNAME for an RTP endpoint πŸ“ But in practice, some of those methods don't actually guarantee a unique RTCP CNAME πŸ™ˆ [RFC6222] updated the guidelines for choosing RTCP CNAMEs and superseded the ones in Section 6.5.1 of [RFC3550]. Unfortunately, some parts of the new algorithms are pretty complicated, and they also produce RTCP CNAMEs that can sometimes be linkable across multiple RTCP sessions, even when a new RTCP CNAME gets generated for each session 😬 This document specifies a replacement for the algorithm in Section 5 of [RFC6222]. It doesn't have that limitation and it's also simpler to implement πŸ¦‹

If you want the tea on how RTCP CNAMEs produced by [RFC6222] can be linked, check out [RESCORLA] 🍡

2. Requirements Notation πŸ’…

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 [RFC2119] πŸ“–

3. Deficiencies with Earlier Guidelines for Choosing an RTCP CNAME 🌸

The advice in [RFC3550] is to generate an RTCP CNAME in the form "user@host" for multiuser systems, or just "host" if the username isn't available πŸ§‘β€πŸ’» The "host" part is supposed to be the fully qualified domain name (FQDN) of the host the real-time data comes from. That was a fine call when [RFC3550] was written, but FQDNs aren't necessarily unique anymore, and they can sometimes be shared across several endpoints in big service provider networks 😡 This document replaces using the FQDN as an RTCP CNAME with other mechanisms.

[RFC3550] also suggests using IPv4 addresses in RTCP CNAMEs, where the "host" part is the numeric representation of the IPv4 address of the interface the RTP data comes from. As [RFC3550] points out, using private network address space [RFC1918] can leave hosts with network addresses that aren't globally unique πŸ™ƒ It can also happen with public IPv4 addresses, if several hosts get assigned the same public IPv4 address and are connected to a Network Address Translation (NAT) device [RFC3022]. When multiple hosts share the same IPv4 address, whether it's private or public, using that address as the RTCP CNAME gives you RTCP CNAMEs that aren't necessarily unique πŸ’€

[RFC3550] also notes 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 with non-unique RTCP CNAMEs 🫠 The suggestion there is for such applications to offer a configuration option so the user can pick a unique RTCP CNAME. That technique puts the burden on the translator to convert RTCP CNAMEs from private addresses to public addresses when needed, so private addresses don't get exposed. Experience has shown this doesn't work well in practice 🚫

4. Choosing an RTCP CNAME πŸŽ€

It's hard, and sometimes straight-up impossible, for a host to tell whether there's a NAT between itself and its RTP peer πŸ•΅οΈ Plus, even some public IPv4 addresses can be shared by multiple hosts on the Internet. So using the numeric representation of the IPv4 address as the "host" part of the RTCP CNAME is NOT RECOMMENDED πŸ™…β€β™€οΈ

4.1. Persistent RTCP CNAMEs versus Per-Session RTCP CNAMEs πŸ§šβ€β™€οΈ

The RTCP CNAME can either persist across different RTP sessions for an RTP endpoint, or be unique per session, which means an RTP endpoint picks a different RTCP CNAME for each RTP session ✨

An RTP endpoint that's sending multiple related RTP streams that need synchronization at the other endpoint(s) MUST use the same RTCP CNAME for all the streams that are meant to be synced 🫢 That calls for a short-term, persistent RTCP CNAME shared across several RTP streams, and maybe across several related RTP sessions too. A super common example is syncing audio and video in a multimedia session, where one participant has to use the same RTCP CNAME for its audio RTP session and its video RTP session 🎬 Another example is syncing the layers of a layered audio codec, where the same RTCP CNAME has to be used for each layer 🎢

If the multiple RTP streams in an RTP session aren't related, and therefore don't need synchronization, an RTP endpoint can use different RTCP CNAMEs for them πŸ’…

A longer-term persistent RTCP CNAME is sometimes useful for third-party monitoring, in line with [RFC3550] πŸ‘€ For example, network management tools might use it to correlate a participant's ongoing quality of service across multiple RTP sessions, for fault diagnosis and to understand long-term network performance stats πŸ“Š An application developer who wants to discourage this kind 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 joins πŸ™Š A per-session RTCP CNAME can't be used for traffic analysis, so it offers some limited form of privacy πŸ” Just note that there are non-RTP ways a third party can correlate RTP sessions, so per-session RTCP CNAMEs won't stop a determined traffic analyst from monitoring those sessions πŸ•΅οΈβ€β™€οΈ

This memo defines several different ways an implementation can choose an RTCP CNAME 🌈 It's possible, and totally legit, for independent implementations to make different RTCP CNAME choices when they run on the same host. That can make third-party monitoring harder, unless some external means is provided to configure a persistent RTCP CNAME choice for those implementations 🧩

Also, there's no backwards compatibility issue (with implementations compatible with [RFC3550]) introduced by this memo, since RTCP CNAMEs are opaque strings to remote peers πŸ₯°

4.2. Requirements ✨

okay so RTP endpoints get to pick between two flavors of RTCP CNAME: persistent or per-session πŸ’…. If an endpoint wants a persistent one, it MUST use one of the two methods below 🫢

  • To make a long-term persistent RTCP CNAME, the endpoint MUST generate and store a Universally Unique IDentifier (UUID) [RFC4122] to use as the "host" part of its RTCP CNAME. The UUID MUST be version 1, 2, or 4, as described in [RFC4122], with the urn:uuid: stripped off, so you end up with a 36-octet printable string πŸŽ€
  • To make a short-term persistent RTCP CNAME, the endpoint MUST generate and use an identifier by following the procedure in Section 5. That procedure runs at least once per initialization of the software 🌸 Once you've got an identifier, minimally the least significant 96 bits SHOULD be converted to ASCII using Base64 encoding [RFC4648] (this is the compromise between packet size and uniqueness, so peep Section 6.1 if you're curious 🧚). If you use 96 bits, the string comes out to 16 octets. And the Base64 encoded value cannot go over the maximum RTCP CNAME length of 255 octets [RFC3550] πŸ™ˆ

In both of those cases, the user@ part of the RTCP CNAME MAY be left out on single-user systems, and it MAY be swapped for an opaque token on multiuser systems so privacy stays intact πŸ¦‹

Now if the endpoint wants a per-session RTCP CNAME, there's just one method and it MUST be used πŸ‘‘

  • For every brand-new RTP session, a new RTCP CNAME gets generated using the procedure in Section 5. After that, minimally the least significant 96 bits SHOULD be converted to ASCII using Base64 encoding [RFC4648]. The RTCP CNAME cannot change over the life of an RTP session [RFC3550], so no switching mid-call, bestie 🚫 And the user@ part is left out completely when you make per-session RTCP CNAMEs ✨

Here's the tea 🍡: getting uniqueness (with a high probability) is a really big deal, and it needs careful evaluation of whatever method you pick. This document gives you a bunch of methods, and at least one of them should fit any given deployment scenario. So the document does NOT let implementors invent and select their own alternative method πŸ’–

A future spec might define a different way to generate RTCP CNAMEs, as long as that method has appropriate uniqueness and the methods used across multiple RTP sessions that need to be correlated stay consistent with each other 🌈 But that spec needs to be reviewed and approved before anyone deploys it, periodt πŸ’…

And finally, the mechanisms in this document are for generating RTCP CNAMEs, and that's ALL they're for. They are NOT to be used as general-purpose unique identifiers πŸ™…β€β™€οΈ


5. Procedure to Generate a Unique Identifier πŸ”₯

To make a unique identifier locally, you just generate a cryptographically pseudorandom value as described in [RFC4086]. This value MUST be at least 96 bits 🧠

The biggest bottleneck for this algorithm is having a proper cryptographically secure pseudorandom number generator (CSPRNG) on hand. If your setting already has a secure PRNG, this algorithm is WAY simpler than the one in Section 5 of [RFC6222] 😭 SIP stacks [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 [ARCH] will need secure PRNGs to implement ICE [RFC5245] and DTLS-SRTP [RFC5764]. And honestly? Basically every Web browser already supports TLS, and TLS requires a secure PRNG, so it's already in your pocket πŸ‘œβœ¨


6. Security Considerations πŸ’€

The security considerations of [RFC3550] apply to this memo. Read them, they matter 🫢

6.1. Considerations on Uniqueness of RTCP CNAMEs πŸ¦‹

The stuff in this section applies to random RTCP CNAMEs.

The recommendations in this document for RTCP CNAME generation make sure that a set of cooperating participants in an RTP session will, with very high probability, end up with unique RTCP CNAMEs. BUT neither [RFC3550] nor this document gives any way to make sure participants pick their RTCP CNAMEs properly, so implementations MUST NOT rely on the uniqueness of RTCP CNAMEs for any essential security services 🚨 This lines up with [RFC3550], which does not require RTCP CNAMEs to be unique within a session and only says that condition SHOULD hold. As the Security Considerations section of [RFC3550] describes, every participant is free to choose its own RTCP CNAME, so they can pick one that impersonates somebody else. In other words, participants are trusted not to impersonate each other 😬 No recommendation for generating RTCP CNAMEs can stop this impersonation, because an attacker can just ignore the stipulation. Secure RTP (SRTP) [RFC3711] keeps unauthorized entities OUT of an RTP session, but it does NOT aim to prevent impersonation attacks from authorized entities 🚫

Because of the properties of the PRNG, there's 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's a large chance of collision (there's about a 50% chance of one collision after 2^{48} RTCP CNAMEs) 🎲

6.2. Session Correlation Based on RTCP CNAMEs πŸ•΅οΈβ€β™€οΈ

Earlier recommendations for RTCP CNAME generation allowed a fixed RTCP CNAME value. That was a problem, because an attacker could easily link separate RTP sessions, which wrecks the obfuscation you get from IPv6 privacy addresses [RFC4941] or IPv4 Network Address Port Translation (NAPT) [RFC3022] πŸ’”

This specification no longer describes a procedure to generate fixed RTCP CNAME values, so RTCP CNAME values no longer link RTP sessions together. This was necessary to stop that linking by an attacker, but of course it makes linking by traffic analysis devices (for example, devices looking for dropped or delayed packets) more complicated 🧐


7. Acknowledgments 🫢

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 🌷


8. References πŸ“š

8.1. Normative References

[RFC3550]  Schulzrinne, H., Casner, S., Frederick, R., and V.
           Jacobson, "RTP: A Transport Protocol for Real-Time
           Applications", STD 64, RFC 3550, July 2003.

[RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
           Requirement Levels", BCP 14, RFC 2119, March 1997.

[RFC4122]  Leach, P., Mealling, M., and R. Salz, "A Universally
           Unique IDentifier (UUID) URN Namespace", RFC 4122, July
           2005.

[RFC4648]  Josefsson, S., "The Base16, Base32, and Base64 Data
           Encodings", RFC 4648, October 2006.

[RFC4086]  Eastlake, D., Schiller, J., and S. Crocker, "Randomness
           Requirements for Security", BCP 106, RFC 4086, June 2005.

8.2. Informative References

[RFC6222]  Begen, A., Perkins, C., and D. Wing, "Guidelines for
           Choosing RTP Control Protocol (RTCP) Canonical Names
           (CNAMEs)", RFC 6222, April 2011.

[RFC1918]  Rekhter, Y., Moskowitz, R., Karrenberg, D., Groot, G., and
           E. Lear, "Address Allocation for Private Internets", BCP
           5, RFC 1918, February 1996.

[RFC3022]  Srisuresh, P. and K. Egevang, "Traditional IP Network
           Address Translator (Traditional NAT)", RFC 3022, January
           2001.

[RFC3711]  Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K.
           Norrman, "The Secure Real-time Transport Protocol (SRTP)",
           RFC 3711, March 2004.

[RFC4941]  Narten, T., Draves, R., and S. Krishnan, "Privacy
           Extensions for Stateless Address Autoconfiguration in
           IPv6", RFC 4941, September 2007.

[RFC5245]  Rosenberg, J., "Interactive Connectivity Establishment
           (ICE): A Protocol for Network Address Translator (NAT)
           Traversal for Offer/Answer Protocols", RFC 5245, April
           2010.

[RFC5764]  McGrew, D. and E. Rescorla, "Datagram Transport Layer
           Security (DTLS) Extension to Establish Keys for the Secure
           Real-time Transport Protocol (SRTP)", RFC 5764, May 2010.

[RFC3261]  Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston,
           A., Peterson, J., Sparks, R., Handley, M., and E.
           Schooler, "SIP: Session Initiation Protocol", RFC 3261,
           June 2002.

[ARCH]     Rescorla, E., "WebRTC Security Architecture", Work in
           Progress, July 2013.

[RESCORLA] Rescorla, E., "Random algorithm for RTP CNAME generation",
           Work in Progress, July 2012.

Authors' Addresses 🌟

Ali Begen
Cisco
181 Bay Street
Toronto, ON  M5J 2T3
CANADA

EMail: abegen@cisco.com


Colin Perkins
University of Glasgow
School of Computing Science
Glasgow  G12 8QQ
UK

EMail: csp@csperkins.org


Dan Wing
Cisco Systems, Inc.
170 West Tasman Drive
San Jose, California  95134
USA

EMail: dwing@cisco.com


Eric Rescorla
RTFM, Inc.
2064 Edgewood Drive
Palo Alto, CA  94303
USA

Phone: +1 650 678 2350
EMail: ekr@rtfm.com
πŸ“¦ where this page comes from