Skip to content

Conversation

@youennf
Copy link
Collaborator

@youennf youennf commented Nov 18, 2025

Fixes #259


Preview | Diff

index.bs Outdated
<pre class="idl">
typedef (SFrameTransform or RTCRtpScriptTransform) RTCRtpTransform;
typedef (SFrameSenderTransform or RTCRtpScriptTransform) RTCRtpSenderTransform;
typedef (SFrameReceiverTransform or RTCRtpScriptTransform) RTCRtpReceierTransform;
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo RTCRtpReceierTransform -> RTCRtpReceiverTransform

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks, fixed

index.bs Outdated
1. [=Resolve=] |promise| with undefined.
1. Return |promise|.

// FIXME: Should SFrameTransform receiver be made aware of the current key in use, so that it would call removeEncryptionKey appropriately.
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove fixme and file an issue instead

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

Removing fixme in favour of w3c#289
index.bs Outdated
<pre class="idl">
typedef (SFrameTransform or RTCRtpScriptTransform) RTCRtpTransform;
typedef (SFrameSenderTransform or RTCRtpScriptTransform) RTCRtpSenderTransform;
typedef (SFrameReceiverTransform or RTCRtpScriptTransform) RTCRtpReceierTransform;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
typedef (SFrameReceiverTransform or RTCRtpScriptTransform) RTCRtpReceierTransform;
typedef (SFrameReceiverTransform or RTCRtpScriptTransform) RTCRtpReceiverTransform;

1. If |keyID| is a {{bigint}} which cannot be represented as a integer between 0 and 2<sup>64</sup>-1 inclusive, [=reject=] |promise| with a {{RangeError}} exception and abort these steps.
1. Set |this|.`[[currentKeyId]]` to |keyId|.
1. [=In parallel=], run the following steps:
1. Set |key| and |keyID| as key material to use for the SFrame transform encryption algorithm, as defined by [[RFC9605]].
Copy link
Member

Choose a reason for hiding this comment

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

Nit: "Set as" is a bit confusing to me. It's the reverse of (yet similar looking to) "set a to b" which usually means a = b, not b = a... How about:

Suggested change
1. Set |key| and |keyID| as key material to use for the SFrame transform encryption algorithm, as defined by [[RFC9605]].
1. Set the SFrame transform encryption algorithm's key material to |key| and |keyID|, as defined by [[RFC9605]].

1. [=Queue a task=] to [=resolve=] |promise| with undefined.
1. Return |promise|.

The <dfn method for="SFrameDecrypterKeyManager">addEncryptionKey(|key|, |keyID|)</dfn> method steps are:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
The <dfn method for="SFrameDecrypterKeyManager">addEncryptionKey(|key|, |keyID|)</dfn> method steps are:
The <dfn method for="SFrameDecrypterKeyManager">addDecryptionKey(|key|, |keyID|)</dfn> method steps are:

1. [=Resolve=] |promise| with undefined.
1. Return |promise|.

The <dfn method for="SFrameDecrypterKeyManager">removeEncryptionKey(|key|, |keyID|)</dfn> method steps are:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
The <dfn method for="SFrameDecrypterKeyManager">removeEncryptionKey(|key|, |keyID|)</dfn> method steps are:
The <dfn method for="SFrameDecrypterKeyManager">removeDecryptionKey(|key|, |keyID|)</dfn> method steps are:

Comment on lines +375 to +376
1. Let |keyStore| be the key store used for the SFrame transform algorithm, as defined by [[RFC9605]].
1. Set an entry to |keyStore| with |keyId| as key and |keyValue| as value. This overrides any existing entry to |keyId|.
Copy link
Member

Choose a reason for hiding this comment

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

I see "key store" matches language in RFC9605, which is nice.

But I also wonder if we could use infra here. Is it an https://infra.spec.whatwg.org/#ordered-map ?

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.

SFrameTransform needs more key management than "set"

3 participants