Electronic Codebook (ECB) mode

The simplest block cipher mode: each block is encrypted independently under the same key, so identical plaintext blocks give identical ciphertext blocks and patterns show through.

Electronic Codebook is the simplest block cipher mode of operation, specified in NIST SP 800-38A. The plaintext is split into blocks and each block is encrypted separately under the same key, with no initialization vector and no link between blocks. It behaves like a codebook: under a given key, a given plaintext block always produces the same ciphertext block.

That determinism is the weakness. Repeated plaintext blocks produce repeated ciphertext blocks, so structure in the data survives encryption; the well-known illustration is a bitmap image encrypted in ECB whose outline remains visible. Blocks can also be reordered, deleted or replayed without the mode detecting it. NIST has announced that its planned revision of SP 800-38A will limit approval of ECB to uses that other NIST guidance specifically allows. Cipher block chaining hides repetition by chaining each block to the one before, counter mode turns the cipher into a keystream generator, and Galois/Counter Mode adds integrity.

Exam relevance: a scenario in which encrypted records or images still reveal patterns, or identical inputs give identical ciphertext, is likely to point to ECB. Candidates are expected to recognise that the algorithm (AES, for example) can be strong while the mode leaks, and to choose a mode that uses an IV or nonce, preferably an authenticated one.