v160 · webrtc · failure modes
Require: downgrade guard
"negotiate" quietly falls back to clear headers if the other side — or anything rewriting SDP on the way — drops a=cryptex. "require" refuses: a remote description without it is rejected with InvalidAccessError, and “received RTP packets which are not encrypted with cryptex are not processed further.” Run real media (a synthetic canvas video and oscillator tone, no camera or microphone) between two in-page peers and watch getStats() prove each branch.
Pick a scenario
| kind | offerer outbound-rtp packetsSent | answerer inbound-rtp packetsReceived |
|---|---|---|
| audio | — | — |
| video | — | — |
why the dropped-packet branch matters
The answerer in scenario two did everything right: it was told the offer supported cryptex, it answered with a=cryptex and committed to receiving only cryptex packets. A middlebox removed the line on the way back, so the offerer believes cryptex was declined and sends header extensions in the clear. With "require" those packets are discarded — the call is visibly broken rather than silently leaking per-packet metadata. With "negotiate" (scenario four) the same tampering produces a working call with clear headers, and nothing in the API tells the app. This is the WPT case “rtpHeaderEncryptionPolicy "require" drops RTP packets not encrypted with cryptex”.