wip: Add the basics for the Double Ratchet

This commit is contained in:
2022-08-02 18:13:14 +02:00
parent 56ae882aa0
commit d3c8d813a9
11 changed files with 652 additions and 11 deletions

20
protobuf/schema.proto Normal file
View File

@@ -0,0 +1,20 @@
// Taken from https://xmpp.org/extensions/xep-0384.html#protobuf-schema
message OMEMOMessage {
required uint32 n = 1;
required uint32 pn = 2;
required bytes dh_pub = 3;
optional bytes ciphertext = 4;
}
message OMEMOAuthenticatedMessage {
required bytes mac = 1;
required bytes message = 2; // Byte-encoding of an OMEMOMessage
}
message OMEMOKeyExchange {
required uint32 pk_id = 1;
required uint32 spk_id = 2;
required bytes ik = 3;
required bytes ek = 4;
required OMEMOAuthenticatedMessage message = 5;
}