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 →
What to know first
- ciphertextCiphertext is data produced by encryption whose original content is intended to be unreadable without the required decryption capability.
- plaintextPlaintext is data in its readable, unencrypted form, typically before encryption or after decryption.
- AESAES is a standardized symmetric block cipher that encrypts and decrypts data in 128-bit blocks using 128-, 192-, or 256-bit keys.
- block cipherA block cipher is a keyed symmetric cryptographic algorithm that transforms fixed-size blocks of data into ciphertext.
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 of data being accurate, complete, consistent, and valid throughout its storage, processing, and transfer.
- 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.
Questions about cipher block chaining mode
What is 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.
Which Manning books explain cipher block chaining mode?
Hacking Cryptography, Software Security for Developers and Real-World Cryptography.
What should I know before learning cipher block chaining mode?
Manning books that teach cipher block chaining mode usually introduce ciphertext, plaintext, AES and block cipher first.
What is the difference between cipher block chaining mode and Galois/Counter 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. Galois/Counter Mode is an authenticated-encryption mode that combines counter-mode encryption with authentication of ciphertext and associated data.
What is cipher block chaining mode a kind of?
Cipher block chaining mode is a kind of mode of operation. A block cipher mode of operation is a method for applying a block cipher to messages consisting of one or more blocks.
What is cipher block chaining mode also called?
Cipher block chaining mode is also called CBC.
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.


