You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
generateKeyPair('ec') should not support NODE-ED* and NODE-X* #37055
The following "curves" were added to the 'ec' key type in #36879:
NODE-ED25519
NODE-ED448
NODE-X25519
NODE-X448
However, 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.
Node.js already supported these special algorithms through their own key types (thanks to #26554, #26774, and #31178):
This also means that two keys, both generated through some call to crypto.generateKeyPairSync('ec', { namedCurve }) result in different ASN.1 representations, which is also highly unusual and counter-intuitive.
#36879 technically also landed without full approval.
Activity
panva commentedon Jan 25, 2021
likely culrpit cc @jasnell
crypto: generateKeyPair('ec') should not support NODE-ED* and NODE-X*
crypto: generateKeyPair('ec') should not support NODE-ED* and NODE-X*