mirror of
https://github.com/XTLS/REALITY.git
synced 2026-09-22 23:08:01 +03:00
crypto/internal/mlkem768: move to crypto/internal/fips/mlkem
In the process, replace out-of-module imports with their FIPS versions. For #69536 Change-Id: I83e900b7c38ecf760382e5dca7fd0b1eaa5a5589 Reviewed-on: https://go-review.googlesource.com/c/go/+/626879 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Russ Cox <rsc@golang.org> Auto-Submit: Filippo Valsorda <filippo@golang.org> Reviewed-by: Daniel McCarney <daniel@binaryparadox.net> Reviewed-by: Michael Knyszek <mknyszek@google.com>
This commit is contained in:
@@ -22,7 +22,7 @@ import (
|
||||
"slices"
|
||||
"time"
|
||||
|
||||
"github.com/xtls/reality/mlkem768"
|
||||
"github.com/xtls/reality/mlkem"
|
||||
"github.com/xtls/reality/tls13"
|
||||
)
|
||||
|
||||
@@ -276,7 +276,7 @@ func (hs *serverHandshakeStateTLS13) processClientHello() error {
|
||||
ecdhData := clientKeyShare.data
|
||||
if selectedGroup == x25519Kyber768Draft00 {
|
||||
ecdhGroup = X25519
|
||||
if len(ecdhData) != x25519PublicKeySize+mlkem768.EncapsulationKeySize768 {
|
||||
if len(ecdhData) != x25519PublicKeySize+mlkem.EncapsulationKeySize768 {
|
||||
c.sendAlert(alertIllegalParameter)
|
||||
return errors.New("tls: invalid Kyber client key share")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user