I know that in AES the shift-rows and mix-columns operations introduce diffusion, but I don't understand how they create diffusion. Also, I know the add-round-key operation creates confusion, but I don't understand how it creates confusion by simply XORing the round key with the columns of the state matrix.
1 Answer
$\begingroup$
$\endgroup$
Put simply:
- The add key layer ensures the encryption function is only computable by someone who knows the key
- Adds some confusion because the key is (psuedo) random
- The subBytes s-box layer creates confusion
- each symbol is mapped to another symbol in a way that impedes common methods of cryptanalysis (high resistance to linear and differential cryptanalysis)
- The shiftRows and mixColumns operations combine to provide full diffusion over the course of 2 rounds
- The state is a 4x4 grid of 8-bit words
- mixColumns operates vertically on each 4 word/32-bit column
- One bits difference in any word in the input column will spread to multiple places in multiple words in the output column
- shiftRows ensures that over the course of successive rounds different words are grouped up as inputs to the mixColumn function
- There's a good answer that is slightly more specific here
For more information, consult the book on the design of Rijndael, or maybe try one of the handy diagrams or animations that exist.