crypto/algorithms/pureaescipher.py
def _mixColumn(self, column, isInv):
        '''
        galois multiplication of 1 column of the 4x4 matrix
        '''
        if isInv: mult = [14, 9, 13, 11]
        else: mult = [2, 1, 1, 3]
        cpy = list(column)
        g = self._galoisMul

        column[0] = g(cpy[0], mult[0]) ^ g(cpy[3], mult[1]) ^ g(cpy[2], mult[2]) ^ g(cpy[1], mult[3])
        column[1] = g(cpy[1], mult[0]) ^ g(cpy[0], mult[1]) ^ g(cpy[3], mult[2]) ^ g(cpy[2], mult[3])
        column[2] = g(cpy[2], mult[0]) ^ g(cpy[1], mult[1]) ^ g(cpy[0], mult[2]) ^ g(cpy[3], mult[3])
        column[3] = g(cpy[3], mult[0]) ^ g(cpy[2], mult[1]) ^ g(cpy[1], mult[2]) ^ g(cpy[0], mult[3])
        return column

        galois multiplication of 1 column of the 4x4 matrix
        
galois multiplication of 1 column of the 4x4 matrix
galois multiplication of 1 column of the 4x4 matrix
def _mixColumn(self, column, isInv):
        if isInv: mult = [14, 9, 13, 11]
        else: mult = [2, 1, 1, 3]
        cpy = list(column)
        g = self._galoisMul
        column[0] = g(cpy[0], mult[0]) ^ g(cpy[3], mult[1]) ^ g(cpy[2], mult[2]) ^ g(cpy[1], mult[3])
        column[1] = g(cpy[1], mult[0]) ^ g(cpy[0], mult[1]) ^ g(cpy[3], mult[2]) ^ g(cpy[2], mult[3])
        column[2] = g(cpy[2], mult[0]) ^ g(cpy[1], mult[1]) ^ g(cpy[0], mult[2]) ^ g(cpy[3], mult[3])
        column[3] = g(cpy[3], mult[0]) ^ g(cpy[2], mult[1]) ^ g(cpy[1], mult[2]) ^ g(cpy[0], mult[3])
        return column
def _mixColumn ( self , column , isInv ) : if isInv : mult = [ 14 , 9 , 13 , 11 ] else : mult = [ 2 , 1 , 1 , 3 ] cpy = list ( column ) g = self . _galoisMul column [ 0 ] = g ( cpy [ 0 ] , mult [ 0 ] ) ^ g ( cpy [ 3 ] , mult [ 1 ] ) ^ g ( cpy [ 2 ] , mult [ 2 ] ) ^ g ( cpy [ 1 ] , mult [ 3 ] ) column [ 1 ] = g ( cpy [ 1 ] , mult [ 0 ] ) ^ g ( cpy [ 0 ] , mult [ 1 ] ) ^ g ( cpy [ 3 ] , mult [ 2 ] ) ^ g ( cpy [ 2 ] , mult [ 3 ] ) column [ 2 ] = g ( cpy [ 2 ] , mult [ 0 ] ) ^ g ( cpy [ 1 ] , mult [ 1 ] ) ^ g ( cpy [ 0 ] , mult [ 2 ] ) ^ g ( cpy [ 3 ] , mult [ 3 ] ) column [ 3 ] = g ( cpy [ 3 ] , mult [ 0 ] ) ^ g ( cpy [ 2 ] , mult [ 1 ] ) ^ g ( cpy [ 1 ] , mult [ 2 ] ) ^ g ( cpy [ 0 ] , mult [ 3 ] ) return column
galois multiplication of 1 column of the 4x4 matrix
galois multiplication of 1 column of the 4x4 matrix
'''
        galois multiplication of 1 column of the 4x4 matrix
        '''
self
column
isInv