-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
crypto(webcrypto): ECDH Named curve mismatch #35812
Comments
I am not an expert on this, but I think |
@mmomtchev this ticket is not about JOSE per se. But even if it was then of course the three original EC curves are usable for ECDH-ES. secp256k1 isn't per it's jose registration, but that curve isn't supported by webcrypto at all |
Looking at the spec (webcrypto one) ecdh jwk key import does not work with jwk.alg at all. It seems this is indeed a bug in node's implementation. |
Sounds like it. Do you want to take a look at a fix @panva? |
@jasnell i'll take a stab at it. |
This fixes the importKey operation when importing a JWK for the ECDH algorithm. As per the Web Crypto API specification the JWK `alg` property is not checked (as opposed to ECDSA). fixes nodejs#35812
This fixes the importKey operation when importing a JWK for the ECDH algorithm. As per the Web Crypto API specification the JWK `alg` property is not checked (as opposed to ECDSA). PR-URL: #35855 Fixes: #35812 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
What steps will reproduce the bug?
This rejects
This works, difference is the presence of the JWK "alg" (Algorithm) Parameter
What is the expected behavior?
The key import promise should resolve. (I think, at least it does in Chromium's Web Crypto API implementation.
// cc @jasnell
The text was updated successfully, but these errors were encountered: