SecureCHAT is a GUI-based secure messaging application implemented in Python. It demonstrates real-world secure communication using a hybrid cryptographic architecture that combines RSA public-key cryptography with AES symmetric encryption.
The application is designed to simulate how modern messaging systems achieve:
- Confidentiality
- Authentication
- Integrity
SecureCHAT uses RSA to securely exchange an AES session key and to digitally sign messages, while AES-GCM is used to efficiently encrypt message content.
- Hybrid encryption (RSA + AES)
- AES-256-GCM message encryption
- RSA-2048 key pairs for sender and receiver
- Digital signatures for authentication and integrity
- Secure key separation (sender vs receiver)
- Modern dark-themed GUI inspired by real chat applications
- Failure-safe design (wrong keys or tampering causes decryption failure)
This project follows an industry-standard hybrid encryption model:
-
AES (Advanced Encryption Standard)
- Used to encrypt the actual message
- Fast and efficient for large data
- AES-256-GCM provides confidentiality and integrity
-
RSA (Rivest–Shamir–Adleman)
- Used to encrypt the AES session key
- Used to digitally sign encrypted messages
- Enables secure key exchange and authentication
This architecture mirrors real-world secure systems such as TLS/HTTPS.
Sender Side:
- Sender generates an RSA key pair (public + private).
- Receiver generates an RSA key pair (public + private).
- Sender writes a plaintext message.
- A random AES-256 session key is generated.
- The message is encrypted using AES-GCM.
- The AES session key is encrypted using the receiver’s RSA public key.
- The encrypted message is digitally signed using the sender’s RSA private key.
- The encrypted data is transmitted to the receiver.
Receiver Side:
- Receiver decrypts the AES session key using their RSA private key.
- Receiver verifies the digital signature using the sender’s RSA public key.
- If verification succeeds, the encrypted message is decrypted using AES.
- The plaintext message is displayed to the receiver.
- If any key is incorrect or the message is tampered with, decryption fails.
-
Confidentiality: Only the receiver can decrypt the message using their private key.
-
Authentication: The digital signature confirms the identity of the sender.
-
Integrity: Any modification to the encrypted message invalidates the signature.
- Python
- Tkinter (GUI)
- cryptography (hazmat primitives)
- RSA-2048
- AES-256-GCM
-
Install Python (3.11 or later recommended).
-
Install required dependency: python -m pip install cryptography
-
Run the application: python SecureCHAT.py
- Both sender and receiver must generate keys before communication.
- Private keys are never exposed or displayed.
- This application is intended for educational and demonstration purposes.
- Public key export/import
- File encryption support
- Network-based client/server communication
- Secure key storage
- Message history with chat bubbles
Blessing Kanengoni B Tech (Hons) Degree in Information Security and Assurance