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.
- Client program generates a pair of public-private key.
- Client program sends the public key (for encryption only) to the server.
Establishing chat session:
- A wants to start a session talking with B. A sends the request to the server.
- Server send the request and public key of A to B.
- Server send the public key of B to A.
- 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)
- Server save the encrypted messages, and send the message encrypted with B's public key to B.
- Client program of B uses B's private key to decrypt the message
Login from a new device:
- A use a safe method (e.g. USB stick, SD card, etc) to copy the keys from the original device.
- Client program of A receive the chatting history not on the device from the server which is encrypted with A's public key
- 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?