FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

crypto: remove webcrypto HKDF and PBKDF2 default-applied lengths by panva · Pull Request #44945 · nodejs/node · GitHub

/ node Public

crypto: remove webcrypto HKDF and PBKDF2 default-applied lengths - #44945

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
panva:fix-webcrypto-remove-pbkdf2-default
Oct 12, 2022
Merged

crypto: remove webcrypto HKDF and PBKDF2 default-applied lengths#44945
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
panva:fix-webcrypto-remove-pbkdf2-default

Conversation

panva commented Oct 10, 2022

Copy link
Copy Markdown
Member

Both HKDF and PBKDF2 do not specify a default-applied length, this removes a possibly forgotten default used for initial development?

If length is null or zero, or is not a multiple of 8, then throw an OperationError.

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/crypto

nodejs-github-bot added crypto Issues and PRs related to the crypto subsystem. needs-ci PRs that need a full CI run. labels Oct 10, 2022
panva added experimental Issues and PRs related to experimental features. webcrypto and removed needs-ci PRs that need a full CI run. labels Oct 10, 2022
panva requested a review from jasnell October 10, 2022 08:20
panva added needs-ci PRs that need a full CI run. request-ci Add this label to start a Jenkins CI on a PR. labels Oct 10, 2022
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 10, 2022

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

panva added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Oct 10, 2022
Comment thread lib/internal/crypto/hkdf.js Outdated
Comment thread lib/internal/crypto/pbkdf2.js Outdated
panva force-pushed the fix-webcrypto-remove-pbkdf2-default branch from a761f04 to 924d59d Compare October 12, 2022 13:48
Comment thread lib/internal/crypto/hkdf.js Outdated
panva force-pushed the fix-webcrypto-remove-pbkdf2-default branch from 924d59d to 7f61102 Compare October 12, 2022 13:54
panva added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 12, 2022
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 12, 2022

Copy link
Copy Markdown
Collaborator

aduh95 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM with or without my suggestion

Comment on lines +129 to +131
let result;
try {
result = await pbkdf2Promise(raw, salt, iterations, length / 8, hash);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
Suggested change
let result;
try {
result = await pbkdf2Promise(raw, salt, iterations, length / 8, hash);
try {
const { buffer } = await pbkdf2Promise(raw, salt, iterations, length / 8, hash);
return buffer;

resolve(result.buffer);
});
});
return result.buffer;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
Suggested change
return result.buffer;

panva added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 12, 2022
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 12, 2022
nodejs-github-bot merged commit 40a0757 into nodejs:main Oct 12, 2022

Copy link
Copy Markdown
Collaborator

Landed in 40a0757

panva deleted the fix-webcrypto-remove-pbkdf2-default branch October 13, 2022 09:12
danielleadams pushed a commit that referenced this pull request Dec 30, 2022
PR-URL: #44945
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
danielleadams pushed a commit that referenced this pull request Jan 3, 2023
PR-URL: #44945
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. crypto Issues and PRs related to the crypto subsystem. experimental Issues and PRs related to experimental features. needs-ci PRs that need a full CI run. webcrypto

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL