mirror of
https://github.com/signalapp/libsignal.git
synced 2026-05-09 00:22:31 +02:00
We're optimizing for size overhead in this encoding, so forego the flexibility of protobufs in favor of a flat encoding (though one that still uses protobuf's varints). Additionally, this encoding includes the recipients inline in the message so the client can dump it all to server in one go. As a side effect, this means an SSv2 message encoded for sending no longer has the same format as one encoded for receiving when there's only one recipient. Consequently, all the tests need to be modified to "fan out" a multi-recipient message to several single-recipient messages. For simplicity, the wrapper language tests only support this operation for SSv2 messages sent to exactly one recipient.