| ECB | CBC | CFB | OFB | CTR |
|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
A Python CLI that enables users to encrypt image files using the Data Encryption Standard (DES) algorithm. This tool supports five different encryption modes: ECB, CBC, CFB, OFB, and CTR. The DES algorithm, as implemented in this project, follows the detailed guidelines provided in The DES Algorithm Illustrated by J. Orlin Grabbe.
- Command-Line Interface: Easily encrypt and decrypt images directly from the command line.
- Multiple Encryption Modes: Choose from five different modes of DES encryption.
- Image File Support: Specifically designed to work with images that use the RGB or RGBA mode.
- Python Virtual Environment: Utilizes a Python virtual environment to manage dependencies and ensure a consistent runtime environment.
This tool currently only supports images that use the RGB or RGBA mode. In its current state, this tool is unable to decrypt images that were encrypted using the ECB or CBC mode (unless the original image size perfectly divides into 64-bit blocks).
Before using this application, ensure you have Python installed on your machine. You will also need to set up a virtual environment. After setting up your virtual environment, run
python -m pip install -r requirements.txtto install all necessary dependencies.
python main.py [-h] input {ECB,CBC,CFB,OFB,CTR} keypositional arguments:
input: The relative path to the image file you wish to encrypt.{ECB,CBC,CFB,OFB,CTR}: The encryption mode to use.key: A 64-bit integer representing the key to encrypt/decrypt the image with.
options:
-h, --help: show this help message and exit
The following would encrypt an image named panda.png on my desktop using the CTR mode and the key 512.
python main.py ../Desktop/panda.png CTR 512




