Skip to content

BlessingKanengoni7/SecureCHAT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

SecureCHAT – Hybrid Encrypted Messaging Application

Project Overview

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.


Key Features

  • 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)

Cryptographic Architecture

This project follows an industry-standard hybrid encryption model:

  1. AES (Advanced Encryption Standard)

    • Used to encrypt the actual message
    • Fast and efficient for large data
    • AES-256-GCM provides confidentiality and integrity
  2. 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.


How SecureCHAT Works

Sender Side:

  1. Sender generates an RSA key pair (public + private).
  2. Receiver generates an RSA key pair (public + private).
  3. Sender writes a plaintext message.
  4. A random AES-256 session key is generated.
  5. The message is encrypted using AES-GCM.
  6. The AES session key is encrypted using the receiver’s RSA public key.
  7. The encrypted message is digitally signed using the sender’s RSA private key.
  8. The encrypted data is transmitted to the receiver.

Receiver Side:

  1. Receiver decrypts the AES session key using their RSA private key.
  2. Receiver verifies the digital signature using the sender’s RSA public key.
  3. If verification succeeds, the encrypted message is decrypted using AES.
  4. The plaintext message is displayed to the receiver.
  5. If any key is incorrect or the message is tampered with, decryption fails.

Security Properties Achieved

  • 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.


Technologies Used

  • Python
  • Tkinter (GUI)
  • cryptography (hazmat primitives)
  • RSA-2048
  • AES-256-GCM

Installation & Setup

  1. Install Python (3.11 or later recommended).

  2. Install required dependency: python -m pip install cryptography

  3. Run the application: python SecureCHAT.py


Usage Notes

  • 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.

Future Improvements

  • Public key export/import
  • File encryption support
  • Network-based client/server communication
  • Secure key storage
  • Message history with chat bubbles

Author

Blessing Kanengoni B Tech (Hons) Degree in Information Security and Assurance

About

Hybrid RSA + AES secure messaging application with digital signatures and a modern chat-style GUI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages