encrypt multicast with shared key
This commit is contained in:
@@ -5,18 +5,18 @@ import "encoding/binary"
|
||||
const PROTO_VERSION uint16 = 1
|
||||
|
||||
const (
|
||||
unused uint16 = iota
|
||||
_ uint16 = iota
|
||||
// (client -> server) requests an IP
|
||||
// [ pubkey - 1216 bytes ]
|
||||
REQ_REGISTER
|
||||
// (server -> client) assigns an IP
|
||||
// [ ip - 16 bytes ]
|
||||
// (server -> client) returns the assigned IP and encapsulated multicast key
|
||||
// [ ip - 16 bytes ] [ ciphertext - 1168 bytes ]
|
||||
RESP_REGISTER
|
||||
// (client -> server -> client2) relays an encrypted packet to a specified peer
|
||||
// [ destIP - 16 bytes ] [ srcIP - 16 bytes ] [ encrypted pkt ]
|
||||
ENC_PKT
|
||||
// (client -> server -> *) broadcasts an unsecured packet
|
||||
// [ plaintext pkt ]
|
||||
// (client -> server -> *) broadcasts an encrypted packet
|
||||
// [ encrypted pkt ]
|
||||
BROADCAST_PKT
|
||||
// (client -> server) requests peer's pubkey from the server for encapsulation
|
||||
// [ ip - 16 bytes ]
|
||||
|
||||
Reference in New Issue
Block a user