-
Notifications
You must be signed in to change notification settings - Fork 30k
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: X25519 and X448 and ECDH #26626
Comments
I don't think it makes sense to bolt X448/X25519 support onto Supporting them through
The difference is because "X448" and "X25519" are valid NIDs (identifiers.) That doesn't mean they're valid curve names, however. To wit, |
@bnoordhuis Ed25519 and Ed448 keys through generateKeyPair is already on the way.
Thanks for pointing that out. |
For technical background: X448 and X25519 on the other hand are implemented through the EVP_PKEY functions - more specifically However, after thinking about it some more, extending I don't know exactly how feasible that is but my gut feeling is that it's doable. |
PR-URL: #26774 Refs: #26626 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #26774 Refs: #26626 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: James M Snell <[email protected]>
I'm interested in migrating to this API from |
I recall @tniessen wanted to take a stab at this a few months back. |
Any updates on this issue? If anyone has any information on when we can expect x25519/x448 included in crypto.createECDH(), it would be much appreciated. |
@jurelik I don't see that anyone volunteered to implement this, much less comitted to a timeline. Are you interested in implementing the feature? We are always looking for more collaborators on crypto support, and there are people who would help get a PR in shape if you needed any help along the way. |
Is anyone working on this? Decentralized Identity Foundation (DIF) is very interested in using this feature. X25519 became quite popular in our community. We are about to finalize a spec that uses ECDH-ES (X25519) and it would be great to have a node reference implementation: https://github.com/decentralized-identity/did-siop/blob/master/docs/index.html. |
Resolved by |
Is your feature request related to a problem? Please describe.
Implementing CFRG curves ECDH-ES
Resources:
Describe the solution you'd like
The following WIP on Node already paves the way for EdDSA signatures
👇
To complete the implementation i'd like X25519 and X448 curves/functions to be usable with
crypto.createECDH(curveName)
to get JOSE ECDH-ES with these OKP keys working.I understand from this thread (#18770), particularly this comment and the conversation below that it may end up being a separate API and that's fine.
It seems the curves are already somewhat in because the returned error differs when providing nonsense vs. valid crv/function name.The text was updated successfully, but these errors were encountered: