Simplify the documentation around message payload encoding
Currently the doc is explaining a sort of encoding with key values pairs
The keys are encoded as a variable length integer tag where the 3 lowest bits indicates the type of the value: 0 for integers, 2 for strings....
And talking about tags 0x0A
, 0x10
, 0x22
Given that it is just plain protobuf, like 0xA
is 0| 0001 | 010
that is tag 1
and type 2
(bytes).
Probably we could just simplify and put the proto definitions:
package messages;
syntax = "proto3";
message PreKey {
bytes one_time_key = 1;
bytes base_key = 2;
bytes identity_key = 3;
bytes message = 4;
}
message Normal {
bytes ratchet_key = 1;
uint64 chain_index = 2;
bytes cipher_text = 4;
}
Edited by Valere