This program converts a bitmap image into an AES (Advanced Encryption Standard) encrypted version. Objects inside the image are still visible!! This demonstrates that AES is insecure if it is used with ECB Block Cipher Mode.
- Install Python 3 if you don't have it already
- Go to your directory.
git clone https://github.com/dancodery/electronic-codebook-image-demonstration.git
cd electronic-codebook-image-demonstration
pip install pycrypto
python encrypt_image.py
orpython encrypt_image.py myimage.bmp
You can start 'encrypt_image' with arguments (it will use the default JavaDuke.bmp) or you can feed in your own Bitmap file as an argument.
On the left image you see the Java Duke which we encrypt in this program. The duke is divided into a certain number of blocks. Each block is AES encrypted. As you can see the blocks are encrypted the same way. This enables us to see objects in the image even that it is AES encrypted. So think twice the next time before using ECB.
Please give me a star if you like this repo ;=)
Copyright 2017 © Daniel Gockel