Skip to content

Conversation

@tniessen
Copy link
Member

This commit moves support for implicitly short GCM authentication tags to End-of-Life status, thus requiring applications to explicitly specify the authTagLength for authentication tags shorter than 128 bits.

There is quite a bit of refactoring to be done in the C++ source code. This commit does not do that; instead, it implements a minimal change only in order to avoid excessive divergence across git branches due to this being a semver-major change.

Fixes: #52327
Refs: #17523

@tniessen tniessen added crypto Issues and PRs related to the crypto subsystem. semver-major PRs that contain breaking changes and should be released in the next major version. security Issues and PRs related to security. deprecations Issues and PRs related to deprecations. labels Dec 16, 2025
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/crypto
  • @nodejs/userland-migrations

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Dec 16, 2025
This commit moves support for implicitly short GCM authentication tags
to End-of-Life status, thus requiring applications to explicitly specify
the `authTagLength` for authentication tags shorter than 128 bits.

There is quite a bit of refactoring to be done in the C++ source code.
This commit does not do that; instead, it implements a minimal change
only in order to avoid excessive divergence across git branches due to
this being a semver-major change.

Fixes: nodejs#52327
Refs: nodejs#17523
@tniessen tniessen marked this pull request as ready for review December 18, 2025 20:50
@tniessen
Copy link
Member Author

Rebased on top of #61082. Ready for review. (cc @nodejs/crypto @Sideni)

@codecov
Copy link

codecov bot commented Dec 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.52%. Comparing base (4f24aff) to head (b6cc8d3).
⚠️ Report is 22 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #61084      +/-   ##
==========================================
- Coverage   88.53%   88.52%   -0.01%     
==========================================
  Files         703      703              
  Lines      208546   208539       -7     
  Branches    40217    40215       -2     
==========================================
- Hits       184634   184608      -26     
- Misses      15926    15957      +31     
+ Partials     7986     7974      -12     
Files with missing lines Coverage Δ
src/crypto/crypto_cipher.cc 78.31% <100.00%> (+0.27%) ⬆️

... and 34 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@panva panva added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 20, 2025
@panva panva added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Dec 20, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 20, 2025
@nodejs-github-bot
Copy link
Collaborator

@panva panva added the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 20, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 20, 2025
@nodejs-github-bot nodejs-github-bot merged commit dff46c0 into nodejs:main Dec 20, 2025
91 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in dff46c0

MatricalDefunkt pushed a commit to MatricalDefunkt/node that referenced this pull request Dec 22, 2025
This commit moves support for implicitly short GCM authentication tags
to End-of-Life status, thus requiring applications to explicitly specify
the `authTagLength` for authentication tags shorter than 128 bits.

There is quite a bit of refactoring to be done in the C++ source code.
This commit does not do that; instead, it implements a minimal change
only in order to avoid excessive divergence across git branches due to
this being a semver-major change.

Fixes: nodejs#52327
Refs: nodejs#17523
PR-URL: nodejs#61084
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
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 pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. crypto Issues and PRs related to the crypto subsystem. deprecations Issues and PRs related to deprecations. needs-ci PRs that need a full CI run. security Issues and PRs related to security. semver-major PRs that contain breaking changes and should be released in the next major version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Restrict authentication tag length for GCM by default

4 participants