The terms confusion and diffusion are the properties for making a secure cipher. Both Confusion and diffusion are used to prevent the encryption key from its deduction or ultimately for preventing the original message. Confusion is used for creating clueless ciphertext while diffusion is used for increasing the redundancy of the plaintext over the major part of the ciphertext to make it obscure. The stream cipher only relies on confusion. Alternatively, diffusion is used by both stream and block cipher.

Claude Shannon proposed the technique of confusion and diffusion for capturing the fundamental blocks of a cryptographic function rather than using a long and time-consuming method of statistics. Shannon was mainly worried about the prevention of the cryptanalysis with the help of statistical analysis.

The reason behind it is as follows. Suppose the attacker has some understanding of the statistical characteristics of the plaintext. For instance, in a human understandable message, the frequency distribution of the alphabets can be known beforehand. In that case, the cryptanalysis is quite easy to conduct where the known statistics can be reflected in the ciphertext. This cryptanalysis can certainly deduce the key or some part of the key. That is the reason Shannon suggested two methods namely confusion and diffusion.

## Content: Confusion Vs Diffusion

### Comparison Chart

Basis for comparison | Confusion | Diffusion |
---|---|---|

Basic | Utilized to generate vague cipher texts. | Utilized to generate obscure, plain texts. |

Seeks to | Make a relation between statistics of the ciphertext and the value of the encryption key as complicated as possible. | The statistical relationship between the plaintext and ciphertext is made as complicated as possible. |

Achieved through | Substitution algorithm | Transposition algorithm |

Used by | Block cipher only. | Stream cipher and block cipher |

Result in | Increased vagueness | Increased redundancy |

### Definition of Confusion

**Confusion** is a cryptographic technique devised to increase the vagueness of the cipher text, in simple words the technique ensures that the cipher text gives no clue about the plaintext. In the given technique the relationship between the statistics of the cipher text and the value of the encryption key is maintained as complex as possible. Even though the attacker gets some control over the statistics of the ciphertext, he could not be able to deduce the key as the manner in which the key was used to produce that ciphertext is so complex.

The confusion can be obtained by using substitution and complex scrambling algorithm that relies on key and the input (plaintext).

### Definition of Diffusion

**Diffusion** is a cryptographic technique invented to increase the redundancy of the plain text to obscure the statistical structure of the plaintext to prevent attempts to deduce the key. In the diffusion, the statistical structure of the plaintext can vanish into long-range statistics of the ciphertext and the relationship between them is complex so that no one can deduce the original key.

It is achieved by spreading out the individual plaintext digit over many cipher text digits, such as when a single bit of the plaintext is changed it must affect the whole cipher text or the change must occur on the entire cipher text.

In block cipher the diffusion can be obtained by applying some permutation on the data with a function to the permutation, the outcome is that the bit from different positions in the original plaintext will contribute to a single bit of the ciphertext. The transformation in the block cipher depends upon the key.

## Key Differences Between Confusion and Diffusion

- Confusion technique is used to create vague ciphertexts whereas diffusion is utilized to generate obscure plaintexts.
- The diffusion attempts to make the statistical association between the plaintext and ciphertext as complex as possible. On the contrary, the confusion technique attempts to make the correlation between statistics of the ciphertext and the value of the encryption key as complicated as possible.
- Substitution algorithms can be employed to obtain confusion. As against, diffusion can be achieved through using transpositional techniques.
- Block cipher relies on confusion as well as diffusion while stream cipher only uses confusion.

### Conclusion

Confusion and diffusion both are the cryptographic techniques where in confusion the purpose is to make a relationship between the statistics of the ciphertext and the value of the encryption key as complicated as possible. On the other hand, diffusion tries to obscure the statistical structure of the plaintext through spreading out the affect of each individual plaintext digit over major part or ciphertext digits.

Suraj Lulla says

Nice article.

Harsh says

Informative article, thank you.

Abutaha says

Nicely explained.

gokul says

Great article.

Yaroslav says

A complicated concept is explained in a lucid way….

joe says

Great explanation…

Srini says

Fantastic explanation!

baba says

Informative….