aboutsummaryrefslogtreecommitdiff
path: root/src/crypto
diff options
context:
space:
mode:
authorqmuntal <quimmuntal@gmail.com>2025-12-03 12:32:15 +0100
committerQuim Muntal <quimmuntal@gmail.com>2025-12-03 08:23:24 -0800
commit7991da11616154c4afc65752f3045ab443aed2ca (patch)
tree6218c321e1254646c11894fc9efed3714690930d /src/crypto
parent2729e87aa5b66433ba39cc15e77f3ed26efdaf05 (diff)
downloadgo-7991da11616154c4afc65752f3045ab443aed2ca.tar.xz
crypto/hpke: remove unused hybridKEM field
hybridKEM.pqGenerateKey is not used anywhere. Having it around is confusing, as it suggests that the mlkem seed is generated within the mlkem package, when it is not. Change-Id: Ie0bdb79d6b774db7b21dfff2b966452463f1ce08 Reviewed-on: https://go-review.googlesource.com/c/go/+/726260 Reviewed-by: Filippo Valsorda <filippo@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Roland Shoemaker <roland@golang.org>
Diffstat (limited to 'src/crypto')
-rw-r--r--src/crypto/hpke/pq.go10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/crypto/hpke/pq.go b/src/crypto/hpke/pq.go
index a79dadf58f..f2adbef54e 100644
--- a/src/crypto/hpke/pq.go
+++ b/src/crypto/hpke/pq.go
@@ -33,9 +33,6 @@ var mlkem768X25519 = &hybridKEM{
pqNewPrivateKey: func(data []byte) (crypto.Decapsulator, error) {
return mlkem.NewDecapsulationKey768(data)
},
- pqGenerateKey: func() (crypto.Decapsulator, error) {
- return mlkem.GenerateKey768()
- },
}
// MLKEM768X25519 returns a KEM implementing MLKEM768-X25519 (a.k.a. X-Wing)
@@ -60,9 +57,6 @@ var mlkem768P256 = &hybridKEM{
pqNewPrivateKey: func(data []byte) (crypto.Decapsulator, error) {
return mlkem.NewDecapsulationKey768(data)
},
- pqGenerateKey: func() (crypto.Decapsulator, error) {
- return mlkem.GenerateKey768()
- },
}
// MLKEM768P256 returns a KEM implementing MLKEM768-P256 from draft-ietf-hpke-pq.
@@ -86,9 +80,6 @@ var mlkem1024P384 = &hybridKEM{
pqNewPrivateKey: func(data []byte) (crypto.Decapsulator, error) {
return mlkem.NewDecapsulationKey1024(data)
},
- pqGenerateKey: func() (crypto.Decapsulator, error) {
- return mlkem.GenerateKey1024()
- },
}
// MLKEM1024P384 returns a KEM implementing MLKEM1024-P384 from draft-ietf-hpke-pq.
@@ -108,7 +99,6 @@ type hybridKEM struct {
pqNewPublicKey func(data []byte) (crypto.Encapsulator, error)
pqNewPrivateKey func(data []byte) (crypto.Decapsulator, error)
- pqGenerateKey func() (crypto.Decapsulator, error)
}
func (kem *hybridKEM) ID() uint16 {