AFAIK, end to end encryption (E2EE) initiates on one device (one platform e.g. android), message reaches the destination and decrypts there. So other devices of mine (like iOS or web client) don't have keys to decrypt the message.

But some IM applications like Wire provide multi platform E2EE instant messaging storing chat history.

1 . The question is: How do different devices decrypt a message that is end to end encrypted on a different device? How do iOS and Android and web and desktop client sync messages?! If they share private keys, how can we trust the server not to save the key?!

2 . Any idea on how Wire messenger syncs messages?

closed as unclear what you're asking by Tobi Nary, Xander, Steve, Steffen Ullrich, Bacon Brad Jul 26 '17 at 19:23

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Key Exchange between the endpoints that belong to the same entity. – Tobi Nary Jul 25 '17 at 15:31
  • It's likely the keys are either shared by the supplier to each device (you cannot trust the server not to share the key), or they are using multiple keys between each device so each message is encrypted with each recipients encryption key. Not sure about Wire though directly. – ISMSDEV Jul 25 '17 at 16:14
  • they can simply store the received (decrypted) messages locally as plain text; E2E protects transit – dandavis Jul 25 '17 at 22:00
  • @SmokeDispenser Maybe Key Exchange is their solution, but it risks privacy. How to ensure keys are not stored on the server? Some audition is needed. – Saeed Jul 26 '17 at 13:18
  • @ISMSDEV First solution is probable, but less secure. Thanks for the comment. I guess more audition is needed, since Wire's server code is not open source completely and there should be an exact whitepaper on how they sync messages. I hope some one could technically audit the code and answer my question. – Saeed Jul 26 '17 at 13:22

I will try and answer what I - at the point of writing - understand is your questions:

Cryptography is platform independent, so it does not matter which platform is sending of receiving an encrypted message as long as the sender and receiver do adhere to the same protocol.

As to the key exchange: Let's say, you have devices A and B, both belonging to the same identity, I. Now, I is supposed to have access to messages through A and B. That either means each message is to be encrypted with key(A) and key(B) - or that key(A) = key(B).

In the first case, you cannot trust the server to not transparently add a third device under their control to the list of keys for I, i.e. key(C). This might raise some eyebrows with the sender, but as they are in control of the UI and for that - nevermind.

In the second case, you can share the keys by establishing a secure communications channel to transmit the key - for example by displaying a QR-Code on A and scanning it with B in a secure environment.

In both cases, as the UI and logic might me closed source or you might not be running the binary you have sources for (could be patched before delivery), you cannot be sure that either A nor B transmit all keys known to them to the server while you're texting away.

It boils down to: key exchange is a solvable problem for this scenario - trusting software isn't. You either do or don't and use your own software under your control, adhering to the same protocol.

As to you asking for the implementation and design details for a specific product: I don't know; it might not be disclosed. And if it were, if you're distrusting the supplier, why trust what They say?

Not the answer you're looking for? Browse other questions tagged or ask your own question.