crypto: adjust minimum length in generateKey('hmac', ...) and generateKeySync('hmac', ...)#42944
Merged
nodejs-github-bot merged 1 commit intonodejs:masterfrom May 4, 2022
Conversation
Also affects generateKeySync('hmac', ...)
Collaborator
|
Review requested:
|
tniessen
approved these changes
May 2, 2022
Member
tniessen
left a comment
There was a problem hiding this comment.
LGTM. Not sure about the semver-ity though.
Member
Author
|
|
panva
approved these changes
May 2, 2022
Member
There was a problem hiding this comment.
I believe this surfaced together with Web Crypto API. I also believe the intention was to follow the way Web Crypto API works in Node.js, that is "multiples of 8", in which case, length should've been in bytes, not bits...
Since any other bit length that isn't a multiple of 8 is rounded down, this patched behaviour is IMHO correct and falls within a fix semver-ity ;)
cc @jasnell
Member
|
Ah, I didn't know this |
This comment was marked as outdated.
This comment was marked as outdated.
Collaborator
lpinca
approved these changes
May 3, 2022
Collaborator
|
Landed in a5b8730 |
RafaelGSS
pushed a commit
that referenced
this pull request
May 10, 2022
Also affects generateKeySync('hmac', ...)
PR-URL: #42944
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Merged
juanarbol
pushed a commit
that referenced
this pull request
May 31, 2022
Also affects generateKeySync('hmac', ...)
PR-URL: #42944
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
danielleadams
pushed a commit
that referenced
this pull request
Jun 27, 2022
Also affects generateKeySync('hmac', ...)
PR-URL: #42944
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
targos
pushed a commit
that referenced
this pull request
Jul 12, 2022
Also affects generateKeySync('hmac', ...)
PR-URL: #42944
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
targos
pushed a commit
that referenced
this pull request
Jul 31, 2022
Also affects generateKeySync('hmac', ...)
PR-URL: #42944
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
guangwong
pushed a commit
to noslate-project/node
that referenced
this pull request
Oct 10, 2022
Also affects generateKeySync('hmac', ...)
PR-URL: nodejs/node#42944
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Values in the interval
[1, 8)are invalid.