7 Difference Between Confusion And Diffusion With Example

July 2022 · 3 minute read

In cryptography, confusion and diffusion are two properties of the operation of a secure cipher which were identified by Claude Elwood Shannon in his 1949 paper, Communication Theory Of Secrecy Systems. From that day till today, these two remains to be the guiding principles for the design of cryptographic algorithm. In simple terms, diffusion spreads the plaintext statistics through the ciphertext whereas confusion obscures the relationship between the plaintext and ciphertext.

What Is Confusion?

According to Elwood Shannon’s original description, confusion refers to making the relationship between the key and the cipher as complex and as involved as possible. In other words, the technique ensures that the ciphertext gives no clue about the plaintext, and in this regard, the relationship between the statistics of the cipher text and the value of the encryption has to remain as complex as possible. It is achieved by spreading out the individual plaintext digit over many Ciphertext digits, such as when a single bit of the plaintext is changed, it must affect the whole cipher text or change must occur on the entire cipher text.

What is Diffusion?

According to Elwood Shannon’s description, diffusion refers to the property that the redundancy in the statistics of the plaintext is “dissipated” in the statistics of the Ciphertext. In diffusion, the output bits should depend on the input bits in a very complex way so that in case one bit of the plaintext is changed, then, the Ciphertext should change completely in an unpredictable or pseudorandom manner.

In a cipher with good diffusion, flipping an output bit should change each output bit a probability of one half. This is usually termed as Strict  Avalanche Criterion. What this means is that, for a randomly chosen input, if one flips the i-th bit, then the probability that the j-th  output bit will change should be one half, for any i and j.

The main goal of confusion is to make it very difficult to find the key even if one has most of the plaintext-ciphertext pairs produced with the same key and in this regard, each bit of the Ciphertext should depend on the entire key and in different ways on different bits of the key, changing one bit of the key should change the Ciphertext entirely.

Also Read: Difference Between Block Cipher And Stream Cipher

Difference Between Confusion & Diffusion In Tabular Form

BASIS OF COMPARISONCONFUSION    DIFFUSION
GoalObscure the relationship between the plaintext and ciphertext.  Spread the plaintext statistics through the cipher.  
AlgorithmConfusion technique is possible through substitution algorithm.  Diffusion technique is possible through transportation algorithm.  
UseConfusion technique is used in both block and stream cipher.    Diffusion technique is only used in block cipher.
ChangesIf a single bit in the key is changed, all the bits in the ciphertext will also have to be changed.  In case a symbol in the plaintext is changed, several or all symbols in the cipher text will also have to be changed.
What It HidesConfusion technique hides the relation between the ciphertext and key.  Diffusion hides the relation between the ciphertext and the plaintext.
Vagueness & RedundancyConfusion technique results in increased vagueness.    Diffusion technique results in increased redundancy.
Statistics of Cipher TextIn confusion, the relationship between the statistics of the cipher text and the value of the encryption key is made complex. This is achieved through substitution.  In diffusion, the statistical structure of the plaintext is “dissipated” into long-range statistics of the cipher text. This is achieved through permutation.

Also Read: Difference Between Linear And Differential Cryptanalysis

ncG1vNJzZmiumauupbXFn5yrnZ6YsrR6wqikaK%2BYlsFutdJmq6GdXZm2p7LEq5ynm5Vir6bA1p6cp2WTpLunwdKipqdllJ6zp8HSoqanZaeewal5xLGYpqicmnw%3D