Skip to content
TGWAY
FAQ

So how do you encrypt data?

Telegram uses two layers of encryption , and which layers apply depends on the kind of chat. Cloud chats use server-client encryption. Secret Chats add…

Telegram uses two layers of encryption, and which layers apply depends on the kind of chat. Cloud chats use server-client encryption. Secret Chats add a second, client-to-client layer on top of it.

The primitives

ComponentUsed for
256-bit symmetric AESEncrypting the message content itself
2048-bit RSAProtecting the initial key exchange
Diffie-Hellman key exchangeAgreeing a shared secret the server never learns, which is what makes Secret Chats end to end

Everything is encrypted the same way regardless of type. Text, photographs, voice messages and large files all take the same path, so there is no weaker channel for media.

What the second layer changes

With server-client encryption, data is protected between your device and the service, and stored encrypted. With the additional client-client layer in a Secret Chat, the key is negotiated directly between the two devices, so the ciphertext passing through the server cannot be read there at all. That is the entire difference between "encrypted" and "end-to-end encrypted", and it is worth understanding rather than treating the two phrases as synonyms.

Verifying rather than trusting

The protocol, MTProto, is documented publicly. The client applications are published as source and support verifiable builds, so an expert can confirm that the app in the store was built from the code on GitHub. Each Secret Chat also exposes a key visualisation that both participants can compare directly.

Strong cryptography is not what fails in practice. Account takeover through an intercepted login code is, which is why two-step verification under Settings, Privacy and Security does more for most people than any algorithm choice.

Share this guide

Send it to a friend who has the same question.

Telegram WhatsApp
More

Open on your phonePoint your phone camera here to open this guide.

Updated

Related articles

View all ›