1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-28 01:59:06 -05:00
denoland-deno/ext
Santhanam 52da60ed53
fix(deno/ext): Fix WebCrypto API's deriveKey (#19545)
Fixes a bug I noticed when deriving a key based from `ECDH`. Similar
issue is also mentioned in #14693, where they derive a key using
`PBKDF2`

- In the WebCrypto API, `deriveKey()` is equivalent to `deriveBits()`
followed by `importKey()`
- But, `deriveKey()` requires just `deriveKey` in the `usages` of the
`baseKey` parameter. The `deriveBits` usage is not required to be
allowed. This is the uniform behaviour in Node, Chrome and Firefox.
- The impl currently has userland-accessible `SubtleCrypto.deriveKey()`
and `SubtleCrypto.deriveBits()`, as well as an internal `deriveBits()`
(this is the one that accesses the ffi).
- Also, `SubtleCrypto.deriveKey()` checks if `deriveKey` is an allowed
usage and `SubtleCrypto.deriveBits()` checks if `deriveBits` is an
allowed usage, as required.
- However, the impl currently calls the userland accessible
`SubtleCrypto.deriveBits()` in `SubtleCrypto.deriveKey()`, leading to an
error being thrown if the `deriveBits` usage isn't present.
- Fixed this by making it call the internal `deriveBits()`
instead.
2023-06-19 13:26:58 +05:30
..
broadcast_channel chore: forward v1.34.3 release commit to main (#19526) 2023-06-16 01:55:31 +02:00
cache chore: forward v1.34.3 release commit to main (#19526) 2023-06-16 01:55:31 +02:00
console chore: forward v1.34.3 release commit to main (#19526) 2023-06-16 01:55:31 +02:00
crypto fix(deno/ext): Fix WebCrypto API's deriveKey (#19545) 2023-06-19 13:26:58 +05:30
fetch chore: forward v1.34.3 release commit to main (#19526) 2023-06-16 01:55:31 +02:00
ffi chore: forward v1.34.3 release commit to main (#19526) 2023-06-16 01:55:31 +02:00
fs chore: forward v1.34.3 release commit to main (#19526) 2023-06-16 01:55:31 +02:00
http chore: forward v1.34.3 release commit to main (#19526) 2023-06-16 01:55:31 +02:00
io chore: forward v1.34.3 release commit to main (#19526) 2023-06-16 01:55:31 +02:00
kv chore(kv) fix and re-enable queue test (#19529) 2023-06-17 15:02:32 -07:00
napi chore: forward v1.34.3 release commit to main (#19526) 2023-06-16 01:55:31 +02:00
net chore: forward v1.34.3 release commit to main (#19526) 2023-06-16 01:55:31 +02:00
node fix(ext/node): remove fromFileUrl from "node:path" (#19504) 2023-06-16 19:43:59 +09:00
tls chore: forward v1.34.3 release commit to main (#19526) 2023-06-16 01:55:31 +02:00
url chore: forward v1.34.3 release commit to main (#19526) 2023-06-16 01:55:31 +02:00
web chore: forward v1.34.3 release commit to main (#19526) 2023-06-16 01:55:31 +02:00
webidl chore: forward v1.34.3 release commit to main (#19526) 2023-06-16 01:55:31 +02:00
websocket chore: forward v1.34.3 release commit to main (#19526) 2023-06-16 01:55:31 +02:00
webstorage chore: forward v1.34.3 release commit to main (#19526) 2023-06-16 01:55:31 +02:00