1
$\begingroup$

In the encryption of MixColumn you use the constants 01, 02 and 03. I don't understand why the inverse of 01 becomes both 0D and 09. I also don't understand how you get 01, 02 and 03 in the first place which is probably why the decryption doesn't make sense to me. I would appreciate any help with understanding how to calculate these values.

$\endgroup$
2
  • $\begingroup$ Note that the elements of the inverse matrix are not the inverses of the individual elements; hence 0D and 09 are not "inverses" of 01 $\endgroup$
    – poncho
    Commented Dec 10, 2018 at 19:35
  • $\begingroup$ and, you calculate the inverse of the matrix in $GF(2^8)$ see How to invert matrix in finite field $\endgroup$
    – kelalaka
    Commented Dec 10, 2018 at 19:36

1 Answer 1

2
$\begingroup$

The MixColumns $MC$ and InvMixColumns $IMC$ implement matrix multiplications. These two matrices defined over Galois Field $GF(2^8)$ and they are inverse of each other.

$$MC \times IMC = I_4$$

To find the inverse, one can use the Gaussian Elimination method. But finding the inverse a bit tricky, since you will need the inverse of the pivot elements. The inverse in $GF(2^8)$ can be found by using the Extended Euclidean Algorithm.

In general, instead of calculating the inverse, the invMixColumn matrix copied from FIPS 197 or AES submission of Rijndael.

$\endgroup$

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.