liveBook · Manning

Diffusion

As explained in Hacking Cryptography

Diffusion is a cryptographic design property that spreads the influence of each plaintext element across many ciphertext elements.

Diffusion spreads the influence of each plaintext element across many ciphertext elements. Confusion hides the relationship between plaintext and ciphertext; diffusion distributes that relationship across the output. section 5.0

The stream-cipher and block-cipher contrast makes the implementation goal concrete:

  • A stream cipher encrypts one bit or byte at a time, so changing one plaintext byte changes precisely one corresponding ciphertext byte. section 5.0
  • A block cipher buffers multiple plaintext bytes and encrypts them together, providing stronger diffusion alongside confusion. section 5.6
  • Block operation introduces engineering concerns such as padding and modes of operation; diffusion alone does not prevent attacks against flawed implementations. section 5.6 section 5.3

Visible patterns

Encrypting an image with ECB can leave recognizable patterns, whereas CBC removes the penguin’s discernible features. The contrast shows how block processing and chaining affect the spread of plaintext structure. section 5.3

Figure 5.1 Confusion hides the relation between plaintext and ciphertext. Diffusion distributes the effect of each plaintext byte over many ciphertext bytes.
figure

Compare confusion, which obscures plaintext-to-ciphertext correspondence, with diffusion, which distributes each plaintext byte’s effect across many ciphertext bytes. section 5.0

How Hacking Cryptography covers it

How deep it goes
Defines diffusion and contrasts byte-level and block-level behavior, but does not develop a cipher’s internal diffusion rounds.
Examples
Uses changed-byte behavior, block buffering, and penguin images encrypted with ECB and CBC.
What you can do after
Evaluate whether encryption spreads plaintext changes across many ciphertext bytes and distinguish that behavior from confusion.
How it connects
Connects diffusion with confusion, stream ciphers, block ciphers, and modes of operation.

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.