Skip to content
/ ECB-demo Public

Demonstration of why ECB mode should not be used with block ciphers.

License

Notifications You must be signed in to change notification settings

tblah/ECB-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ECB-demo

Demonstration of why ECB mode should not be used with block ciphers.

demo

To use the script, make sure imageMagick is installed and then call the script with the arguement being the image you want to encrypt e.g. ./ECB-art.sh demo.png

This works best on images with large blocks of the same colour. An easy way of acheiving this is to make an image only black and white. This can be done using imageMagick using something like

convert input.png -threshold 50% output.png

This occurs because ECB produces the same output for the same input so whatever the black parts of the image are mapped to, they will always end up the same, likewise for any other input. This causes information about the plaintext to be leaked.

About

Demonstration of why ECB mode should not be used with block ciphers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages