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$.