Mix Columns

This step operates on the State column by column. Each column is treated as a vector of bytes and is multiplied by a fixed matrix to get the column for the modified State.

Figure 1. Mixing the Columns of the Current State

The operation can be described by the following equation, which are the bytes of the mixed column and are the bytes of the original column.

Figure 2. Matrix Multiplication When Mixing One Column

This step is implemented directly without any secondary function calls. From the matrix equation, one can see that every byte of the mixed column is a combination of the original bytes and their doubles. Refer to the MixColumns() function in the source code for details.

Note: XOR Addition and Finite Field Multiplication from sections Byte Addition and Byte Multiplication are used.