I am looking for a cloud-based (i.e. not end-to-end) secure IM protocol or service. The first one comes to my mind is telegram. Here is a quote from telegram's privacy policy:

Cloud Chats

Telegram is a cloud service. We store messages, photos, videos and documents from your cloud chats on our servers, so that you can access your data from any of your devices anytime and use our instant server search to quickly access your messages from waaay back. All data is stored heavily encrypted and the encryption keys in each case are stored in several other DCs in different jurisdictions. This way local engineers or physical intruders cannot get access to user data.

My understanding about this statement is that, although the messages are encrypted, if the server admin / company wants to read your messages, he can do it, because both of the keys and the messages are stored on their server, although not on the same server. So, is it not secure enough? Is my understanding correct?

If the above protocol is not secure, is the following (rough) protocol secure enough, assuming that my devices are not hacked, but every people (ISP, server runners...) on the Internet are privacy stealers? This is only simple asymetric encryption with only the bolded parts special.


  1. Client program generates a pair of public-private key.
  2. Client program sends the public key (for encryption only) to the server.

Establishing chat session:

  1. A wants to start a session talking with B. A sends the request to the server.
  2. Server send the request and public key of A to B.
  3. Server send the public key of B to A.


  1. A send the message encrypted with A and B's public key RESPECTIVELY to the server. (i.e. send the same message twice, encrypted with different keys)
  2. Server save the encrypted messages, and send the message encrypted with B's public key to B.
  3. Client program of B uses B's private key to decrypt the message

Login from a new device:

  1. A use a safe method (e.g. USB stick, SD card, etc) to copy the keys from the original device.
  2. Client program of A receive the chatting history not on the device from the server which is encrypted with A's public key
  3. Client program of A uses the private key of A to decrypt the messages

I think this so-called protocol is really simple and can even be a school work (for it just works)... But I cannot find an IM service doing that. Am I missing something, or is this protocol not secure at all?

  • 1
    hello and welcome to security.se. Please take a moment to review this site's help section. In particular the part about what type of questions aren't a good fit for the site: you'll notice that product recommendation aren't allowed here. – Stephane Jun 30 '15 at 7:38
  • As an user i do not trust any 'cloud message store' and will avoid it; and there are many like me. – Croll Jun 30 '15 at 8:06
  • Textsecure and others already are designed to use encrypted synchronization. Not yet actually live in textsecure though, AFAIK, because using one account on multiple devices is not yet officially supported AFAIK. – Natanael Jun 30 '15 at 8:15

This part worries me:

  1. Server send the public key of B to A.


  1. A send the message encrypted with A and B's public key RESPECTIVELY to the server. (i.e. send the same message twice, encrypted with different keys)

This tells me that A at one point received B's public key, and that to send a message the client needs to have both public keys. If A has B's public key this could allow an impersonation attack where A establishes a chat session with C.

I'm fairly confident the service has more layers of security but from this extract that that you posted here that would be one concern for me.

| improve this answer | |
  • After googling, I am still not sure whether impersonation attack, in this case, means that A can use B's identity to fool C? If you are talking about this problem, we can add digital signiture. – qpalz Jun 30 '15 at 8:19
  • impersonation is any action carried out as another user without their consent. You may of course add extra security measures, and that is perhaps always recommended. – Purefan Jun 30 '15 at 9:08
  • 1
    so I think I understand what you mean, and digital signiture can solve this problem. – qpalz Jun 30 '15 at 9:59

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