src: simplify handling of kNoAuthTagLength#61192
Merged
nodejs-github-bot merged 1 commit intonodejs:mainfrom Jan 7, 2026
Merged
src: simplify handling of kNoAuthTagLength#61192nodejs-github-bot merged 1 commit intonodejs:mainfrom
nodejs-github-bot merged 1 commit intonodejs:mainfrom
Conversation
Since nodejs#61084, the `kNoAuthTagLength` constant is only used - during the entire lifetime of non-authenticating cipher/decipher objects and - during the initialization of authenticating cipher/decipher objects. In particular, it is never used during the lifetime of an authenticating cipher/decipher object once that object has been initialized. (Before said change, the constant was also used for ciphers in GCM mode to indicate that the user had not specified the length of the authentication tag in advance, but the authentication tag length must now always be specified or defaults to the block size in the case of GCM mode.) This commit simplifies the handling of `kNoAuthTagLength` based on the knowledge that it is not a valid value for AEAD ciphers beyond initialization.
Collaborator
|
Review requested:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #61192 +/- ##
=======================================
Coverage 88.53% 88.54%
=======================================
Files 703 703
Lines 208599 208579 -20
Branches 40229 40220 -9
=======================================
- Hits 184685 184676 -9
+ Misses 15939 15911 -28
- Partials 7975 7992 +17
🚀 New features to boost your workflow:
|
cjihrig
approved these changes
Dec 28, 2025
Collaborator
Collaborator
Collaborator
Commit Queue failed- Loading data for nodejs/node/pull/61192 ✔ Done loading data for nodejs/node/pull/61192 ----------------------------------- PR info ------------------------------------ Title src: simplify handling of kNoAuthTagLength (#61192) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch tniessen:src-simplify-knoauthtaglength -> nodejs:main Labels crypto, c++, author ready, needs-ci Commits 1 - src: simplify handling of kNoAuthTagLength Committers 1 - Tobias Nießen <tniessen@tnie.de> PR-URL: https://github.com/nodejs/node/pull/61192 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/61192 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> -------------------------------------------------------------------------------- ℹ This PR was created on Sun, 28 Dec 2025 12:25:18 GMT ✔ Approvals: 1 ✔ - Colin Ihrig (@cjihrig): https://github.com/nodejs/node/pull/61192#pullrequestreview-3614804140 ✘ This PR needs to wait 71 more hours to land (or 0 minutes if there is one more approval) ✔ Last GitHub CI successful ℹ Last Full PR CI on 2025-12-30T19:17:12Z: https://ci.nodejs.org/job/node-test-pull-request/70637/ - Querying data for job/node-test-pull-request/70637/ ✔ Build data downloaded ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/20639737695 |
Collaborator
|
Landed in a86db6b |
islandryu
pushed a commit
to islandryu/node
that referenced
this pull request
Jan 25, 2026
Since nodejs#61084, the `kNoAuthTagLength` constant is only used - during the entire lifetime of non-authenticating cipher/decipher objects and - during the initialization of authenticating cipher/decipher objects. In particular, it is never used during the lifetime of an authenticating cipher/decipher object once that object has been initialized. (Before said change, the constant was also used for ciphers in GCM mode to indicate that the user had not specified the length of the authentication tag in advance, but the authentication tag length must now always be specified or defaults to the block size in the case of GCM mode.) This commit simplifies the handling of `kNoAuthTagLength` based on the knowledge that it is not a valid value for AEAD ciphers beyond initialization. PR-URL: nodejs#61192 Reviewed-By: Colin Ihrig <cjihrig@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.
Since #61084, the
kNoAuthTagLengthconstant is only usedIn particular, it is never used during the lifetime of an authenticating cipher/decipher object once that object has been initialized. (Before said change, the constant was also used for ciphers in GCM mode to indicate that the user had not specified the length of the authentication tag in advance, but the authentication tag length must now always be specified or defaults to the block size in the case of GCM mode.)
This commit simplifies the handling of
kNoAuthTagLengthbased on the knowledge that it is not a valid value for AEAD ciphers beyond initialization.