chat_proto/protos/encryption.proto

36 lines
749 B
Protocol Buffer
Raw Normal View History

2026-01-06 14:38:56 +08:00
syntax = "proto3";
2026-01-09 10:12:15 +08:00
package logoschat.encryption;
2026-01-06 14:38:56 +08:00
// TODO: This also encompasses plaintexts, is there a better name?
// Alternatives: ???
message EncryptedPayload {
oneof encryption {
encryption.Plaintext plaintext = 1;
encryption.Doubleratchet doubleratchet = 2;
2026-01-12 03:12:42 -08:00
encryption.XK0 xk0 = 3;
2026-01-06 14:38:56 +08:00
}
}
message Plaintext {
bytes payload=1;
}
message Doubleratchet {
bytes dh = 1; // 32 byte array
uint32 msgNum = 2;
uint32 prevChainLen = 3;
bytes ciphertext = 4;
string aux = 5;
}
2026-01-12 03:12:42 -08:00
message XK0 {
bytes initiator_static = 1;
bytes initiator_ephemeral = 2;
bytes responder_static = 3;
2026-01-14 23:18:25 -08:00
bytes responder_ephemeral = 4; // Replace with RKI to save bytes
2026-01-12 03:12:42 -08:00
bytes payload = 5;
}