ECB vs CBC: Patterns & IVs
Demonstrate the ECB penguin attack and why CBC with a random IV is required.
Welcome
ECB and CBC are two block cipher modes. ECB is famously insecure due to pattern leakage. CBC with a random IV is much stronger. Let's understand both deeply.
ECB Mode: Electronic Codebook
ECB encrypts each block independently: Ci = AES(K, Pi). Same plaintext block → same ciphertext block every time. Blocks in one message or across messages are identical if content matches.
All lessons in this course
- Block Cipher Fundamentals & Padding
- ECB vs CBC: Patterns & IVs
- CTR Mode & Stream-Cipher Behavior
- GCM & Authenticated Encryption