-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
feat(ext/crypto): implement importKey/exportKey formats (jwk, spki, pkcs8) for ECDSA/ECDH #13013
feat(ext/crypto): implement importKey/exportKey formats (jwk, spki, pkcs8) for ECDSA/ECDH #13013
Conversation
Co-authored-by: Divy Srivastava <[email protected]>
…deno into crypto-rsa-pss-import
…s/deno into crypto-ec-import-export
I'll do some test with and without jose tomorrow and report my findings! |
Alright! I've built deno from your crypto-ec-import-export branch, @seanwykes, and tested with this code: https://gist.github.com/oles/7b1f4569805a7606056d0c867821d4c7 It no longer errors out with
Which seems promising, but it then errors out at the signing:
So I changed the
to
AND IT WORKED 🥳 |
You shouldn't have to do that. The webcrypto implementation should. |
As I thought, but glad it could be set manually to verify the rest! |
The key should look like this:
no hash and a namedCurve. |
Going in the right direction. |
@panva - I'm having trouble debugging the jose test cases, for example, Have you seen this behaviour before? I'm on a MAC/M1. |
@seanwykes try running with |
Done that. it just runs the tests without stopping.
|
It's not expected that this PR makes everything pass. But to answer your question, no i have no idea how to debug a deno runtime. |
Right... This is actually #12584 |
I am interested in two fails .. I'll run as isolated code and not tests to see what's up. |
Ye, the only thing missing in those two tests was jwk export (on encrypt), and import (on decrypt) of the ECDH key in |
towards #11690, implementing importKey(jwk, spki, pkcs8) and exportKey(jwk, spki, pkcs8) for ECDSA/ECDH*
Based on and requires refacs from PR#12022. When that lands, I'll rebase the PR.
Note: * Curve P-256 fully implemented, P-384 only partially with support for EC Public Keys only.