Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crypto: make authTagLength optional for CC20P1305 #42427

Conversation

tniessen
Copy link
Member

@tniessen tniessen commented Mar 21, 2022

16 bytes are the standard authentication tag length for ChaCha20-Poly1305 because Poly1305 produces exactly 16 bytes. Almost all use cases for ChaCha20-Poly1305 will want to use an authentication tag length of 16 bytes.

This is similar to GCM, for which Node.js already defaults to 16 bytes, except that there are approved shorter authentication tag lengths for GCM. For Poly1305, there are none, so when decrypting, GCM will silently accept shorter tags as long as their length is valid, whereas, with this change, ChaCha20-Poly1305 will still require 16 byte tags unless a different authTagLength has been specified.

@tniessen tniessen added the semver-minor label Mar 21, 2022
@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Mar 21, 2022

Review requested:

@nodejs-github-bot nodejs-github-bot added c++ crypto needs-ci labels Mar 21, 2022
@tniessen tniessen added the request-ci label Mar 21, 2022
@github-actions github-actions bot removed the request-ci label Mar 21, 2022
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Mar 21, 2022

@tniessen tniessen added the author ready label Mar 26, 2022
panva
panva approved these changes Mar 26, 2022
@tniessen tniessen added commit-queue and removed review wanted labels Mar 27, 2022
@nodejs-github-bot nodejs-github-bot removed the commit-queue label Mar 27, 2022
@nodejs-github-bot nodejs-github-bot merged commit 934a3aa into nodejs:master Mar 27, 2022
68 checks passed
@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Mar 27, 2022

Landed in 934a3aa

juanarbol pushed a commit that referenced this issue Apr 4, 2022
PR-URL: #42427
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
juanarbol pushed a commit to juanarbol/node that referenced this issue Apr 5, 2022
PR-URL: nodejs#42427
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
@juanarbol juanarbol mentioned this pull request Apr 5, 2022
@juanarbol juanarbol mentioned this pull request Apr 5, 2022
juanarbol added a commit that referenced this issue Apr 6, 2022
Notable Changes:

* deps: update undici to 4.16.0 (Node.js GitHub Bot) #42414
* doc: add @meixg to collaborators (Xuguang Mei) #42576
* crypto: make authTagLength optional for CC20P1305 (Tobias Nießen) #42427

PR-URL: #42613
juanarbol added a commit that referenced this issue Apr 6, 2022
Notable Changes:

* deps: update undici to 4.16.0 (Node.js GitHub Bot) #42414
* doc: add @meixg to collaborators (Xuguang Mei) #42576
* crypto: make authTagLength optional for CC20P1305 (Tobias Nießen) #42427

PR-URL: #42613
juanarbol pushed a commit that referenced this issue Apr 6, 2022
PR-URL: #42427
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
juanarbol added a commit that referenced this issue Apr 6, 2022
Notable Changes:

* (SEMVER-MINOR) crypto: make authTagLength optional for CC20P1305 (Tobias Nießen) [#42427](#42427)
* deps: update undici to 4.16.0 (Node.js GitHub Bot) [#42414](#42414)
* doc: add @meixg to collaborators (Xuguang Mei) [#42576](#42576)

PR-URL: #42613
juanarbol added a commit that referenced this issue Apr 7, 2022
Notable Changes:

* (SEMVER-MINOR) crypto: make authTagLength optional for CC20P1305 (Tobias Nießen) #42427
* deps: update undici to 4.16.0 (Node.js GitHub Bot) #42414
* doc: add @meixg to collaborators (Xuguang Mei) #42576

PR-URL: #42613
juanarbol added a commit that referenced this issue Apr 7, 2022
Notable Changes:

* (SEMVER-MINOR) crypto: make authTagLength optional for CC20P1305 (Tobias Nießen) #42427
* deps: update undici to 4.16.0 (Node.js GitHub Bot) #42414
* doc: add @meixg to collaborators (Xuguang Mei) #42576

PR-URL: #42613
juanarbol added a commit that referenced this issue Apr 7, 2022
Notable Changes:

* (SEMVER-MINOR) crypto: make authTagLength optional for CC20P1305 (Tobias Nießen) #42427
* deps: update undici to 4.16.0 (Node.js GitHub Bot) #42414
* doc: add @meixg to collaborators (Xuguang Mei) #42576

PR-URL: #42613
juanarbol added a commit that referenced this issue Apr 7, 2022
Notable Changes:

* (SEMVER-MINOR) crypto: make authTagLength optional for CC20P1305 (Tobias Nießen) #42427
* deps: update undici to 4.16.0 (Node.js GitHub Bot) #42414
* doc: add @meixg to collaborators (Xuguang Mei) #42576

PR-URL: #42613
xtx1130 pushed a commit to xtx1130/node that referenced this issue Apr 25, 2022
PR-URL: nodejs#42427
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
xtx1130 pushed a commit to xtx1130/node that referenced this issue Apr 25, 2022
Notable Changes:

* (SEMVER-MINOR) crypto: make authTagLength optional for CC20P1305 (Tobias Nießen) nodejs#42427
* deps: update undici to 4.16.0 (Node.js GitHub Bot) nodejs#42414
* doc: add @meixg to collaborators (Xuguang Mei) nodejs#42576

PR-URL: nodejs#42613
juanarbol pushed a commit that referenced this issue May 31, 2022
PR-URL: #42427
Reviewed-By: James M Snell <jasnell@gmail.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 c++ crypto needs-ci semver-minor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants