Skip to content
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

Mark Node.js createPrivateKey/createPublicKey unimplemented for now #817

Merged

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Jun 27, 2023

The Node.js compat crypto createPrivateKey and createPublicKey APIs are the rough equivalent to Web Crypto importKey for key pairs. Unfortunately they provide a range of options that are not currently supported by the Web Crypto implementation. The current Web Crypto implementation either needs to be refactored or duplicated in a number of ways in order to properly support createPrivateKey/createPublicKey. For now, we'll mark these apis as unimplemented and will revisit once the import key internals have been sufficiently refactored.

@jasnell jasnell requested a review from fhanau June 27, 2023 17:59
@jasnell jasnell changed the title Consolidate createPrivateKey/createPublicKey options validation Mark Node.js createPrivateKey/createPublicKey unimplemented for now Jun 27, 2023
@jasnell jasnell force-pushed the jsnell/nodejs-compat-crypto-no-key-generation branch from b7dcfcc to a1542bf Compare June 28, 2023 22:20
@jasnell jasnell force-pushed the jsnell/nodejs-compat-keyobject-createprivatekey-createpublickey branch from c51a81c to 723f41a Compare June 28, 2023 22:21
@jasnell jasnell force-pushed the jsnell/nodejs-compat-crypto-no-key-generation branch from a1542bf to e7e8f3f Compare June 28, 2023 23:16
@jasnell jasnell force-pushed the jsnell/nodejs-compat-keyobject-createprivatekey-createpublickey branch from 723f41a to 21c23df Compare June 28, 2023 23:17
Base automatically changed from jsnell/nodejs-compat-crypto-no-key-generation to main June 29, 2023 00:18
Implementing these cleanly will require a larger refactoring of the
current key import logic supporting Web Crypto as the currently
design makes a lot of assumptions that Web Crypto semantics are
being used. For now we'll just mark these as unimplemented and
revisit in a later iteration.
@jasnell jasnell force-pushed the jsnell/nodejs-compat-keyobject-createprivatekey-createpublickey branch from 21c23df to f34878b Compare June 29, 2023 00:19
@jasnell jasnell merged commit 004b251 into main Jun 29, 2023
@kentonv kentonv deleted the jsnell/nodejs-compat-keyobject-createprivatekey-createpublickey branch June 30, 2023 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants