liveBook · Manning

Cipher block chaining mode

Cipher block chaining is a block-cipher mode that XORs each plaintext block with the preceding ciphertext block before encryption, using an initialization vector for the first block.

How 3 Manning books explain it

Hacking Cryptography

Cipher-block chaining mode XORs each plaintext block with the preceding ciphertext block before encryption, using an initialization vector for the first block.

How it is used
Uses CBC to conceal repeated block patterns while motivating implementation failures and attacks.
How deep it goes
Derives CBC encryption and decryption, then traces padding-oracle byte recovery and IV-reuse consequences.
Examples
Demonstrates penguin-image encryption, an AES-encrypted timestamp service, padding-oracle recovery, and browser requests carrying HTTP cookies.
What you can do after
Diagnose/debug with it by identifying IV reuse and padding-validity error leakage in CBC-based services.

Read how Hacking Cryptography explains cipher block chaining mode →

Software Security for Developers

AES-CBC mode is a block-cipher operating mode that chains plaintext blocks through AES encryption using an initialization vector.

How it is used
Explains how AES handles multiple blocks while preventing repeated plaintext patterns from appearing in ciphertext.
How deep it goes
Details block chaining, key and IV requirements, cleartext IV storage, and the absence of integrity protection.
Examples
Uses repeated message sections, two files encrypted under one key, and an IV-ciphertext decryption layout.
What you can do after
Evaluate AES configurations, generate unique IVs, and recognize when authenticated encryption is required.

Read how Software Security for Developers explains cipher block chaining mode →

Real-World Cryptography

Cipher block chaining is a block-cipher mode that XORs each plaintext block with the preceding ciphertext block before encryption, using an initialization vector for the first block.

How it is used
Hides repeating plaintext patterns when encrypting multiple blocks with a deterministic block cipher.
How deep it goes
Explains IV generation, XOR chaining, padding, encryption, and decryption, but stops short of implementation details.
Examples
Uses the ECB penguin, AES diagrams, and an eight-byte padding example.
What you can do after
Evaluate/understand how CBC randomizes block encryption and why decryption requires the associated IV.

Read how Real-World Cryptography explains cipher block chaining mode →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.