-
Notifications
You must be signed in to change notification settings - Fork 28
Add decryption/encryption dedicated APIs #288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
index.bs
Outdated
| <pre class="idl"> | ||
| typedef (SFrameTransform or RTCRtpScriptTransform) RTCRtpTransform; | ||
| typedef (SFrameSenderTransform or RTCRtpScriptTransform) RTCRtpSenderTransform; | ||
| typedef (SFrameReceiverTransform or RTCRtpScriptTransform) RTCRtpReceierTransform; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo RTCRtpReceierTransform -> RTCRtpReceiverTransform
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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]]. |
There was a problem hiding this comment.
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:
| 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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The <dfn method for="SFrameDecrypterKeyManager">removeEncryptionKey(|key|, |keyID|)</dfn> method steps are: | |
| The <dfn method for="SFrameDecrypterKeyManager">removeDecryptionKey(|key|, |keyID|)</dfn> method steps are: |
| 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|. |
There was a problem hiding this comment.
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 ?
Fixes #259
Preview | Diff