0
$\begingroup$

Say I wanted to change the order of the 4 steps within a round in AES, would it change the final result?

$\endgroup$
2
$\begingroup$

We have four components of AES round function:

  • SubBytes performs per-byte substitution operation.
  • ShiftRows is a permutation of bytes of the state.
  • MixColumns is a function that works on each column of the state.
  • AddRoundKey adds 128 bits of the round key to the corresponding bytes of the state.

The only two operations (that follow each other in the original order) that commute are SubBytes and ShiftRows since the first works independently on each byte (and the operation for each byte is the same) and the second one just reshuffles the bytes.

If you swap e.g. MixColumns and AddRoundKey you will get a different result, because instead of adding the round key $rk$ you will effectively add MixColumns($rk$) which is a different value for non-zero round key.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.