Closed
Description
Is your feature request related to a problem? Please describe.
Implementing CFRG curves ECDH-ES
Resources:
- https://tools.ietf.org/html/rfc7748 - Elliptic Curves for Security
- https://tools.ietf.org/html/rfc8037 - CFRG Elliptic Curve Diffie-Hellman (ECDH) and Signatures in JSON Object Signing and Encryption (JOSE)
Describe the solution you'd like
The following WIP on Node already paves the way for EdDSA signatures
- crypto: fix EdDSA support for KeyObject #26319
- crypto: add support for x25119 and x448 key pair generation #26774
- crypto: add crypto.sign() and crypto.verify() #26611
👇
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.