Adds MLKEM Payload placeholder to client internals

This commit is contained in:
riccardom
2026-09-11 14:48:54 +02:00
parent 902daf61e6
commit 30212ca92c
4 changed files with 14 additions and 0 deletions
+6
View File
@@ -52,6 +52,9 @@ type CredentialPayload struct {
Credential *Credential
RosenpassPubKey []byte
RosenpassAddr string
// MlkemPayload is the opaque post-quantum KEM handshake message riding this
// OFFER/ANSWER (see Body.mlkemPayload). Nil when not running the PQ exchange.
MlkemPayload []byte
RelaySrvAddress string
RelaySrvIP netip.Addr
SessionID []byte
@@ -89,6 +92,9 @@ func MarshalCredential(myKey wgtypes.Key, remoteKey string, p CredentialPayload)
if p.RelaySrvIP.IsValid() {
body.RelayServerIP = p.RelaySrvIP.Unmap().AsSlice()
}
if len(p.MlkemPayload) > 0 {
body.MlkemPayload = p.MlkemPayload
}
return &proto.Message{
Key: myKey.PublicKey().String(),
RemoteKey: remoteKey,