Skip to content

Conversation

@panva
Copy link
Member

@panvapanva commented Jun 13, 2022

Fixes import of raw CFRG public keys in Web Crypto API.

Before:

constx=Buffer.from(crypto.generateKeyPairSync('ed25519').publicKey.export({format: 'jwk'}).x,'base64')awaitcrypto.subtle.importKey('raw',x,'Ed25519',true,['verify'])
DOMException [OperationError]: Unable to import CFRG key at new DOMException (node:internal/per_context/domexception:53:5) at __node_internal_ (node:internal/util:502:10) at Object.cfrgImportKey (node:internal/crypto/cfrg:300:15) at SubtleCrypto.importKey (node:internal/crypto/webcrypto:528:10) 

After:

CryptoKey{type: 'public', extractable: true, algorithm:{name: 'Ed25519' }, usages: [ 'verify' ] } 

@panvapanva added crypto Issues and PRs related to the crypto subsystem. experimental Issues and PRs related to experimental features. webcrypto labels Jun 13, 2022
@panvapanva requested review from jasnell and tniessenJune 13, 2022 13:21
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/crypto

@nodejs-github-botnodejs-github-bot added the needs-ci PRs that need a full CI run. label Jun 13, 2022
@panvapanva added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 13, 2022
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 13, 2022
@nodejs-github-bot

This comment was marked as outdated.

@panvapanva added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jun 13, 2022
@panva
Copy link
MemberAuthor

@twiss FYI

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot
Copy link
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/44546/

@panvapanva added the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 15, 2022
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 15, 2022
@nodejs-github-botnodejs-github-bot merged commit 5fad0b9 into nodejs:masterJun 15, 2022
@nodejs-github-bot
Copy link
Collaborator

Landed in 5fad0b9

danielleadams pushed a commit that referenced this pull request Jun 16, 2022
PR-URL: #43404 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
@danielleadamsdanielleadams mentioned this pull request Jun 16, 2022
targos pushed a commit that referenced this pull request Jul 12, 2022
PR-URL: #43404 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
targos pushed a commit that referenced this pull request Jul 31, 2022
PR-URL: #43404 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
@targostargos mentioned this pull request Aug 3, 2022
guangwong pushed a commit to noslate-project/node that referenced this pull request Oct 10, 2022
@panvapanva deleted the fix-cfrg-import-raw branch October 13, 2022 09:12
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.cryptoIssues and PRs related to the crypto subsystem.experimentalIssues and PRs related to experimental features.needs-ciPRs that need a full CI run.webcrypto

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@panva@nodejs-github-bot@jasnell@tniessen