# Mix Column of Rjindael

In the mix column stage when multiplying the byte value by 2 the following gives the correct answer. If the MSB of the byte value is 1, then left shift the byte value by 1 bit and then XOR the resultant with 27. What is the logic behind this number 27. How was it arrived at.

The reduction polynomial for Rijndael is $x^8 + x^4 + x^3 + x + 1$, which has a byte representation of 0x11b, and after you have shifted the byte by 1 bit, the 0x100 is no longer required so 0x1b or 27 is XOR'd against the value to complete the reduction.