[go] crypto/hpke: don't corrupt enc's excess capacity in DHKEM decap

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Dec 10, 2025, 4:45:57 PM (2 days ago) Dec 10
to Filippo Valsorda, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Dmitri Shuralyov, Dmitri Shuralyov, Roland Shoemaker, Go LUCI, Daniel McCarney, golang-co...@googlegroups.com

Gopher Robot submitted the change

Change information

Commit message:
crypto/hpke: don't corrupt enc's excess capacity in DHKEM decap

Caught because the one-shop APIs put the ciphertext after enc in a
single slice, so Recipient.Open would corrupt the ciphertext.
Change-Id: I15fe1dfcc05a5a7f5cd0b4ada21661e66a6a6964
Reviewed-by: Roland Shoemaker <rol...@golang.org>
Reviewed-by: Dmitri Shuralyov <dmit...@google.com>
Auto-Submit: Filippo Valsorda <fil...@golang.org>
Files:
  • M src/crypto/hpke/hpke_test.go
  • M src/crypto/hpke/kem.go
Change size: M
Delta: 2 files changed, 179 insertions(+), 1 deletion(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Roland Shoemaker, +1 by Dmitri Shuralyov
  • 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: go
Gerrit-Branch: master
Gerrit-Change-Id: I15fe1dfcc05a5a7f5cd0b4ada21661e66a6a6964
Gerrit-Change-Number: 728500
Gerrit-PatchSet: 2
Gerrit-Owner: Filippo Valsorda <fil...@golang.org>
Gerrit-Reviewer: Daniel McCarney <dan...@binaryparadox.net>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@google.com>
Gerrit-Reviewer: Filippo Valsorda <fil...@golang.org>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Roland Shoemaker <rol...@golang.org>
Gerrit-CC: Dmitri Shuralyov <dmit...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages