# How does one implement the Inverse of AES' MixColumns

what will I do?

Because it said that I will used this:

During decryption the Mix Column the multiplication matrix is changed to:

0E 0B 0D 09
09 0E 0B 0D
0D 09 0E 0B
0B 0D 09 0E


How does one implement this maxtrix multiplication?

It's pretty much the same as the forward Mix Column direction; it's a series of multiplications in $GF(2^8)$, however, instead of multiplying by 1, 2 and 3, you're multiplying by 9, 11, 13 and 14.

The multiplication rule isn't that complex; however, it is a bit fancier than the quick rule we got for $\times 2$ and $\times 3$. If you're happy with doing a table lookup, this wikipedia page gives tables of values for $x\times 9$, $x\times 11$, $x \times 13$ and $x \times 14$.

Another way to approach it is to take the rule you already know for $x \times 2$, and use it several times, as in:

$x \times 9 = (((x \times 2) \times 2) \times 2) + x$

$x \times 11 = ((((x \times 2) \times 2) + x) \times 2) + x$

$x \times 13 = ((((x \times 2) + x) \times 2) \times 2) + x$

$x \times 14 = ((((x \times 2) + x) \times 2) + x) \times 2$

(where $+$ is addition in $GF(2^8)$; you know it better as "exclusive-or")

Further explination would require me to get into the technicalities of what multiplication in a finite field actually is; I'm not sure you're quite ready for that; if you think you might be, you might want to start in on this article.

• Thanks. It was very helpful. I have used the 2nd approach as I had implemented the multiplication by 2 and 3. – Maruf Hasan Bulbul Apr 3 '19 at 8:27

For the MixColumn matrix $$M$$, it is true that $$M^4 = I$$. So, by performing this transformation trice you get its inverse ($$M^3 = M^{-1}$$). A little crazy, but it might be practical in certain situations.

• It would be very constructive if you convert the As I remember into a real knowledge with a reference or calculation. Also, you can give and compare the number of operation required to calculate the inverse and 3rd power. – kelalaka Mar 17 '19 at 14:34