]> git.feebdaed.xyz Git - 0xmirror/go.git/commit
crypto/hpke: don't corrupt enc's excess capacity in DHKEM decap
authorFilippo Valsorda <filippo@golang.org>
Thu, 9 Jan 2025 15:56:37 +0000 (16:56 +0100)
committerGopher Robot <gobot@golang.org>
Wed, 10 Dec 2025 21:45:53 +0000 (13:45 -0800)
commitdb0ab834d67131676ab2001ab8e72b197b22ce54
treefa359490224422285ff3c6b50bc41113966bef11
parentcd873cf7e98c3fd3e8138e9d97d6a974a1ee0b53
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-on: https://go-review.googlesource.com/c/go/+/728500
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
src/crypto/hpke/hpke_test.go
src/crypto/hpke/kem.go