'MixColumns step. Mixes the values in each column'

def mix_columns(self, block):

    mul_by_2 = gf_mul_by_2
    mul_by_3 = gf_mul_by_3
    for i in xrange(4):
        col = (i * 4)
        (v0, v1, v2, v3) = (block[col], block[(col + 1)], block[(col + 2)], block[(col + 3)])
        block[col] = (((mul_by_2[v0] ^ v3) ^ v2) ^ mul_by_3[v1])
        block[(col + 1)] = (((mul_by_2[v1] ^ v0) ^ v3) ^ mul_by_3[v2])
        block[(col + 2)] = (((mul_by_2[v2] ^ v1) ^ v0) ^ mul_by_3[v3])
        block[(col + 3)] = (((mul_by_2[v3] ^ v2) ^ v1) ^ mul_by_3[v0])
