Skip to content

rtp header encryption changes - #256

Open
fippo wants to merge 3 commits into
w3c:mainfrom
fippo:cryptex
Open

rtp header encryption changes#256
fippo wants to merge 3 commits into
w3c:mainfrom
fippo:cryptex

Conversation

@fippo

@fippo fippo commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

as proposed in
https://www.w3.org/2026/06/16-webrtc-minutes.html#9a7b

(finally got around to doing it)


Preview | Diff

Comment thread index.html
<p>
In addition, the user agent MUST consider the use of [[RFC9335]]
mandatory, as described in [[RFC9335]] Section 5.2. Received RTP packets
which are not encrypted with cryptex are not processed further.

@youennf youennf Jul 30, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it clear how these dropped packets would appear on webrtc-stats? Will they even appear?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't have a SRTP unprotect failure counter so they would be dropped silently. Might be a useful thing to have regardless (I am looking at you error=9)

Comment thread index.html Outdated
Negotiate RTP header encryption as defined in [[RFC9335]]. If the remote
endpoint does not indicate that it is capable of receiving RTP packets
encrypted with cryptex, RTP header extensions and CSRCs are sent in the
clear.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens in case the remote endpoint supports cryptex in that case?
Now that we have disable, I would think that the UA MUST send cryptex packets.
If it cannot be a MUST, a SHOULD would be good.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. The current definition of disable leans towards "don't use it" but that needs text clarifying that it is supposed to ignore cryptex in the remote description too.
I'm generally in favor of "opportunistic cryptography" so :+1 for adding a "if the remote offers, you may use it"

If disable stays such a opt-out it might be good to mark it at risk upfront to make it clear we aim for more crypto.

(the case where the offerer is configured with disable and the answerer with require would break in both cases I think, it just depends how badly... don't shoot yourself in the foot)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So something like this?

Suggested change
clear.
clear.
If the remote endpoint indicates that it is capable of
receiving RTP packets encrypted with cryptex, the
user agent SHOULD apply cryptex.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think we should narrow cryptex which says

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.

@youennf

youennf commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Overall looks good to me.

Comment thread index.html Outdated
Negotiate RTP header encryption as defined in [[RFC9335]]. If the remote
endpoint does not indicate that it is capable of receiving RTP packets
encrypted with cryptex, RTP header extensions and CSRCs are sent in the
clear.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So something like this?

Suggested change
clear.
clear.
If the remote endpoint indicates that it is capable of
receiving RTP packets encrypted with cryptex, the
user agent SHOULD apply cryptex.

Comment thread index.html Outdated
Comment thread index.html
Comment on lines +1447 to +1451
In setConfiguration in [[RTCWEB-JSEP]] section 4.1.18, replace
"The bundle and RTCP-multiplexing policies MUST NOT be changed after the construction of the PeerConnection."
with
"The bundle policy, the RTCP-multiplexing policy and the RTP header encryption policy
MUST NOT be changed after the construction of the PeerConnection."

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably don't need to modify JSEP to add an additional restriction. Might it suffice to say:

Suggested change
In setConfiguration in [[RTCWEB-JSEP]] section 4.1.18, replace
"The bundle and RTCP-multiplexing policies MUST NOT be changed after the construction of the PeerConnection."
with
"The bundle policy, the RTCP-multiplexing policy and the RTP header encryption policy
MUST NOT be changed after the construction of the PeerConnection."
This spec adds the following restriction above and beyond what is described for
setConfiguration in [[RTCWEB-JSEP]] section 4.1.18:
"The RTP header encryption policy MUST NOT be changed after the construction of the PeerConnection."

Either way.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fippo and others added 2 commits August 7, 2026 09:01
Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants