Electronic codebook (ECB) mode encrypts each plaintext block independently with the same key. Because identical plaintext blocks produce identical ciphertext blocks, the ciphertext can reveal repeated patterns in the original data. section 5.3
Figure 5.5 ECB mode encrypts each block independently of other blocks.
This figure shows the defining implementation property: ECB encrypts every block independently rather than incorporating neighboring blocks. section 5.3
The ECB penguin
Encrypting an image with ECB can leave its broad features recognizable. Repeated or related pixel blocks preserve enough spatial structure for darker and lighter regions to remain visible, even without the key or decryption. section 5.3
Treat ECB as a warning sign when encrypting multiple blocks:
- Do not use ECB for real-world applications because it reveals plaintext patterns. section 5.3
- Choose a mode that prevents repeated plaintext blocks from producing identical ciphertext; CBC is presented as a commonly used alternative and requires a unique IV for each message. section 5.3 section 5.6


