This repository contains the source code and documentation for our course project on Image Steganography with RSA Algorithm. The project was developed as part of the course "Introduction to Cryptography" in the semester 2021.2.
Image steganography is the practice of concealing secret information within an image, making it appear as a regular image to an observer. Our project focuses on implementing image steganography techniques along with the RSA algorithm for encryption. By combining these two methods, we enable users to exchange secret messages securely using images.
- Image Steganography: The application allows users to hide secret messages within images using steganography techniques.
- RSA Encryption: The secret messages are encrypted using the RSA algorithm, providing an additional layer of security.
- User-friendly Interface: The app provides an intuitive and user-friendly interface for easy interaction.
To run the application locally, you need to have the following requirements installed on your machine:
- Python 3.8 (Recommended)
- numpy
- opencv_python
- PySimpleGUI
You can install the required dependencies using the following command:
pip install -r requirements.txt
Follow these instructions to get a copy of the project up and running on your local machine for development and testing purposes:
-
Clone the repository:
git clone https://github.com/khanhluong34/Image-Steganography-with-RSA-algorithm
-
Install the required dependencies:
pip install -r requirements.txt
-
Generate the public and secret keys:
python generate_keys.py
This will generate a pair of public keys and secret keys. The public key is meant to be shared with the friend you want to exchange messages with, and you should also ask your friend to share their public keys with you.
-
Run the application:
python app.py
The application supports two main use cases: encrypting messages and decrypting messages.
- Launch the application by running
app.py
. - Select an image to hide a secret message.
- Select the public key file of your intended recipient.
- Enter the desired secret message in the provided input field.
- Select where you want to save the resulting image.
- Click the "Encode" button.
The application will generate a new image containing the hidden message and save it to the specified location.
- Launch the application by running
app.py
. - Select the image containing the hidden message that you received from your friend.
- Click the "Decode" button.
The application will extract the hidden message from the image and decrypt it using RSA. The decrypted message will be displayed in the application.
Note: To successfully decrypt a message, you need to have the corresponding private key that matches the public key used for encryption.
Remember to securely store your private keys and only share the public keys with trusted recipients.
- Tran Khanh Luong
- Pham Tien Son
- Le Tran Thang
This project is licensed under the MIT License.
We would like to express our gratitude to our instructor Nguyen Phi Le for her guidance and support throughout the course. Her valuable insights and feedback have greatly contributed to the success of this project.