# Inverse MixColumns Operation of AES

I am aware that MixColumns is a mixing operation which operates on the columns of the state, combining the four bytes in each column. So we multiply our state with the special matrix. To multiply, we’re computing many dot products. And for each dot product, we’re multiplying bytes as Galois fields $$\pmod 2$$, then reducing the answers $$\bmod$$ the magic polynomial: $$x^8+x^4+x^3+x^1+x^0$$.

Thankfully, the entire task can be greatly sped up by using a few look-up tables. The multiplication matrix consists of Galois fields for $$1,2,3$$. So we can pre-compute the results of all 256 eight-bit Galois fields (the possible bytes in our state) multiplied by these values.

How will I implement the inverse MixColumns for decryption process?

• Hint: to undo multiplication by a matrix, multiply by the inverse of the matrix. – fgrieu Sep 25 '18 at 8:25
• Please don't cross site question stackoverflow.com/questions/52491440/… – kelalaka Sep 25 '18 at 17:15

MixColumns implements a matrix multiplication, so InvMixColumns is the multiplication by the inverse of that matrix. Thus, it boils down to computing the inverse of the matrix. It can be tedious to do by hand, but it involves only straightforward computations. Alternatively, look up the AES standard itself (FIPS 197): the inverse matrix is spelled out explicitly in section 5.3.3.
$$InverseMix Column = \begin{bmatrix} 0E & 0B & 0D & 09\\ 09 & 0E & 0B & 0D\\ 0D & 09 & 0E & 0B\\ 0B & 0D & 09 & 0E\\ \end{bmatrix}$$