2
$\begingroup$

I'm looking for test vectors for AES' MixColums and I found this: https://en.wikipedia.org/wiki/Rijndael_mix_columns#Test_vectors_for_MixColumn.28.29.3B_not_for_InvMixColumn

Here it says that the operation on the column 1, 1, 1, 1 doesn't do anything and returns 1, 1, 1, 1.

I don't understand this. From MixColumns here's what we're doing:

$$ \begin{bmatrix} \mathtt{02} & \mathtt{03} & \mathtt{01} & \mathtt{01} \\ \mathtt{01} & \mathtt{02} & \mathtt{03} & \mathtt{01} \\ \mathtt{01} & \mathtt{01} & \mathtt{02} & \mathtt{03} \\ \mathtt{03} & \mathtt{01} & \mathtt{01} & \mathtt{02} \\ \end{bmatrix} \begin{bmatrix} \mathtt{01} \\ \mathtt{01} \\ \mathtt{01} \\ \mathtt{01} \\ \end{bmatrix} \cdot = \begin{bmatrix} \mathtt{a_0} \\ \mathtt{a_1} \\ \mathtt{a_2} \\ \mathtt{a_3} \\ \end{bmatrix} $$

And so, $a_0 = a_1 = a_2 = a_3$ will be calculated as:

$$ (\mathtt{02} \cdot \mathtt{01}) + (\mathtt{03} \cdot \mathtt{01}) + (\mathtt{01} \cdot \mathtt{01}) + (\mathtt{01} \cdot \mathtt{01}) $$

with:

  • $02 * 01$ is $X * 1$ which is $02$
  • $03 * 01$ is $(X+1) * 1$ which is $03$
  • $01 * 01 = 01$

So the total should be $03 + 02 + 01 + 01 = 07$.

$\endgroup$

1 Answer 1

6
$\begingroup$

No, $03 + 02 + 01 + 01 = 01$

The problem is that you are misinterpreting $+$, it's not addition modulo 256; instead, it's the addition operation in the field $GF(2^8)$, which can be computed by performing the exclusive-or on the inputs.

And, $03 \oplus 02 \oplus 01 \oplus 01 = 01$

$\endgroup$
1
  • $\begingroup$ Oups, here this is $(X+1) \oplus X \oplus 1 \oplus 1$ which is indeed $1$. $\endgroup$ Commented Nov 15, 2016 at 21:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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