liveBook · Manning

Output feedback mode

As explained in Hacking Cryptography

Output feedback mode repeatedly encrypts an internal feedback value, typically an initialization vector, to generate a keystream independent of ciphertext.

Output feedback mode (OFB) turns a block cipher into a stream cipher by repeatedly encrypting an initialization vector and XORing the resulting keystream with plaintext. section 5.3

Its defining implementation properties are:

  • Generates the keystream from the encrypted IV rather than from ciphertext. section 5.3
  • Avoids CFB-style error propagation because ciphertext is not fed back into encryption. section 5.3
  • Produces ciphertext by XORing plaintext with the generated keystream. section 5.3
Figure 5.4 Stream ciphers generate a keystream, which is subsequently XORed to encrypt. Block ciphers directly output the ciphertext after encryption.
figure

Use the stream-cipher diagram to visualize OFB's keystream-then-XOR structure. section 5.3

How Hacking Cryptography covers it

How deep it goes
Defines IV encryption, keystream generation, XOR, and error behavior, without detailing implementation code or attacks.
Examples
Uses a stream-cipher keystream diagram and contrasts OFB with CFB's ciphertext feedback and error propagation.
What it assumes
Assumes familiarity with block ciphers, encryption blocks, initialization vectors, keystreams, and XOR.
What you can do after
Evaluate how OFB constructs ciphertext and distinguish its error behavior from CFB.
How it connects
Connects block ciphers with stream ciphers, initialization vectors, keystreams, XOR, and cipher feedback mode.

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.