def multiGF32( input1, input2, modP32):
    """
    multiGF32 - multiply 2 number on a Galois Field defined by a polynomial.
    Args:
        input1: first number to multiply.
        input2: second number to multiply.
        modP32: polynomial defining the Galos Field.
    Returns:
        the multiplication result.
    """
    state1 = 0x0
    for i in range(32):
        if input2&0x1:
            state1 ^= input1
        input1 <<= 1
        input2 >>= 1
        if input1&0x1_00_00_00_00:
            input1 ^= modP32
    return state1