liveBook · Manning

Electronic codebook mode

As explained in Real-World Cryptography

Electronic codebook mode encrypts each plaintext block independently with the same block-cipher key.

Electronic codebook (ECB) mode encrypts a long message by splitting it into fixed-size blocks and encrypting each block independently. Because block-cipher encryption is deterministic, identical plaintext blocks produce identical ciphertext blocks. section 4.3

That repeated structure is the trap: ciphertext can reveal patterns in the original message. ECB may conceal individual block contents, but it does not conceal repetition across blocks, making it unsuitable for safely encrypting long structured data. section 4.3

The ECB penguin

An image encrypted with ECB can still reveal the penguin’s outline because repeated image regions become repeated ciphertext blocks. The visible pattern demonstrates why deterministic block-by-block encryption leaks information.

How Real-World Cryptography covers it

How deep it goes
Defines block-by-block encryption and its deterministic leakage, but stops short of implementation details or a complete encryption procedure.
Examples
Uses the encrypted penguin image to make repeated ciphertext patterns visibly reveal plaintext structure.
What you can do after
Evaluate whether block-encryption output leaks repeated patterns and recognize when a different mode is required.
How it connects
Connects deterministic encryption, block ciphers, AES, padding, and CBC mode.

Also explained in

Compare how 3 books explain electronic codebook mode →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Real-World Cryptography. The section links point to the parts of the book it draws on.