← Chrome 160 reference · All APIs

v160 · webrtc · enabled by default

RTP Header Extension Encryption

Implements RFC 9335 (CRYPTEX) in WebRTC so SRTP encryption covers RTP header extensions and contributing source (CSRC) identifiers, controlled via the RTCConfiguration.rtpHeaderEncryptionPolicy option ("disable", "negotiate", or "require") and signaled with the a=cryptex SDP attribute.

Limited availability — rtpHeaderEncryptionPolicy / CRYPTEX is not Baseline (base WebRTC is Baseline Widely available since 2022-07-15)

  • Chrome · 160 (desktop, Android, WebView)
  • Edge · Chromium-based (no BCD entry yet)
  • Firefox · No release (WG rep approved spec PR #256)
  • Safari · No release (WG rep approved spec PR #256)

The base webrtc web-feature is Baseline Widely available since 2022-07-15 per webstatus.dev, but RTCConfiguration.rtpHeaderEncryptionPolicy is marked at risk in W3C WebRTC Extensions and has no entry yet in BCD api/RTCPeerConnection.json (checked 2026-11-24). Chrome 160 is the first browser engine to ship CRYPTEX negotiation.

at a glance

Shipped inChrome 160 (desktop, Android, Android WebView), enabled by default — filed under “Enabled by default” in the milestone=160 listing and ChromeStatus API record
Runtime flagBlink runtime feature RtcRtpHeaderEncryptionPolicy in runtime_enabled_features.json5 (Finch name RtcRtpHeaderEncryptionPolicy; no dedicated chrome://flags entry)
SpecificationW3C WebRTC Extensions — RTP Header Encryption (PR #256); RFC 9335 (CRYPTEX)
ExplainerWebRTC RTP Header Extension Encryption explainer
Intentblink-dev Intent to Ship
Tracking bugissues.chromium.org/455813732
Web platform testswebrtc-extensions/RTCConfiguration-rtpHeaderEncryptionPolicy.html (WPT source)
ChromeStatus5177732519559168 — RTP Header Extension Encryption

why it exists

Standard SRTP (RFC 3711) encrypts RTP media payloads while leaving the RTP header, contributing source (CSRC) identifiers, and RTP header extensions in the clear. That leaks packet-level metadata such as client-to-mixer audio levels (revealing voice activity), absolute send times, transport feedback sequence numbers, and conference participant identifiers to passive network observers. The older RFC 6904 mechanism required cumbersome per-extension negotiation and did not encrypt CSRCs. RFC 9335 (CRYPTEX) reuses existing SRTP encryption keys (implemented in libSRTP) to encrypt all RTP header extensions and CSRCs at once, negotiated with a single a=cryptex SDP attribute.

Source: RTP Header Extension Encryption explainer; ChromeStatus motivation (5177732519559168); RFC 9335.

Syntax

Normative WebIDL from W3C WebRTC Extensions and Chromium’s rtc_configuration.idl:

enum RTCRtpHeaderEncryptionPolicy {
  "disable",
  "negotiate",
  "require"
};

partial dictionary RTCConfiguration {
  RTCRtpHeaderEncryptionPolicy rtpHeaderEncryptionPolicy = "negotiate";
};

This reference covers all three parts of the Chrome 160 contract: the RTCRtpHeaderEncryptionPolicy enum, the RTCConfiguration.rtpHeaderEncryptionPolicy dictionary member, and SDP a=cryptex negotiation and packet enforcement.

Source: W3C WebRTC Extensions — RTP Header Encryption; Blink rtc_configuration.idl.

RTCRtpHeaderEncryptionPolicy enum

Inputs & allowed values. RTCRtpHeaderEncryptionPolicy accepts exactly three string values when passed in new RTCPeerConnection({ rtpHeaderEncryptionPolicy }). Any unrecognized string fails WebIDL enum conversion with a TypeError before the connection is created.

RTCRtpHeaderEncryptionPolicy values and wire/SDP effects (from W3C WebRTC Extensions and WPT)
ValueSDP a=cryptex in offers / answersRemote omits a=cryptexWire behavior
"disable"Never included; ignored if present in remote SDPAcceptedRTP header extensions and CSRCs are sent in the clear (standard RFC 3711 SRTP)
"negotiate" (spec & IDL default)Included in offers and in answers to offers containing a=cryptexAccepted; falls back to clear header extensionsEncrypts header extensions and CSRCs via RFC 9335 once both endpoints signal a=cryptex
"require"Included in offers and answers for all RTP media sectionssetRemoteDescription() rejects with InvalidAccessErrorCRYPTEX is mandatory (RFC 9335 §5.2); received RTP packets not encrypted with CRYPTEX are dropped

Outputs & rollout note. Both the W3C specification, Blink’s rtc_configuration.idl, and WPT define "negotiate" as the default value. The ChromeStatus activation note mentions considering "disable" during staged rollout to reduce risk before switching to "negotiate"; check pc.getConfiguration().rtpHeaderEncryptionPolicy at runtime rather than assuming the default without probing.

Source: W3C WebRTC Extensions — RTCRtpHeaderEncryptionPolicy; w3c/webrtc-extensions#256; WPT RTCConfiguration-rtpHeaderEncryptionPolicy.html.

RTCConfiguration.rtpHeaderEncryptionPolicy member

Inputs. Passed optionally in the configuration dictionary to new RTCPeerConnection(configuration). Applies globally to the entire RTCPeerConnection (there is no per-transceiver override). If omitted, the dictionary default "negotiate" applies.

Outputs. Reflected on pc.getConfiguration().rtpHeaderEncryptionPolicy as the active RTCRtpHeaderEncryptionPolicy string ("disable", "negotiate", or "require"). In browsers that do not implement this extension, pc.getConfiguration().rtpHeaderEncryptionPolicy is undefined even if passed to the constructor.

Immutability & lifecycle. Like bundlePolicy and rtcpMuxPolicy, rtpHeaderEncryptionPolicy is fixed at construction time. Calling pc.setConfiguration() with a different rtpHeaderEncryptionPolicy fails per the W3C set-the-configuration algorithm (WebRTC Extensions) with InvalidModificationError.

Source: W3C WebRTC Extensions — RTCConfiguration extensions; Blink rtc_peer_connection.cc.

SDP a=cryptex negotiation and packet enforcement

Inputs & SDP placement. The a=cryptex SDP attribute is assigned to the TRANSPORT category (RFC 8859 / RFC 9335 §4). It may appear at session level or on media sections. Under BUNDLE, a=cryptex must apply either to every RTP-based m= section (audio, video) in the bundle group or to none of them. It is never placed on data-channel sections (m=application ... UDP/DTLS/SCTP webrtc-datachannel), and an offer containing only a data channel is accepted under rtpHeaderEncryptionPolicy: "require" without a=cryptex.

Outputs & state transitions.

Source: WPT RTCConfiguration-rtpHeaderEncryptionPolicy.html; RFC 9335 §4–5; RFC 8859.

Errors and recovery

Source: W3C WebRTC Extensions — RTP Header Encryption; WPT RTCConfiguration-rtpHeaderEncryptionPolicy.html.

Context and exposure

RTCPeerConnection and RTCConfiguration.rtpHeaderEncryptionPolicy are exposed in Window contexts only (not Web Workers). Constructing RTCPeerConnection and applying rtpHeaderEncryptionPolicy does not require camera or microphone permissions, though adding captured media tracks via navigator.mediaDevices.getUserMedia() requires a secure context and user permission. No extra permissions policy or user activation is required for CRYPTEX negotiation.

Source: Blink rtc_peer_connection.idl; W3C WebRTC Extensions.

Examples

Live interactive probe for RTCConfiguration.rtpHeaderEncryptionPolicy. Source: Chrome Platform Showcase (policy-probe); more demos at v160/rtp-header-extension-encryption.

Feature detection and requiring CRYPTEX

function supportsRtpHeaderEncryptionPolicy() {
  const probe = new RTCPeerConnection();
  try {
    return typeof probe.getConfiguration().rtpHeaderEncryptionPolicy === "string";
  } finally {
    probe.close();
  }
}

async function connectWithCryptexRequired(remoteOfferSdp) {
  if (!supportsRtpHeaderEncryptionPolicy()) {
    throw new Error("Browser does not support RTCConfiguration.rtpHeaderEncryptionPolicy");
  }

  // Enforce RFC 9335 CRYPTEX on all RTP m= sections
  const pc = new RTCPeerConnection({
    rtpHeaderEncryptionPolicy: "require",
  });

  try {
    await pc.setRemoteDescription({ type: "offer", sdp: remoteOfferSdp });
  } catch (err) {
    if (err.name === "InvalidAccessError") {
      // Remote peer did not include a=cryptex for RTP media sections
      pc.close();
      throw new Error("Remote endpoint does not support RFC 9335 CRYPTEX", { cause: err });
    }
    throw err;
  }

  await pc.setLocalDescription(); // Answer includes a=cryptex
  return pc;
}
Source: WPT RTCConfiguration-rtpHeaderEncryptionPolicy.html; W3C WebRTC Extensions.

Checking negotiated a=cryptex in local and remote SDP

function hasCryptexOnAllRtpSections(sdp) {
  const sections = sdp.split(/\r?\n(?=m=)/);
  const sessionHasCryptex = /^a=cryptex\b/m.test(sections[0] ?? "");
  const rtpSections = sections.slice(1).filter((s) => !s.startsWith("m=application "));
  return (
    rtpSections.length > 0 &&
    rtpSections.every((s) => sessionHasCryptex || /^a=cryptex\b/m.test(s))
  );
}

// Default "negotiate" policy offers a=cryptex and falls back if remote omits it
const pc = new RTCPeerConnection({ rtpHeaderEncryptionPolicy: "negotiate" });
pc.addTransceiver("audio");
const offer = await pc.createOffer();
console.log("Offer advertises a=cryptex:", hasCryptexOnAllRtpSections(offer.sdp));
Source: WPT RTCConfiguration-rtpHeaderEncryptionPolicy.html; RFC 9335 §4.

Browser compatibility

Browser support for RTCConfiguration.rtpHeaderEncryptionPolicy and RFC 9335 CRYPTEX. BCD has no subfeature yet; status is compiled from ChromeStatus, standards-positions, and WPT (checked 2026-11-24).
Browser / engineSupportEvidence / notes
Chrome (desktop, Android, WebView)160Enabled by default in Chrome 160 per ChromeStatus 5177732519559168 (Blink runtime feature RtcRtpHeaderEncryptionPolicy)
EdgeUnknown
(Chromium)
Follows Chromium; no dedicated BCD entry yet
FirefoxNo releasemozilla/standards-positions#1413 (No formal signal; Mozilla WG rep approved w3c/webrtc-extensions#256)
SafariNo releaseWebKit/standards-positions#671 (No formal signal; Apple WG rep approved w3c/webrtc-extensions#256)
Non-browser (Pion WebRTC)In progressInteroperability implementation tracked in pion/webrtc#3357
Source: ChromeStatus API record (5177732519559168); BCD api/RTCPeerConnection.json; wpt.fyi results.

Security and privacy

Encrypting RTP header extensions and CSRCs closes a long-standing metadata leak in SRTP streams: without CRYPTEX, an on-path observer can infer who is speaking in a conference call from RFC 6464 audio-level header extensions and CSRC lists, or correlate traffic timing from absolute-send-time headers, even though the media payload itself is encrypted. Reusing existing SRTP keys avoids additional key-exchange round trips.

Downgrade protection. Under the default "negotiate" policy, an active signaling attacker who can strip a=cryptex from SDP can cause peers to fall back to unencrypted header extensions. Applications that require header-extension confidentiality against signaling downgrades MUST set rtpHeaderEncryptionPolicy: "require" on both peers (and protect SDP signaling integrity); under "require", Chromium rejects remote descriptions missing a=cryptex with InvalidAccessError and drops received RTP packets that are not CRYPTEX-encrypted. Offering a "disable" option does not introduce a downgrade vulnerability because CRYPTEX negotiation is opt-in unless "require" is specified.

Source: RFC 9335 §7 Security Considerations; ChromeStatus security_risks (5177732519559168); w3c/webrtc-extensions#256.

Specifications

see also