Telegram's MTProto 2.0 encryption protocol, implemented from scratch in Python.
Coursework for CS588: Security and Privacy in Networked and Distributed Systems, UIC.
A ground-up implementation of the cryptographic protocol behind Telegram messaging. No crypto library shortcuts on the protocol logic itself: the key exchange, encryption, and session handling are built to spec so the moving parts are actually visible.
- AES-256 encryption and SHA-256 hashing for message confidentiality and integrity.
- Perfect Forward Secrecy: no two sessions share keys, so compromising one session does not unlock the others.
- Multiple transport layers: TCP, WebSocket, and HTTP/HTTPS, each with full message serialization.
- Session handling and time synchronization handled per the MTProto 2.0 spec.
Python · AES-256 · SHA-256 · TCP / WebSocket / HTTP
Built for learning how a real-world secure messaging protocol fits together. Not intended as a production crypto library.