Author: Abilan Ravindran
After completing an intro to cryptography and its applications class, I wanted to challenge myself by building a practical application that utilized the concepts I learned. SecureChat is the result of this effort, designed to test and solidify my understanding of encryption techniques and secure data management.
SecureChat is a command-line chat application that ensures secure communication between users through end-to-end encryption. It leverages RSA for key exchange and AES-like encryption for messages, ensuring that messages remain private and tamper-proof during transmission.
-
User Registration and Login:
- Users can register with a unique username and password.
- Passwords are securely hashed using bcrypt before storage.
-
End-to-End Encrypted Messaging:
- Messages are encrypted using the recipient's RSA public key.
- Only the recipient can decrypt messages using their private key.
-
Message Storage:
- Sent messages are stored in a JSON file (
messages.json) for future retrieval.
- Sent messages are stored in a JSON file (
-
Data Persistence:
- User details, excluding private keys, are securely stored in a JSON file (
users.json). - Messages and user data persist between application sessions.
- User details, excluding private keys, are securely stored in a JSON file (
- Users register by providing a username and password. A unique RSA key pair is generated for each user.
- Registered users can log in to send and view messages.
- Messages sent are encrypted with the recipient's public key and stored in
messages.json. - Users can view their messages, which are decrypted in real-time using their private key.
users.json: Stores user details such as usernames, password hashes, and public keys.messages.json: Stores encrypted messages along with metadata (sender, recipient, timestamp).
- Python 3 or later
- Required libraries:
pip install cryptography bcrypt
- Save the file as
securechat.py. - Run the application in your terminal:
python securechat.py
- I would like to implement a graphical user interface (GUI) for better usability.
- Potentially add support for group messaging (currently 1 on 1)
- Enhance security by introducing additional authentication mechanisms.
Thank you for exploring SecureChat! Feel free to reach out for feedback or questions.