liveBook · Manning

Cipher feedback mode

As explained in Hacking Cryptography

Cipher feedback mode generates a keystream by feeding ciphertext back into a block cipher and is self-synchronizing.

Cipher feedback mode (CFB) turns a block cipher into a self-synchronizing stream cipher. It feeds part of the previous ciphertext block into the encryption process, generates a keystream, and XORs that keystream with plaintext. section 5.3

CFB’s operational tradeoffs include:

  • It avoids the padding requirement associated with encrypting plaintext directly in fixed-size blocks. section 5.3
  • A corrupted ciphertext bit can propagate through subsequent blocks, causing them to decrypt incorrectly. section 5.3
  • Unlike output feedback mode, CFB uses ciphertext as feedback, making it vulnerable to transmission-error propagation. section 5.3

Corrupted video transmission

When a video file encrypted with CFB suffers a corrupted bit during transmission, the error ripples into subsequent blocks, which decrypt incorrectly. section 5.3

How Hacking Cryptography covers it

How deep it goes
Explains feedback, keystream generation, XOR encryption, and error propagation, but does not provide implementation code or attack steps.
Examples
Uses a video transmission with one corrupted bit to demonstrate propagation into subsequent decrypted blocks.
What it assumes
Assumes familiarity with block ciphers, stream ciphers, ciphertext blocks, keystreams, and XOR.
What you can do after
Evaluate CFB’s stream-like operation and recognize its susceptibility to ciphertext-error propagation.
How it connects
Contrasts CFB with block ciphers, stream ciphers, counter mode, output feedback mode, and error propagation.

Related concepts

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