[crypto] chacha20poly1305: panic on dst and additionalData overlap

0 views
Skip to first unread message

Sean Liao (Gerrit)

unread,
Oct 22, 2025, 9:37:29 PM (12 hours ago) Oct 22
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, David Chase, Roland Shoemaker, Daniel McCarney, Gopher Robot, Go LUCI, golang-co...@googlegroups.com

Sean Liao submitted the change

Change information

Commit message:
chacha20poly1305: panic on dst and additionalData overlap

The cipher.AEAD interface specifies that these should not overlap.
This mirrors the check that the GCM implementation does.

Fixes golang/go#75968
Updates golang/go#21624
Change-Id: If5fbb8611ff6c0aae44d50079bad29f56ce00f5b
Reviewed-by: Roland Shoemaker <rol...@golang.org>
Reviewed-by: David Chase <drc...@google.com>
Reviewed-by: Daniel McCarney <dan...@binaryparadox.net>
Files:
  • M chacha20poly1305/chacha20poly1305_amd64.go
  • M chacha20poly1305/chacha20poly1305_generic.go
Change size: S
Delta: 2 files changed, 16 insertions(+), 4 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Daniel McCarney, +1 by David Chase, +2 by Roland Shoemaker
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: crypto
Gerrit-Branch: master
Gerrit-Change-Id: If5fbb8611ff6c0aae44d50079bad29f56ce00f5b
Gerrit-Change-Number: 712860
Gerrit-PatchSet: 2
Gerrit-Owner: Sean Liao <se...@liao.dev>
Gerrit-Reviewer: Daniel McCarney <dan...@binaryparadox.net>
Gerrit-Reviewer: David Chase <drc...@google.com>
Gerrit-Reviewer: Filippo Valsorda <fil...@golang.org>
Gerrit-Reviewer: Roland Shoemaker <rol...@golang.org>
Gerrit-Reviewer: Sean Liao <se...@liao.dev>
Gerrit-CC: Gopher Robot <go...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages