crypto/algorithms/pureaescipher.py
def _galoisMul(self, a, b):
        '''
        Galois multiplication of 8 bit characters a and b
        '''
        p = 0
        for counter in range(8):
            if b & 1: p ^= a
            hi_bit_set = a & 0x80
            a <<= 1
            # keep a 8 bit
            a &= 0xFF
            if hi_bit_set:
                a ^= 0x1b
            b >>= 1
        return p

        Galois multiplication of 8 bit characters a and b
        
Galois multiplication of 8 bit characters a and b
Galois multiplication of 8 bit characters a and b
def _galoisMul(self, a, b):
        p = 0
        for counter in range(8):
            if b & 1: p ^= a
            hi_bit_set = a & 0x80
            a <<= 1
            a &= 0xFF
            if hi_bit_set:
                a ^= 0x1b
            b >>= 1
        return p
def _galoisMul ( self , a , b ) : p = 0 for counter in range ( 8 ) : if b & 1 : p ^= a hi_bit_set = a & 0x80 a <<= 1 a &= 0xFF if hi_bit_set : a ^= 0x1b b >>= 1 return p
Galois multiplication of 8 bit characters a and b
Galois multiplication of 8 bit characters a and b
'''
        Galois multiplication of 8 bit characters a and b
        ''' # keep a 8 bit
self
a
b