-
Notifications
You must be signed in to change notification settings - Fork 22
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
enable import/export raw ec-keys #21
Comments
Chrome doesn't support Scriptvar keys = await crypto.subtle.generateKey({name: "ECDSA", namedCurve: "P-256"}, true, ["sign", "verify"]);
var raw = await crypto.subtle.exportKey("raw", keys.privateKey); // Error
var raw = await crypto.subtle.exportKey("raw", keys.publicKey);
console.log(raw);
@armfazh Do you have any ideas how EC private key raw must look like? |
For P-256, it's an arraybuffer of 32 bytes. |
after RTFM specification: https://www.w3.org/TR/WebCryptoAPI/#ecdsa-operations |
currently
importKey
andexportKey
methods work only on public keys, but not on privateKeys.The text was updated successfully, but these errors were encountered: