- ECB mode encrypts identical plaintext blocks to identical ciphertext blocks (insecure).
- CBC chains blocks using XOR and Initialization Vectors (IV).
- GCM provides AEAD (Authenticated Encryption with Associated Data).
### Why Modes Matter
Block ciphers encrypt fixed-size blocks (e.g. 128 bits). To encrypt variable-length data securely, we use **Modes of Operation**.
#### Electronic Codebook (ECB) - Insecure!
Encrypts each block independently. Identical plaintext blocks yield identical ciphertext blocks, revealing visual patterns (such as the famous ECB Tux penguin leakage).
#### Galois/Counter Mode (GCM) - Industrial Gold Standard
Combines CTR mode streaming with GHASH authentication tags to provide **Authenticated Encryption with Associated Data (AEAD)**.