This is a CLI-based secure chat application that implements end-to-end encryption in python using Diffie-Hellman key exchange and AES encryption. The system provides secure user registration, login, and real-time messaging.
- Secure user registration and authentication
- End-to-end encryption using Diffie-Hellman key exchange
- AES encryption for message communication
- Threaded server to handle multiple client connections
- Secure credential storage
- Python
- Socket Programming
- Cryptography (PyCryptodome)
- JSON for data serialization
- Threading for concurrent client handling
- Diffie-Hellman key exchange for shared secret generation
- AES encryption in CBC mode
- Secure random number generation
- Salted password hashing
- Python 3.8+
- PyCryptodome library
- Socket library
- Clone the repository
- Install required dependencies:
pip install pycryptodome pip install pyinstaller
- Run the server:
python server.py
- Run the client:
python client.py
- Register a new user
- Login with registered credentials
- Send and receive secure messages
- Credentials are stored with salted hashes
- Messages are encrypted before transmission
- Uses a simple Diffie-Hellman key exchange (Note: For production, use more robust key exchange methods)
- Proof-of-concept implementation
- Uses small prime numbers for Diffie-Hellman (not suitable for production)
- No persistent message storage