This project implements an AES-based image encryption and decryption system using Python. The project demonstrates the core working principles of the Advanced Encryption Standard (AES) algorithm by manually implementing AES transformations such as SubBytes, ShiftRows, MixColumns, AddRoundKey, and their corresponding inverse operations for decryption.
The system encrypts image files into encrypted binary .enc format and restores the original image during decryption using the same secret key.
- AES-inspired manual implementation
- 128-bit secret key generation
- Image encryption and decryption
- Galois Field multiplication
- SubBytes transformation using AES S-Box
- ShiftRows operation
- MixColumns transformation
- AddRoundKey operation
- Inverse AES operations for decryption
- Encrypted output stored as
.encbinary file - Exact image restoration after decryption
- Python
- NumPy
- Pillow (PIL)
- Secrets
- SubBytes
- ShiftRows
- MixColumns
- AddRoundKey
- Random Key Generation
- Padding
- AddRoundKey
- Inverse MixColumns
- Inverse ShiftRows
- Inverse SubBytes
- Entered the Decryption key
Input Image
→ Convert Image to Binary Byte Data
→ Divide into 16-byte Blocks
→ AES Encryption Operations
→ Encrypted .enc File
Encrypted .enc File
→ AES Decryption Operations
→ Remove Padding
→ Restore Original Image
Install required libraries using pip:
pip install numpy pillow secrets

