Add MAC to messages in private groups
For future multi-device support it would be useful for private groups (i.e. groups shared between a pair of contacts) to be shared by all the contacts' devices, so that messages are automatically synchronised among all devices.
A user's devices need to be able to distinguish remote messages created by the user's other devices from remote messages created by the contact's devices.
A simple way to achieve that is to add a MAC to all messages and share the MAC key between the user's devices. Any message with a valid MAC was created by one of the user's devices, any other message was created by one of the contact's devices.
We're not implementing multi-device support yet, but we should add this now so we don't have to change the wire format later.