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

<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>

<!-- generated by https://github.com/cabo/kramdown-rfc version 1.6.15 (Ruby 2.7.0) -->

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

<!-- xml2rfc v2v3 conversion 3.13.1 -->
  <front>
    <title abbrev="Completely Encrypting RTP Header Extensions and CSRCs">Completely Encrypting RTP Header Extensions and Contributing Sources</title>
    <seriesInfo name="RFC" value="9335"/>
    <author initials="J." surname="Uberti" fullname="Justin Uberti">
      <organization></organization>
      <address>
        <email>justin@uberti.name</email>
      </address>
    </author>
    <author initials="C." surname="Jennings" fullname="Cullen Jennings">
      <organization>Cisco</organization>
      <address>
        <email>fluffy@iii.ca</email>
      </address>
    </author>
    <author initials="S." surname="Garcia Murillo" fullname="Sergio Garcia Murillo">
      <organization>Millicast</organization>
      <address>
        <email>sergio.garcia.murillo@cosmosoftware.io</email>
      </address>
    </author>
    <date year="2023" month="January"/>
    <area>ART</area>
    <workgroup>AVTCORE</workgroup>
    <keyword>SRTP</keyword>
    <abstract>
      <t>While the Secure Real-time Transport Protocol (SRTP) provides confidentiality
for the contents of a media packet, a significant amount of metadata is left
unprotected, including RTP header extensions and contributing sources (CSRCs).
However, this data can be moderately sensitive in many applications. While
there have been previous attempts to protect this data, they have had limited
deployment, due to complexity as well as technical limitations.</t>
      <t>This document updates RFC 3711, the SRTP specification, and defines Cryptex as a new mechanism that completely encrypts
header extensions and CSRCs and uses simpler Session Description Protocol (SDP) signaling with the goal of
facilitating deployment.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="introduction">
      <name>Introduction</name>
      <section anchor="problem-statement">
        <name>Problem Statement</name>
        <t>The Secure Real-time Transport Protocol (SRTP) <xref target="RFC3711"/> mechanism provides message
authentication for the entire RTP packet but only encrypts the RTP payload.
This has not historically been a problem, as much of the information carried
in the header has minimal sensitivity (e.g., RTP timestamp); in addition,
certain fields need to remain as cleartext because they are used for key
scheduling (e.g., RTP synchronization source (SSRC) and sequence number).</t>
        <t>However, as noted in <xref target="RFC6904"/>, the security requirements can be different for
information carried in RTP header extensions, including the per-packet sound
levels defined in <xref target="RFC6464"/> and <xref target="RFC6465"/>, which are specifically noted as
being sensitive in the Security Considerations sections of those RFCs.</t>
        <t>In addition to the contents of the header extensions, there are now enough
header extensions in active use that the header extension identifiers
themselves can provide meaningful information in terms of determining the
identity of the endpoint and/or application. Accordingly, these identifiers
can be considered a fingerprinting issue.</t>
        <t>Finally, the CSRCs included in RTP packets can also be sensitive, potentially
allowing a network eavesdropper to determine who was speaking and when during
an otherwise secure conference call.</t>
      </section>
      <section anchor="previous-solutions">
        <name>Previous Solutions</name>
        <t>Encryption of Header Extensions in SRTP <xref target="RFC6904"/> was proposed in 2013 as a solution to the problem of unprotected
header extension values. However, it has not seen significant adoption and
has a few technical shortcomings.</t>

<t>First, the mechanism is complicated. Since it allows encryption to be
negotiated on a per-extension basis, a fair amount of signaling logic is
required. And in the SRTP layer, a somewhat complex transform is required
to allow only the selected header extension values to be encrypted. One of
the most popular SRTP implementations had a significant bug in this area
that was not detected for five years.</t>
        <t>Second, the mechanism only protects the header extension values and not their identifiers or
lengths. It also does not protect the CSRCs. As noted above, this leaves
a fair amount of potentially sensitive information exposed.</t>
<t>Third, the mechanism bloats the header extension space. Because each extension must
be offered in both unencrypted and encrypted forms, twice as many header
extensions must be offered, which will in many cases push implementations
past the 14-extension limit for the use of one-byte extension headers
defined in <xref target="RFC8285"/>. Accordingly, in many cases, implementations will need to use
two-byte headers, which are not supported well by some
existing implementations.</t>
        <t>Finally, the header extension bloat combined with the need for backward
compatibility results in additional wire overhead. Because two-byte
extension headers may not be handled well by existing implementations,
one-byte extension identifiers will need to be used for the unencrypted
(backward-compatible) forms, and two-byte for the encrypted forms.
Thus, deployment of encryption for header extensions <xref target="RFC6904"/> will
typically result in multiple extra bytes in each RTP packet, compared
to the present situation.</t>
      </section>
      <section anchor="goals">
        <name>Goals</name>
        <t>From the previous analysis, the desired properties of a solution are:</t>
<ul spacing="normal">
          <li>Built on the existing SRTP framework <xref target="RFC3711"/> (simple to understand)</li>
          <li>Built on the existing header extension framework <xref target="RFC8285"/> (simple to implement)</li>
          <li>Protection of header extension identifiers, lengths, and values</li>
          <li>Protection of CSRCs when present</li>
          <li>Simple signaling</li>
          <li>Simple crypto transform and SRTP interactions</li>
          <li>Backward compatibility with unencrypted endpoints, if desired</li>
          <li>Backward compatibility with existing RTP tooling</li>
        </ul>
	<t>The last point deserves further discussion.  While other possible
	solutions that would have encrypted more of the RTP
	header (e.g., the number of CSRCs) were considered, the inability to parse the
	resultant packets with current tools and a generally higher level of
	complexity outweighed the slight improvement in confidentiality in
	these solutions.  Hence, a more pragmatic approach was taken to solve
	the problem described in <xref target="problem-statement"/>.</t>
      </section>
    </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&nbsp;14 <xref target="RFC2119"/> <xref target="RFC8174"/> 
    when, and only when, they appear in all capitals, as shown here.
        </t>
    </section>
    <section anchor="design">
      <name>Design</name>
      <t>This specification proposes a mechanism to negotiate encryption of all
RTP header extensions (ids, lengths, and values) as well as CSRC values. It
reuses the existing SRTP framework, is accordingly simple to implement, and
is backward compatible with existing RTP packet parsing code, even when
support for the mechanism has been negotiated.</t>
      <t>Except when explicitly stated otherwise, Cryptex reuses all the framework procedures, transforms, and considerations described in <xref target="RFC3711"/>.</t>
    </section>
    <section anchor="sdp-considerations">
      <name>SDP Considerations</name>
      <t>Cryptex support is indicated via a new "a=cryptex" SDP attribute defined in this specification.</t>
      <t>The new "a=cryptex" attribute is a property attribute as defined in <xref target="RFC8866" sectionFormat="of" section="5.13"/>; it therefore takes no value and can be used at the session level or media level.</t>
      <t>The presence of the "a=cryptex" attribute in the SDP (in either an offer or an answer) indicates that
the endpoint is capable of receiving RTP packets encrypted with Cryptex, as defined below.</t>
      <t>Once each peer has verified that the other party supports receiving RTP packets encrypted with Cryptex, senders can unilaterally decide whether or not to use the Cryptex mechanism on a per-packet basis.</t>

      <t>If BUNDLE is in use as per <xref target="RFC9143"/> and the "a=cryptex" attribute is present for a media line, it <bcp14>MUST</bcp14> be present for all RTP-based "m=" sections belonging to the same bundle group. This ensures that the encrypted Media Identifier (MID) header extensions can be processed, allowing RTP streams to be associated with the correct "m=" section in each BUNDLE group as specified in <xref target="RFC9143" sectionFormat="of" section="9.2"/>. When used with BUNDLE, this attribute is assigned to the TRANSPORT category <xref target="RFC8859"/>.</t>
      <t>Both endpoints can change the Cryptex support status by modifying the session as specified in  <xref target="RFC3264" sectionFormat="of" section="8"/>. Generating subsequent SDP offers and answers <bcp14>MUST</bcp14> use the same procedures for including the "a=cryptex" attribute as the ones on the initial offer and answer.</t>
    </section>
    <section anchor="rtp-header-processing">
      <name>RTP Header Processing</name>
      <t>A General Mechanism for RTP Header Extensions <xref target="RFC8285"/> defines two values for the "defined by profile" field for carrying
one-byte and two-byte header extensions. In order to allow a receiver to determine
if an incoming RTP packet is using the encryption scheme in this specification,
two new values are defined:</t>
      <ul spacing="normal">
        <li>0xC0DE for the encrypted version of the one-byte header extensions (instead of 0xBEDE).</li>
        <li>0xC2DE for the encrypted versions of the two-byte header extensions (instead of 0x100).</li>
      </ul>
      <t>In the case of using two-byte header extensions, the extension identifier with value 256 <bcp14>MUST NOT</bcp14>
be negotiated, as the value of this identifier is meant to be contained in the "appbits" of the
"defined by profile" field, which are not available when using the values above.</t>
<t>Note that as per <xref target="RFC8285"/>, it is not possible to mix one-byte and two-byte headers on the same RTP packet. Mixing one-byte and two-byte headers on the same RTP stream requires negotiation of the "extmap-allow-mixed" SDP attribute as defined in <xref target="RFC8285" sectionFormat="of" section="6"/>.</t>
      <t>Peers <bcp14>MAY</bcp14> negotiate both Cryptex and the Encryption of Header Extensions mechanism defined in <xref target="RFC6904"/> via SDP offer/answer as described in <xref target="sdp-considerations"/>, and if both mechanisms are supported, either one can be used for any given packet. However, if a packet is encrypted with Cryptex, it <bcp14>MUST NOT</bcp14> also use header extension encryption <xref target="RFC6904"/>, and vice versa.</t>

<t> If one of the peers has advertised the ability to receive both Cryptex and
header extensions encrypted as per <xref target="RFC6904"/> in the SDP
exchange, it is <bcp14>RECOMMENDED</bcp14> that the other peer use Cryptex
rather than the mechanism in <xref target="RFC6904"/> when sending RTP packets
so that all the header extensions and CSRCS are encrypted. However, if there is a
compelling reason to use the mechanism in <xref target="RFC6904"/> (e.g., a
need for some header extensions to be sent in the clear so that so they are
processable by RTP middleboxes), the other peer <bcp14>SHOULD</bcp14> use
the mechanism in <xref target="RFC6904"/> instead.</t>
      <section anchor="sending">
        <name>Sending</name>
        <t>When the mechanism defined by this specification has been negotiated,
sending an RTP packet that has any CSRCs or contains any header extensions <xref target="RFC8285"/> follows the steps below. This mechanism <bcp14>MUST NOT</bcp14> be
used with header extensions other than the variety described in <xref target="RFC8285"/>.</t>
        <t>If the RTP packet contains one-byte headers, the 16-bit RTP header
        extension tag <bcp14>MUST</bcp14> be set to 0xC0DE to indicate that the encryption
        has been applied and the one-byte framing is being used. If the RTP
        packet contains two-byte headers, the header extension tag
        <bcp14>MUST</bcp14> be set to 0xC2DE to indicate encryption has been applied and the
        two-byte framing is being used.
	
	</t>
        <t>If the packet contains CSRCs but no header extensions, an empty extension block
consisting of the 0xC0DE tag and a 16-bit length field set to zero (explicitly
permitted by <xref target="RFC3550"/>) <bcp14>MUST</bcp14> be appended, and the X bit <bcp14>MUST</bcp14> be set to 1 to
indicate an extension block is present. This is necessary to provide the receiver
an indication that the CSRCs in the packet are encrypted.</t>

        <t>The RTP packet <bcp14>MUST</bcp14> then be encrypted as described in <xref target="encryption-procedure"/> ("Encryption Procedure").</t>
      </section>
      <section anchor="receiving">
        <name>Receiving</name>
        <t>When receiving an RTP packet that contains header extensions, the
"defined by profile" field <bcp14>MUST</bcp14> be checked to ensure the payload is
formatted according to this specification. If the field does not match
one of the values defined above, the implementation <bcp14>MUST</bcp14> instead
handle it according to the specification that defines that value.</t>
        <t>Alternatively, if the implementation considers the use of this specification mandatory and the "defined by profile" field does not match one of the values defined above, it <bcp14>MUST</bcp14> stop the processing of the RTP packet and report an error for the RTP stream.</t>
        <t>If the RTP packet passes this check, it is then decrypted as described in
<xref target="decryption-procedure"/> ("Decryption Procedure") and passed to the next layer to process
the packet and its extensions. In the event that a zero-length extension
block was added as indicated above, it can be left as is and will be
processed normally.</t>
      </section>
    </section>
    <section anchor="encryption-and-decryption">
      <name>Encryption and Decryption</name>
      <section anchor="packet-structure">
        <name>Packet Structure</name>
        <t>When this mechanism is active, the SRTP packet is protected as follows:</t>
        <figure anchor="srtp-packet">

<name>A Protected SRTP Packet</name>
          <artwork align="center"><![CDATA[
   0                   1                   2                   3
   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<+
  |V=2|P|X|  CC   |M|     PT      |       sequence number         | |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
  |                           timestamp                           | |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
  |           synchronization source (SSRC) identifier            | |
+>+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ |
| |            contributing source (CSRC) identifiers             | |
| |                               ....                            | |
+>+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
X |  0xC0 or 0xC2 |    0xDE       |           length              | |
+>+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| |                  RFC 8285 header extensions                   | |
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| |                          payload  ...                         | |
| |                               +-------------------------------+ |
| |                               | RTP padding   | RTP pad count | |
+>+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<+
| ~          SRTP Master Key Identifier (MKI) (OPTIONAL)          ~ |
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| :                 authentication tag (RECOMMENDED)              : |
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
|                                                                   |
+- Encrypted Portion                       Authenticated Portion ---+
]]></artwork>
        </figure>
        <t>Note that, as required by <xref target="RFC8285"/>, the 4 bytes at the start of the extension block are not encrypted.</t>
        <t>Specifically, the Encrypted Portion <bcp14>MUST</bcp14> include any CSRC identifiers, any
RTP header extension (except for the first 4 bytes), and the RTP payload.</t>
      </section>
      <section anchor="encryption-procedure">
        <name>Encryption Procedure</name>
        <t>The encryption procedure is identical to that of <xref target="RFC3711"/> except for the
	Encrypted Portion of the SRTP packet. The plaintext input to the cipher is as follows:</t>

        <artwork><![CDATA[
Plaintext = CSRC identifiers (if used) || header extension data || 
     RTP payload || RTP padding (if used) || RTP pad count (if used)
]]></artwork>
        <t>Here "header extension data" refers to the content of the RTP extension field,
excluding the first four bytes (the extension header <xref target="RFC8285"/>).  The first <tt>4 * CSRC count (CC)</tt> bytes of the ciphertext are placed in the CSRC field of the RTP header.
The remainder of the ciphertext is the RTP payload of the encrypted packet.</t>
        <t>To minimize changes to surrounding code, the encryption mechanism can choose
to replace a "defined by profile" field from <xref target="RFC8285"/> with its counterpart
defined in <xref target="rtp-header-processing"/> ("RTP Header Processing") and encrypt at the same time.</t>

<t>For Authenticated Encryption with Associated Data (AEAD) ciphers (e.g., AES-GCM), the 12-byte fixed header and the four-byte header
extension header (the "defined by profile" field and the length) are considered
additional authenticated data (AAD), even though they are non-contiguous in the packet if CSRCs are present.</t>
        <artwork><![CDATA[
Associated Data: fixed header || extension header (if X=1)
]]></artwork>
        <t>Here "fixed header" refers to the 12-byte fixed portion of the RTP header, and
"extension header" refers to the four-byte extension header <xref target="RFC8285"/> ("defined
by profile" and extension length).</t>
        <t>Implementations can rearrange a packet so that the AAD and plaintext are
contiguous by swapping the order of the extension header and the CSRC
identifiers, resulting in an intermediate representation of the form shown in
<xref target="intermediate-packet"/>.  After encryption, the CSRCs (now encrypted) and
extension header would need to be swapped back to their original positions. A
similar operation can be done when decrypting to create contiguous ciphertext
and AAD inputs.</t>
        <figure anchor="intermediate-packet">
          <name>An RTP Packet Transformed to Make Cryptex Cipher Inputs Contiguous</name>
          <artwork align="center"><![CDATA[
   0                   1                   2                   3
   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<+
  |V=2|P|X|  CC   |M|     PT      |       sequence number         | |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
  |                           timestamp                           | |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
  |           synchronization source (SSRC) identifier            | |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
  |  0xC0 or 0xC2 |    0xDE       |           length              | |
+>+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+<+
| |            contributing source (CSRC) identifiers             | |
| |                               ....                            | |
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| |                  RFC 8285 header extensions                   | |
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| |                          payload  ...                         | |
| |                               +-------------------------------+ |
| |                               | RTP padding   | RTP pad count | |
+>+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
|                                                                   |
+- Plaintext Input                                     AAD Input ---+
]]></artwork>
        </figure>
        <t>Note that this intermediate representation is only displayed as reference for implementations and is not meant to be sent on the wire.</t>
      </section>
      <section anchor="decryption-procedure">
        <name>Decryption Procedure</name>
        <t>The decryption procedure is identical to that of <xref target="RFC3711"/> except
for the Encrypted Portion of the SRTP packet, which is as shown in the section above.</t>
        <t>To minimize changes to surrounding code, the decryption mechanism can choose
to replace the "defined by profile" field with its no-encryption counterpart
from <xref target="RFC8285"/> and decrypt at the same time.</t>
      </section>
    </section>
    <section anchor="backwards-compatibility">
      <name>Backward Compatibility</name>
      <t>This specification attempts to encrypt as much as possible without interfering
with backward compatibility for systems that expect a certain structure from
an RTPv2 packet, including systems that perform demultiplexing based on packet
headers. Accordingly, the first two bytes of the RTP packet are not encrypted.</t>
      <t>This specification also attempts to reuse the key scheduling from SRTP, which
depends on the RTP packet sequence number and SSRC identifier. Accordingly,
these values are also not encrypted.</t>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>All security considerations in <xref target="RFC3711" sectionFormat="of" section="9"/> are applicable to this specification; the exception is Section <xref target="RFC3711" sectionFormat="bare" section="9.4"/>, because confidentiality of the RTP Header is the purpose of this specification.</t>
      <t>The risks of using weak or NULL authentication with SRTP, described in <xref target="RFC3711" sectionFormat="of" section="9.5"/>, apply to encrypted header extensions as well.</t>
      <t>This specification extends SRTP by expanding the Encrypted Portion of the RTP packet,
as shown in <xref target="packet-structure"/> ("Packet Structure"). It does not change how SRTP authentication
works in any way. Given that more of the packet is being encrypted than before,
this is necessarily an improvement.</t>
      <t>The RTP fields that are left unencrypted (see rationale above) are as follows:</t>
      <ul spacing="normal">
        <li>RTP version</li>
        <li>padding bit</li>
        <li>extension bit</li>
        <li>number of CSRCs</li>
        <li>marker bit</li>
        <li>payload type</li>
        <li>sequence number</li>
        <li>timestamp</li>
        <li>SSRC identifier</li>
        <li>number of header extensions <xref target="RFC8285"/></li>
      </ul>
      <t>These values contain a fixed set (i.e., one that won't be changed by
extensions) of information that, at present, is observed to have low
sensitivity. In the event any of these values need to be encrypted, SRTP
is likely the wrong protocol to use and a fully encapsulating protocol
such as DTLS is preferred (with its attendant per-packet overhead).</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
        <t>This document updates the "attribute-name (formerly "att-field")" subregistry of the "Session Description Protocol (SDP) Parameters" registry (see <xref target="RFC8866" sectionFormat="of" section="8.2.4"/>). Specifically, it adds the SDP "a=cryptex" attribute for use at both the media level and the session level.</t>
	<dl spacing="normal">
          <dt>Contact name:</dt>
	  <dd>IETF AVT Working Group or IESG if the AVT Working Group is closed</dd>
          <dt>Contact email address:</dt>
	  <dd>avt@ietf.org</dd>
          <dt>Attribute name:</dt>
	  <dd>cryptex</dd>
          <dt>Attribute syntax:</dt>
	  <dd>This attribute takes no values.</dd>
          <dt>Attribute semantics:</dt>
	  <dd>N/A</dd>
          <dt>Attribute value:</dt>
	  <dd>N/A</dd>
          <dt>Usage level:</dt>
	  <dd>session, media</dd>
          <dt>Charset dependent:</dt>
	  <dd>No</dd>
          <dt>Purpose:</dt>
	  <dd>The presence of this attribute in the SDP indicates that the
	  endpoint is capable of receiving RTP packets encrypted with Cryptex
	  as described in this document.</dd>
          <dt>O/A procedures:</dt>
	  <dd>SDP O/A procedures are described in Section <xref target="sdp-considerations" format="counter"/> of this
	  document.</dd>
          <dt>Mux Category:</dt>
	  <dd>TRANSPORT</dd>
	</dl>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>

<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3550.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3711.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8285.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8859.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8866.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9143.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3264.xml"/>

      </references>
      <references>
        <name>Informative References</name>

<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6464.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6465.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6904.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7714.xml"/>

      </references>
    </references>
    <section anchor="test-vectors">
      <name>Test Vectors</name>
      <t>All values are in hexadecimal and represented in network order (big endian).</t>
      <section anchor="aes-ctr">
        <name>AES-CTR</name>
        <t>The following subsections list the test vectors for using Cryptex with AES-CTR as per <xref target="RFC3711"/>.</t>

<t>Common values are organized as follows:</t>
        <artwork><![CDATA[
Rollover Counter:          00000000
Master Key:                e1f97a0d3e018be0d64fa32c06de4139
Master Salt:               0ec675ad498afeebb6960b3aabe6
Crypto Suite:              AES_CM_128_HMAC_SHA1_80
Session Key:               c61e7a93744f39ee10734afe3ff7a087
Session Salt:              30cbbc08863d8c85d49db34a9ae1
Authentication Key:        cebe321f6ff7716b6fd4ab49af256a156d38baa4
]]></artwork>
        <section anchor="rtp-packet-with-1-byte-header-extension">
          <name>RTP Packet with One-Byte Header Extension</name>
          <t>RTP Packet:</t>
          <sourcecode type="test-vectors"><![CDATA[
    900f1235
    decafbad
    cafebabe
    bede0001
    51000200
    abababab
    abababab
    abababab
    abababab
]]></sourcecode>
          <t>Encrypted RTP Packet:</t>
          <sourcecode type="test-vectors"><![CDATA[
    900f1235
    decafbad
    cafebabe
    c0de0001
    eb923652
    51c3e036
    f8de27e9
    c27ee3e0
    b4651d9f
    bc4218a7
    0244522f
    34a5
]]></sourcecode>
        </section>
        <section anchor="rtp-packet-with-2-byte-header-extension">
          <name>RTP Packet with Two-Byte Header Extension</name>
          <t>RTP Packet:</t>
          <sourcecode type="test-vectors"><![CDATA[
    900f1236
    decafbad
    cafebabe
    10000001
    05020002
    abababab
    abababab
    abababab
    abababab
]]></sourcecode>
          <t>Encrypted RTP Packet:</t>
          <sourcecode type="test-vectors"><![CDATA[
    900f1236
    decafbad
    cafebabe
    c2de0001
    4ed9cc4e
    6a712b30
    96c5ca77
    339d4204
    ce0d7739
    6cab6958
    5fbce381
    94a5
]]></sourcecode>
        </section>
        <section anchor="rtp-packet-with-1-byte-header-extension-and-csrc-fields">
          <name>RTP Packet with One-Byte Header Extension and CSRC Fields</name>
          <t>RTP Packet:</t>
          <sourcecode type="test-vectors"><![CDATA[
    920f1238
    decafbad
    cafebabe
    0001e240
    0000b26e
    bede0001
    51000200
    abababab
    abababab
    abababab
    abababab
]]></sourcecode>
          <t>Encrypted RTP Packet:</t>
          <sourcecode type="test-vectors"><![CDATA[
    920f1238
    decafbad
    cafebabe
    8bb6e12b
    5cff16dd
    c0de0001
    92838c8c
    09e58393
    e1de3a9a
    74734d67
    45671338
    c3acf11d
    a2df8423
    bee0
]]></sourcecode>
        </section>
        <section anchor="rtp-packet-with-2-byte-header-extension-and-csrc-fields">
          <name>RTP Packet with Two-Byte Header Extension and CSRC Fields</name>
          <t>RTP Packet:</t>
          <sourcecode type="test-vectors"><![CDATA[
    920f1239
    decafbad
    cafebabe
    0001e240
    0000b26e
    10000001
    05020002
    abababab
    abababab
    abababab
    abababab
]]></sourcecode>
          <t>Encrypted RTP Packet:</t>
          <sourcecode type="test-vectors"><![CDATA[
    920f1239
    decafbad
    cafebabe
    f70e513e
    b90b9b25
    c2de0001
    bbed4848
    faa64466
    5f3d7f34
    125914e9
    f4d0ae92
    3c6f479b
    95a0f7b5
    3133
]]></sourcecode>
        </section>
        <section anchor="rtp-packet-with-empty-1-byte-header-extension-and-csrc-fields">
          <name>RTP Packet with Empty One-Byte Header Extension and CSRC Fields</name>
          <t>RTP Packet:</t>
          <sourcecode type="test-vectors"><![CDATA[
    920f123a
    decafbad
    cafebabe
    0001e240
    0000b26e
    bede0000
    abababab
    abababab
    abababab
    abababab
]]></sourcecode>
          <t>Encrypted RTP Packet:</t>
          <sourcecode type="test-vectors"><![CDATA[
    920f123a
    decafbad
    cafebabe
    7130b6ab
    fe2ab0e3
    c0de0000
    e3d9f64b
    25c9e74c
    b4cf8e43
    fb92e378
    1c2c0cea
    b6b3a499
    a14c
]]></sourcecode>
        </section>
        <section anchor="rtp-packet-with-empty-2-byte-header-extension-and-csrc-fields">
          <name>RTP Packet with Empty Two-Byte Header Extension and CSRC Fields</name>
          <t>RTP Packet:</t>
          <sourcecode type="test-vectors"><![CDATA[
    920f123b
    decafbad
    cafebabe
    0001e240
    0000b26e
    10000000
    abababab
    abababab
    abababab
    abababab
]]></sourcecode>
          <t>Encrypted RTP Packet:</t>
          <sourcecode type="test-vectors"><![CDATA[
    920f123b
    decafbad
    cafebabe
    cbf24c12
    4330e1c8
    c2de0000
    599dd45b
    c9d687b6
    03e8b59d
    771fd38e
    88b170e0
    cd31e125
    eabe
]]></sourcecode>
        </section>
      </section>
      <section anchor="aes-gcm">
        <name>AES-GCM</name>
        <t>The following subsections list the test vectors for using Cryptex with AES-GCM as per <xref target="RFC7714"/>.</t>
        <t>Common values are organized as follows:</t>
        <artwork><![CDATA[
    Rollover Counter:          00000000
    Master Key:                000102030405060708090a0b0c0d0e0f
    Master Salt:               a0a1a2a3a4a5a6a7a8a9aaab
    Crypto Suite:              AEAD_AES_128_GCM
    Session Key:               077c6143cb221bc355ff23d5f984a16e
    Session Salt:              9af3e95364ebac9c99c5a7c4
]]></artwork>
        <section anchor="rtp-packet-with-1-byte-header-extension-1">
          <name>RTP Packet with One-Byte Header Extension</name>
          <t>RTP Packet:</t>
          <sourcecode type="test-vectors"><![CDATA[
    900f1235
    decafbad
    cafebabe
    bede0001
    51000200
    abababab
    abababab
    abababab
    abababab
]]></sourcecode>
          <t>Encrypted RTP Packet:</t>
          <sourcecode type="test-vectors"><![CDATA[
    900f1235
    decafbad
    cafebabe
    c0de0001
    39972dc9
    572c4d99
    e8fc355d
    e743fb2e
    94f9d8ff
    54e72f41
    93bbc5c7
    4ffab0fa
    9fa0fbeb
]]></sourcecode>
        </section>
        <section anchor="rtp-packet-with-2-byte-header-extension-1">
          <name>RTP Packet with Two-Byte Header Extension</name>
          <t>RTP Packet:</t>
          <sourcecode type="test-vectors"><![CDATA[
    900f1236
    decafbad
    cafebabe
    10000001
    05020002
    abababab
    abababab
    abababab
    abababab
]]></sourcecode>
          <t>Encrypted RTP Packet:</t>
          <sourcecode type="test-vectors"><![CDATA[
    900f1236
    decafbad
    cafebabe
    c2de0001
    bb75a4c5
    45cd1f41
    3bdb7daa
    2b1e3263
    de313667
    c9632490
    81b35a65
    f5cb6c88
    b394235f
]]></sourcecode>
        </section>
        <section anchor="rtp-packet-with-1-byte-header-extension-and-csrc-fields-1">
          <name>RTP Packet with One-Byte Header Extension and CSRC Fields</name>
          <t>RTP Packet:</t>
          <sourcecode type="test-vectors"><![CDATA[
    920f1238
    decafbad
    cafebabe
    0001e240
    0000b26e
    bede0001
    51000200
    abababab
    abababab
    abababab
    abababab
]]></sourcecode>
          <t>Encrypted RTP Packet:</t>
          <sourcecode type="test-vectors"><![CDATA[
    920f1238
    decafbad
    cafebabe
    63bbccc4
    a7f695c4
    c0de0001
    8ad7c71f
    ac70a80c
    92866b4c
    6ba98546
    ef913586
    e95ffaaf
    fe956885
    bb0647a8
    bc094ac8
]]></sourcecode>
        </section>
        <section anchor="rtp-packet-with-2-byte-header-extension-and-csrc-fields-1">
          <name>RTP Packet with Two-Byte Header Extension and CSRC Fields</name>
          <t>RTP Packet:</t>
          <sourcecode type="test-vectors"><![CDATA[
    920f1239
    decafbad
    cafebabe
    0001e240
    0000b26e
    10000001
    05020002
    abababab
    abababab
    abababab
    abababab
]]></sourcecode>
          <t>Encrypted RTP Packet:</t>
          <sourcecode type="test-vectors"><![CDATA[
    920f1239
    decafbad
    cafebabe
    3680524f
    8d312b00
    c2de0001
    c78d1200
    38422bc1
    11a7187a
    18246f98
    0c059cc6
    bc9df8b6
    26394eca
    344e4b05
    d80fea83
]]></sourcecode>
        </section>
        <section anchor="rtp-packet-with-empty-1-byte-header-extension-and-csrc-fields-1">
          <name>RTP Packet with Empty One-Byte Header Extension and CSRC Fields</name>
          <t>RTP Packet:</t>
          <sourcecode type="test-vectors"><![CDATA[
    920f123a
    decafbad
    cafebabe
    0001e240
    0000b26e
    bede0000
    abababab
    abababab
    abababab
    abababab
]]></sourcecode>
          <t>Encrypted RTP Packet:</t>
          <sourcecode type="test-vectors"><![CDATA[
    920f123a
    decafbad
    cafebabe
    15b6bb43
    37906fff
    c0de0000
    b7b96453
    7a2b03ab
    7ba5389c
    e9331712
    6b5d974d
    f30c6884
    dcb651c5
    e120c1da
]]></sourcecode>
        </section>
        <section anchor="rtp-packet-with-empty-2-byte-header-extension-and-csrc-fields-1">
          <name>RTP Packet with Empty Two-Byte Header Extension and CSRC Fields</name>
          <t>RTP Packet:</t>
          <sourcecode type="test-vectors"><![CDATA[
    920f123b
    decafbad
    cafebabe
    0001e240
    0000b26e
    10000000
    abababab
    abababab
    abababab
    abababab
]]></sourcecode>
          <t>Encrypted RTP Packet:</t>
          <sourcecode type="test-vectors"><![CDATA[
    920f123b
    decafbad
    cafebabe
    dcb38c9e
    48bf95f4
    c2de0000
    61ee432c
    f9203170
    76613258
    d3ce4236
    c06ac429
    681ad084
    13512dc9
    8b5207d8
]]></sourcecode>
        </section>
      </section>
    </section>

    <section anchor="acknowledgements" numbered="false">
      <name>Acknowledgements</name>
      <t>The authors wish to thank <contact fullname="Lennart Grahl"/> for
      pointing out many of the issues with the existing header encryption
      mechanism, as well as suggestions for this proposal.  Thanks also to
      <contact fullname="Jonathan Lennox"/>, <contact fullname="Inaki
      Castillo"/>, and <contact fullname="Bernard Aboba"/> for their reviews
      and suggestions.</t>
    </section>


  </back>

</rfc>
