[Webkit-unassigned] [Bug 156114] New: WebCrypto can generate but fails to export RSA-OAEP-256 keys
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Apr 1 11:18:10 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=156114
Bug ID: 156114
Summary: WebCrypto can generate but fails to export
RSA-OAEP-256 keys
Classification: Unclassified
Product: WebKit
Version: Safari Technology Preview
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: WebCore Misc.
Assignee: webkit-unassigned at lists.webkit.org
Reporter: roustem at agilebits.com
crypto.webkitSubtle.generateKey({
name: "RSA-OAEP",
modulusLength: 2048,
publicExponent: new Uint8Array([0x01, 0x00, 0x01]),
hash: {name: "SHA-256"}
}, true, ["encrypt", "decrypt" ]).then((keypair) => {
console.log("Generated Key Pair:", keypair);
return crypto.webkitSubtle.exportKey("jwk", keypair.publicKey);
}).then((keydata) => {
console.log("Key Data:", keydata);
}).catch((error) => {
console.log("Error: ", error);
});
The code above should be able log both the newly Generated Key Pair and also log the Key Data.
It successfully generates the key pair:
[Log] Generated Key Pair: â KeyPair {publicKey: Key, privateKey: Key}
KeyPair {publicKey: Key, privateKey: Key}KeyPairprivateKey: Key {type: "private", extractable: true, algorithm: Object, usages: ["decrypt", "encrypt"]}KeypublicKey: Key {type: "public", extractable: true, algorithm: Object, usages: ["decrypt", "encrypt"]}KeyKeyPair Prototype
But not able to export it:
[Log] Error:
TypeError: Key algorithm and size do not map to any JWK algorithm identifier
exportKey
promiseReactionJob
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160401/270dcce4/attachment.html>
More information about the webkit-unassigned
mailing list