From 3e14e25cf027033737aba13cd199e0df38ca5704 Mon Sep 17 00:00:00 2001 From: Filippo Valsorda Date: Wed, 16 Oct 2024 14:31:44 +0200 Subject: [PATCH] crypto/internal/mlkem768: make Decapsulate a method This will make it easier to support multiple sizes if needed. Change-Id: I47495559fdbbf678fd98421ad6cb28172e5c810d Reviewed-on: https://go-review.googlesource.com/c/go/+/621977 Reviewed-by: Daniel McCarney Reviewed-by: Russ Cox LUCI-TryBot-Result: Go LUCI Auto-Submit: Filippo Valsorda Reviewed-by: Roland Shoemaker --- key_schedule.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/key_schedule.go b/key_schedule.go index 9c76ebe..e8ee9ce 100644 --- a/key_schedule.go +++ b/key_schedule.go @@ -59,7 +59,7 @@ type keySharePrivateKeys struct { // kyberDecapsulate implements decapsulation according to Kyber Round 3. func kyberDecapsulate(dk *mlkem768.DecapsulationKey, c []byte) ([]byte, error) { - K, err := mlkem768.Decapsulate(dk, c) + K, err := dk.Decapsulate(c) if err != nil { return nil, err }