This tool provides a simple yet effective way to encrypt and decrypt images using pixel manipulation techniques. It allows users to securely alter image data using a key-based encryption method.
- Encryption: Encrypt images by scrambling pixel positions and applying mathematical operations.
- Decryption: Decrypt previously encrypted images to restore them to their original state.
- Command-Line Interface: Easy-to-use CLI for interacting with the tool.
- Load Image: Load the input image.
- Pixel Manipulation: Randomly swap pixel positions and apply mathematical operations.
- Save Encrypted Image: Save the modified image to a new file.
- Load Encrypted Image: Load the previously encrypted image.
- Reverse Pixel Manipulation: Undo the pixel swaps and mathematical operations.
- Save Decrypted Image: Save the restored image to a new file.
-
Clone the Repository:
git clone https://github.com/kur1an/SCT_CS_2.git cd SCT_CS_2
-
Install Dependencies: Make sure you have Python installed on your system. Additionally, install the required libraries using pip:
pip install pillow
-
Encrypt an Image:
- Run the script:
python image_tool.py
- Choose the encryption mode.
- Provide the input image path.
- Specify the output path for the encrypted image.
- Enter the encryption key.
- Run the script:
-
Decrypt an Image:
- Run the script:
python image_tool.py
- Choose the decryption mode.
- Provide the input image path (encrypted image).
- Specify the output path for the decrypted image.
- Enter the decryption key.
- Run the script:
Encrypt an image:
python image_tool.py
Choose mode (encrypt/decrypt)e/d: e
Enter the input image path: input_image.jpg
Enter the output image path: encrypted_image.jpg
Enter the encryption key: 12345
Decrypt an image:
python image_encryption_tool.py
Choose mode (encrypt/decrypt)e/d: d
Enter the input image path: encrypted_image.jpg
Enter the output image path: decrypted_image.jpg
Enter the decryption key: 12345