palm/palmdef/unencrypted_tunnel.proto

25 lines
1.2 KiB
Protocol Buffer
Raw Normal View History

2023-03-16 22:28:46 +00:00
syntax = "proto3";
/*
This file contains message definitions for packets sent via unencrypted tunneling.
These packets have the directions I2R and R2I (initiator to receiver, receiver to initiator)
These packets are assigned the ID block 0x50-0x6f.
*/
// Sent by the initiator to the receiver, over the encrypted tunnel, to start the handshake.
message PalmI2RHandshakeStartPacket {
enum packet_info { invalid = 0; type = 0x50; }
bytes initiator_public_key = 1; // The initiator's X25519 public key. This should be generated afresh for this session.
int32 check = 2; // A random 4-byte integer, used to verify encryption is working properly.
bytes iv = 3; // A random 12-byte IV used for encryption
}
// Sent by the initiator to the receiver, over the encrypted tunnel, to start the handshake.
message PalmR2IHandshakeFinishPacket {
enum packet_info { invalid = 0; type = 0x51; }
bytes receiver_public_key = 1; // The initiator's X25519 public key. This should be generated afresh for this session.
int32 check_encrypted = 2; // The same check value from the handshake start, encrypted in the same way the packets will eventually be encrypted.
}