On MS Edge following unwrapping code works:
window.crypto.subtle.unwrapKey(
"raw",
wrappedKey,
derivedKey,
{ "name": "AES-KW", iv: iv },
{ "name": "AES-CBC", iv: iv },
false,
["decrypt"]
)
The IE11 implementation is based on a unfinished version of the W3C WebCrypto APIs, there is a documentation but there isn't any example code available and my tries have not worked so far. Following does not throw an error on IE11 but the resulting key is null:
window.msCrypto.subtle.unwrapKey(
wrappedKey,
{
"name": "AES-KW",
iv: iv
},
e.target.result,
false,
["decrypt"]
)
Here is the JSFiddle that you can run.
You could use a shim, like webcrypto-shim to fix the incomplete implementation of IE11
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With