w3c / webcrypto

The W3C Web Cryptography API
https://w3c.github.io/webcrypto/
Other
263 stars 53 forks source link

Can we expose Crypto/SubtleCrypto to all Worklet / all scopes? #338

Open xyaoinum opened 1 year ago

xyaoinum commented 1 year ago

Is there any concern exposing Crypto/SubtleCrypto to all scopes, or all Worklet scopes, rather than just (Window, Worker)?

This is a desirable feature for the shared storage worklet (e.g. will make the aggregation key generation process easier).

twiss commented 1 year ago

Hey :wave: Apologies for the delay. Personally I don't see an issue with this, though it might be good to bring it up in the WebAppSec WG, to see if anyone else sees any concerns. (I can do so at some point, unless you want to do so?)

annevk commented 1 year ago

A problem with ShadowRealm exposure might be that this feature is conditional upon secure contexts. Perhaps that ought to be considered separately from worklets.

Also, do we have use cases for all worklets or just this one?

cc @Ms2ger