An interactive exploration of the simplest block cipher mode and why it's considered insecure
Electronic Code Book (ECB) is the simplest mode of operation for block ciphers. In ECB mode, each block of plaintext is encrypted independently using the same key. This means identical plaintext blocks will always produce identical ciphertext blocks.
ECB mode reveals patterns in the plaintext because identical blocks encrypt to identical ciphertext. This makes it vulnerable to analysis attacks.
The most famous example of ECB's weakness is the "ECB Penguin" - when an image is encrypted with ECB, the outline remains visible!
Clear patterns visible
Patterns still visible! 🐧
No visible patterns
Never use ECB mode in production! ECB is considered cryptographically insecure because it reveals patterns in plaintext. Use CBC, GCM, or other secure modes instead.