A block cipher only encrypts one fixed-size block. How you chain the blocks together is the mode, and it matters enormously — encrypt the same image in ECB and in CBC and the difference is visible from across the room.
Each chip is a block's ciphertext fingerprint. Red means that exact value appeared earlier — identical plaintext, identical ciphertext, pattern preserved.
Nothing connects the blocks. P₁ = P₃ forces C₁ = C₃, so every repetition in the plaintext is a repetition in the ciphertext. Blocks can also be reordered, deleted or replayed without detection.
Every block is XORed with the previous ciphertext before encryption, so identical plaintext blocks encrypt differently depending on everything before them. A random IV makes even the same message encrypt differently each time.
ECB: C_i = E_k(P_i) CBC: C_i = E_k(P_i XOR C_(i-1))
AES encrypts exactly 128 bits. Real messages are longer, so something must decide how to apply it repeatedly — that decision is the mode of operation, and it is where most of the security lives.
ECB (Electronic Codebook) simply encrypts each block independently. It is the obvious choice and it is almost always wrong: equal plaintext blocks produce equal ciphertext blocks, so structure survives encryption. The image above is the standard demonstration.
CBC (Cipher Block Chaining) XORs each plaintext block with the previous ciphertext block first. Now every block depends on all the blocks before it, and a random IV makes the whole ciphertext different every time.
ECB has no legitimate use for real data. But CBC is not the modern answer either:
The tool shows the mechanism — the slides show why it is built that way.
Everyone remembers the ECB penguin. One-on-one tutoring goes further — padding oracles, IV handling, and why authenticated encryption is now the only defensible choice.