crypto: generateKeyPair('ec') should not support NODE-ED* and NODE-X*#37063
Closed
panva wants to merge 4 commits intonodejs:masterfrom
Closed
crypto: generateKeyPair('ec') should not support NODE-ED* and NODE-X*#37063panva wants to merge 4 commits intonodejs:masterfrom
panva wants to merge 4 commits intonodejs:masterfrom
Conversation
Collaborator
tniessen
reviewed
Jan 25, 2021
tniessen
reviewed
Jan 25, 2021
Member
tniessen
left a comment
There was a problem hiding this comment.
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.
Member
Author
|
I still have to manage to change |
panva
commented
Jan 25, 2021
| } | ||
|
|
||
| params->id_ = GetCurveFromName(*name); | ||
| params->id_ = GetOKPCurveFromName(*name); |
Member
Author
There was a problem hiding this comment.
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>
Collaborator
jasnell
approved these changes
Jan 25, 2021
tniessen
approved these changes
Jan 25, 2021
juanarbol
approved these changes
Jan 26, 2021
Member
Author
|
Landed in 8b65004 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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