Confusion and
Diffusion are two underlying principles of
cryptography. Confusion is making each output depend upon the key. Diffusion is making each output depend on each of the previous bits input.
Confusion: Confusion is the distribution of key material over the plaintext. Xamot suggests a more concise definition:
Each key digit affecting many ciphertext digits.
In a well designed
cipher, each bit of key should impact each bit of ciphertext. While a bit can only have two states (
,
1) it is important that each bit of the key influences the state that this bit will be set to. This helps to hamper cryptanalysis by maximizing the number of keys that could have generated that output. This is easy to visualize if thought of as
cellular automata. If three 'mother' (key) bits alter one 'daughter' (
ciphertext), then one 'mother' can easily be determined from three daughters. Furthermore, these daughters can facilitate a
guessing attack on four more mothers, two with a probability of sucess of one half, and two with a probability of sucess of one fourth. Thus, to prevent the type of attack illustrated above,
I suggest that there should be more key material input into a block than plaintext.
Diffusion: Diffusion is the distribution of plaintext material over ciphertext. Xamot suggests a more concise definition:
Each plaintext digit affecting many ciphertext digits.
In a well designed
cipher, each bit of plaintext should impact each bit of ciphertext. Good diffusion reduces the likelyhood that an attack on a cipher will be sucessful, for the reasons cited above.
The Avalanche Effect: The Avalanche Effect relates to the properties of confusion and diffusion in a cipher. If a cipher has a good avalanche effect, then a change in a single bit of the key or plaintext will alter the state of half of all bits in the ciphertext.
An example of a cipher that demonstrates the Avalance Effect is DES.
That is all.