MixColumn AES manually with GF(2^8)

344 Views Asked by At

In the step of MixColumn in AES, calculate d0,0 if given c0,0 = c2,0 = 1100 0101, and c1,0 = c3,0 = 0100 1100.

Converting to polynomials:

c0,0 = c2,0 = x^7 + x^6 + x^2 + 1 c1,0 = c3,0 = x^6 + x^3 + x^2

now using the Galois field to get d0,0 we will get 4 results and then XOR all of them

c0,0 * 10 = (x^7 + x^6 + x^2 + 1)*(x) mod (x^8 + x^4 + x^3 + x + 1) mod 2 = 10010001

c1,0 * 11 = (x^6 + x^3 + x^2) * (x+1) mod (x^8 + x^4 + x^3 + x + 1) mod 2 = 11100100

c2,0 * 01 = (x^7 + x^6 + x^2 + 1)*(1) mod (x^8 + x^4 + x^3 + x + 1) mod 2 = 11000101

c3,0 * 01 = (x^6 + x^3 + x^2) * (1) mod (x^8 + x^4 + x^3 + x + 1) mod 2 = 01001100

Now XOR all of those 8 bit binary values I get 11111100 but the answer should be 11001100 where am I making my mistake?

Any help is appreciated

1

There are 1 best solutions below

1
On BEST ANSWER

The second product is incorrect. There is no overflow to degree $8$ in that product, and it comes out as $$ \begin{aligned} c_{1,0}\cdot 11&=\overline{(x^6+x^3+x^2)(x+1)}\\ &=\overline{x^7+x^6+x^4+2x^3+x^2}\\ &=\overline{x^7+x^6+x^4+x^2}=11010100. \end{aligned} $$ I use overline to denote the coset of a polynomial because iterated mods give me pimples. Anyway, this differs exactly in those two bit positions your end result differs from the given answer, so I'm optimistic about it being the only error.