BoltC is a robust, privacy-first messenger application built with Python. It features a decentralized-style architecture consisting of an independent relay server and "thick" clients. The server acts purely as an agnostic packet router, relaying encrypted bytes without ever knowing the contents of messages or files, ensuring absolute End-to-End Encryption (E2EE).
- Hybrid E2EE Encryption: Implements a state-of-the-art cryptographic pipeline. RSA (2048-bit) is used for secure public key exchange, which then derives a shared secret to establish an AES-256-GCM symmetric session key for ultra-fast, authenticated message encryption.
- Secure File Streaming: Capable of transferring files of any size without causing Out-of-Memory (OOM) crashes. Files are chunked into 64KB blocks, each uniquely encrypted with its own Nonce/AAD. Chunks are securely cached as
.tmpfiles on the receiver's end until the final SHA-256 hash validation is passed. - Safety Numbers (MITM Protection): Inspired by Signal and WhatsApp, BoltC provides a UI to verify "Safety Numbers" (SHA-256 fingerprints of public keys). This ensures that the public keys were not tampered with by a malicious server or network actor.
- Modern PyQt6 UI: A sleek, responsive dark-mode interface built with PyQt6. It features non-blocking, self-dismissing Toast notifications, a modern 80-emoji grid popup, and interactive confirmation dialogs for secure file downloads.
- Non-Blocking Network Layer: The client effectively circumvents Qt Event Loop blocking by dispatching heavy network I/O (like secure file chunk streaming) to dedicated
threading.Threadworkers. - Thread-Safe Signals: Fully implements PyQt6
pyqtSignalmechanisms using nativeobjectserialization to safely marshal complex binary data and GUI updates across background threads and the main UI loop. - Zero-Knowledge Server: The server only parses a plain-text header (e.g.,
MSG <recipient> <length>) and blindly forwards the attached encrypted binary payload to the destination socket.
Ensure you have Python 3.10+ installed. Install the required libraries using pip:
pip install -r requirements.txtRun the relay server. By default, it will listen on port 5000.
python server.pyRun the client application on multiple instances or machines.
python client.py- Enter your chosen username.
- Enter the Server IP (use
127.0.0.1for local testing). - Connect, choose a peer from the "Contacts" list, verify your Safety Numbers, and start chatting securely!
This project is an educational and experimental implementation of E2EE protocols. While it uses industry-standard cryptography primitives (cryptography.hazmat), it has not been audited by professional security researchers. Use at your own risk.