Skip to content

Commit 2d11d53

Browse files
authored
Export Mlkem and MlkemEcdhe in struct KeySharePrivateKeys
Signed-off-by: RPRX <63339210+RPRX@users.noreply.github.com>
1 parent 8d029b9 commit 2d11d53

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

u_parrots.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2902,8 +2902,8 @@ func (uconn *UConn) ApplyPreset(p *ClientHelloSpec) error {
29022902
} else {
29032903
ext.KeyShares[i].Data = append(mlkemKey.EncapsulationKey().Bytes(), ecdheKey.PublicKey().Bytes()...)
29042904
}
2905-
uconn.HandshakeState.State13.KeyShareKeys.mlkem = mlkemKey
2906-
uconn.HandshakeState.State13.KeyShareKeys.mlkemEcdhe = ecdheKey
2905+
uconn.HandshakeState.State13.KeyShareKeys.Mlkem = mlkemKey
2906+
uconn.HandshakeState.State13.KeyShareKeys.MlkemEcdhe = ecdheKey
29072907
} else {
29082908
ecdheKey, err := generateECDHEKey(uconn.config.rand(), curveID)
29092909
if err != nil {

u_public.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -890,8 +890,8 @@ func (kpk *kemPrivateKey) ToPublic() *KemPrivateKey {
890890
type KeySharePrivateKeys struct {
891891
CurveID CurveID
892892
Ecdhe *ecdh.PrivateKey
893-
mlkem *mlkem.DecapsulationKey768
894-
mlkemEcdhe *ecdh.PrivateKey
893+
Mlkem *mlkem.DecapsulationKey768
894+
MlkemEcdhe *ecdh.PrivateKey
895895
}
896896

897897
func (ksp *KeySharePrivateKeys) ToPrivate() *keySharePrivateKeys {
@@ -901,8 +901,8 @@ func (ksp *KeySharePrivateKeys) ToPrivate() *keySharePrivateKeys {
901901
return &keySharePrivateKeys{
902902
curveID: ksp.CurveID,
903903
ecdhe: ksp.Ecdhe,
904-
mlkem: ksp.mlkem,
905-
mlkemEcdhe: ksp.mlkemEcdhe,
904+
mlkem: ksp.Mlkem,
905+
mlkemEcdhe: ksp.MlkemEcdhe,
906906
}
907907
}
908908

@@ -913,7 +913,7 @@ func (ksp *keySharePrivateKeys) ToPublic() *KeySharePrivateKeys {
913913
return &KeySharePrivateKeys{
914914
CurveID: ksp.curveID,
915915
Ecdhe: ksp.ecdhe,
916-
mlkem: ksp.mlkem,
917-
mlkemEcdhe: ksp.mlkemEcdhe,
916+
Mlkem: ksp.mlkem,
917+
MlkemEcdhe: ksp.mlkemEcdhe,
918918
}
919919
}

0 commit comments

Comments
 (0)