Skip to content

crypto: support JWK objects in create(Public|Private)Key - #37254

Closed
panva wants to merge 1 commit into
nodejs:masterfrom
panva:crypto-jwk-keyobject-import
Closed

panva wants to merge 1 commit into
nodejs:masterfrom
panva:crypto-jwk-keyobject-import

Conversation

@panva

@panva panva commented Feb 6, 2021 •

Copy link
Copy Markdown
Member

This enables create(Public|Private)Key JWK inputs.

crypto.createPublicKey({ key: jwk, format: 'jwk' })

  • Allows both private and public JWKs, always creates a PublicKeyObject
  • Enabled key types RSA, EC (P-256, secp256k1, P-384, P-521), OKP (Ed25519, Ed448, X25519, X448)

crypto.createPrivateKey({ key: jwk, format: 'jwk' })

  • Allows private JWKs, always creates a PrivateKeyObject
  • Enabled key types RSA, EC (P-256, secp256k1, P-384, P-521), OKP (Ed25519, Ed448, X25519, X448)

crypto.createSecretKey(jwk)

  • Allows "oct" JWKs, always creates a SecretKeyObject
  • Enabled key types oct

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. crypto Issues and PRs related to the crypto subsystem. errors Issues and PRs related to JavaScript errors originating in Node.js core. semver-minor PRs that contain new features and should be released in the next minor version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants