handshake.proto 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. // This file documents the wire format the nebula handshake speaks. It is
  2. // not run through protoc; the encoder/decoder in payload.go is hand-written
  3. // against this shape directly to keep the parser narrow and panic-free.
  4. //
  5. // Any change to the wire format must be reflected here, and adding a new
  6. // field requires updating MarshalPayload / unmarshalPayloadDetails together
  7. // with the field-uniqueness and wire-type checks in those functions.
  8. syntax = "proto3";
  9. package nebula.handshake;
  10. message NebulaHandshake {
  11. NebulaHandshakeDetails Details = 1;
  12. bytes Hmac = 2;
  13. }
  14. message NebulaHandshakeDetails {
  15. bytes Cert = 1;
  16. uint32 InitiatorIndex = 2;
  17. uint32 ResponderIndex = 3;
  18. // Cookie was reserved for an anti-DoS mechanism that was never
  19. // implemented. No released version of nebula has ever populated it; the
  20. // hand-written parser silently skips it on read.
  21. uint64 Cookie = 4 [deprecated = true];
  22. uint64 Time = 5;
  23. uint32 CertVersion = 8;
  24. // KEMKey is the initiator's ephemeral ML-KEM-1024 encapsulation key. It is
  25. // only present in msg1 of the ix_psk2_mlkem1024 subtype.
  26. bytes KEMKey = 9;
  27. // reserved for WIP multiport
  28. reserved 6, 7;
  29. }