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.
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
- mode of operationkind of · A block cipher mode of operation is a method for applying a block cipher to messages consisting of one or more blocks.
- Galois/Counter Modealternative to · Galois/Counter Mode is an authenticated-encryption mode that combines counter-mode encryption with authentication of ciphertext and associated data.
- data integritycontrasts with · Data integrity is the property that data remains accurate, complete, consistent, and valid, with changes made only through authorized actions.
- initialization vectoruses · An initialization vector is a typically nonsecret value supplied to a cryptographic operation to initialize or vary its processing across uses.
- BEASTused by · BEAST is a browser-based attack against CBC-mode encrypted connections that exploits predictable initialization vectors to recover secret request data.
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.


