-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
crypto: generateKeyPair('ec') should not support NODE-ED* and NODE-X* #37063
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
Conversation
tniessen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is the only public API change (outside of WebCrypto) from the referenced PR, but I'm not 100% sure. It definitely fixes the problem with generateKeyPair.
|
I still have to manage to change |
| } | ||
|
|
||
| params->id_ = GetCurveFromName(*name); | ||
| params->id_ = GetOKPCurveFromName(*name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAICT id_ is only used to discern between X25519, X448 and then it throws everything else in the default bucket anyway, therefore returning the specific EC curve ids is not necessary and using GetOKPCurveFromName is ok.
Co-authored-by: Tobias Nießen <tniessen@users.noreply.github.com>
|
Landed in 8b65004 |
The following "curves" were added to the
'ec'key type in #36879.NODE-ED25519NODE-ED448NODE-X25519NODE-X448However, none of these are pure EC curves, for example, Curve25519 does not work with ECDSA, which is one of the reasons why
crypto.getCurves()does not include Curve25519. This PR makes these "curves" only recognized from the Web Cryptography API experimental interface.Fixes #37055
cc @jasnell @tniessen