ImgVault - Image Encryption and Decryption Tool, is designed to securely encrypt and decrypt images using a method based on the XOR operation. The project employs Cipher Block Chaining (CBC) mode, where each pixel's color value is XORed with both a key and an initial value (IV) to enhance security. The IV is updated dynamically as the encryption progresses, adding an extra layer of complexity. Additionally, you have included the concept of rounds, allowing for repeated encryption/decryption passes over the image for stronger protection. The tool supports both encryption and decryption through command-line arguments.
- Clone the repository:
git clone https://github.com/AmalRitessh/CLI-Image-Encryption-Decryption-Tool.git
- Navigate to the project directory:
cd ImgVault
- Install dependencies:
pip install -r requirements.txt
- Encrypting Images.
# The format to pass variables
python3 ImgVault.py -e <path-to-img> <key> <initial-value> <no-of-rounds>
# Example usage
python3 ImgVault.py -e cat.jpg 4630 5734 13
# Example usage
python3 ImgVault.py --encrypt cat.jpg 4630 5734 13
- Decrypting Images.
# The format to pass variables
python3 ImgVault.py -d <path-to-img> <key> <initial-value> <no-of-rounds>
# Example usage
python3 ImgVault.py -d image_enc.png 4630 5734 13
# Example usage
python3 ImgVault.py --decrypt image_enc.png 4630 5734 13
- Help
python3 ImgVault.py -h
python3 ImgVault.py --help
Original Image | Encrypted Image | Decrypted Image |
---|---|---|