# Difference Between Confusion and Diffusion

## Difference Between Confusion and Diffusion in Tabular Form

• Diffusion: Property of statistical distribution. So if you find the statistical property, you can find the key.
• Confusion: Property of drastic change of ciphertext. Little change of key makes huge output(=Ciphertext of an Incredibly different pattern)(Usually this principle is told by hiding the relationship between ciphertext and key).

### Comparison Chart

Confusion Diffusion
Confusion obscures the relationship between the plaintext and ciphertext. Diffusion spreads the plaintext statistics through the ciphertext.
A one-time pad relies entirely on confusion while a simple substitution cipher is another (weak) example of a confusion-only cryptosystem. A double transposition is the classic example of a diffusion-only cryptosystem.
Confusion hides the relation between the ciphertext and key. Diffusion hides the relation between the ciphertext and the plaintext.
If a single bit in the key is changed, most or all bits in the ciphertext will also be changed. If a single symbol in the plaintext is changed, several or all symbol in the ciphertext will also be changed
In confusion, the relationship between the statistics of the ciphertext and the value of the encryption key is made complex. It is achieved by substitution. In diffusion, the statistical structure of the plain text is dissipated into long-range statistics of the ciphertext This is achieved by permutation.

### Definition of Confusion

• Confusion of each character of ciphertext depends on a different part of the key. In confusion, the key does not directly relate to ciphertext. It is a classical substitution cipher.

Confusion = Substitution

a —>b

Caesar cipher

• For Example, Suppose we have a Hill cipher with a matrix n x n and suppose we have a plaintext-ciphertext pair of length n2 with which we are able to solve for the encryption matrix.  When a situation like that happens, the cryptanalyst would probably need to solve for the entire key simultaneously, rather than piece by piece.

### Definition of Diffusion

• Diffusion It means any of the characters in plaintext is changed, then simultaneously several characters of the ciphertext should also be changed. If the character of ciphertext is change then simultaneously several characters of plaintext also changed. It is a classical transposition cipher.

Diffusion = Transposition or Permutation

abcd —>dacb

DES

• For Example, Hill Cipher has the characteristic of diffusion.

## More Differences

• Difference Between Stream Cipher and Block Cipher
• Difference Between Monoalphabetic Cipher and Polyalphabetic Cipher