MTProto is a custom protocol developed by Telegram for secure messaging. Here are the key technical details about MTProto:
### Overview
MTProto is designed to achieve reliability on weak mobile connections as well as speed when dealing with large files [1]. It uses an original approach to address these requirements.
### Encryption Layers
MTProto supports two layers of encryption [1]:
1. Client-server encryption: Used in Telegram Cloud Chats
2. End-to-end encryption: Used in Telegram Secret Chats and voice/video calls
### Security Features
MTProto incorporates several security measures:
1. Perfect Forward Secrecy: Supported in both cloud chats and secret chats [1].
2. Protection against known attacks:
- Resistant to chosen-plaintext attacks (CPA)
- Resistant to chosen-ciphertext attacks (CCA)
- Resistant to replay attacks [1]
3. Message Authentication:
- Uses SHA-256 for message authentication
- Includes server salt, message sequence number, and time in plaintext messages [1]
4. Encrypted Content Delivery Networks (CDN):
- Files sent to the CDN are encrypted with a unique key using AES-256-CTR
- Only accessible to the main MTProto server and authorized clients [1]
5. Server Authentication:
- During Diffie-Hellman key exchange, the server's public RSA key is used for authentication [1]
6. Hash Function:
- Current version uses SHA-256
- Earlier versions (MTProto 1.0) used SHA-1 [1]
### Cryptographic Algorithms
MTProto employs several cryptographic algorithms:
1. AES in IGE (Indirect Gap-Hill-Euripides) mode for encryption
2. SHA-256 for message authentication
3. RSA for server authentication and MitM protection [1]
### Unique Approach
MTProto differs from standard encrypt-then-MAC approaches:
1. Security checks are performed before decryption in MTProto
2. This approach achieves similar results without additional HMAC computation [1]
### Verification
Telegram welcomes security experts to audit its services, code, and protocol. The source code of Telegram apps can be inspected to verify the implementation [1].
In summary, MTProto is a robust protocol designed to provide secure messaging while maintaining performance on mobile networks. It combines well-known cryptographic algorithms in innovative ways to address specific challenges in modern mobile communication.
Citations:
[1] https://core.telegram.org/techfaq
[2] https://www.sciencedirect.com/science/article/abs/...
[3] https://core.telegram.org/mtproto/description
[4] https://www.protectstar.com/en/blog/telegram-encryption
[5] https://www.bomberbot.com/proxy/the-ultimate-guide...
[6] https://www.reddit.com/r/crypto/comments/clgjce/is...
[7] https://www.kiledjian.com/main/2024/8/31/a-closer-...
[8] https://www.bomberbot.com/proxy/unlocking-secure-c...
[9] https://crypto.stackexchange.com/questions/31418/s...
[10] https://www.ccn.com/education/crypto/telegrams-enc...