code: def gf_poly_mul_simple(p, q): # simple equivalent way of multiplying two polynomials without precomputation, but thus it's slower
      '''Multiply two polynomials, inside Galois Field'''
      # Pre-allocate the result array
      r = bytearray(len(p) + len(q) - 1)
      # Compute the polynomial multiplication (just like the outer product of two vectors, we multiply each coefficients of p with all coefficients of q)
      for j in xrange(len(q)):
          for i in xrange(len(p)):
              r[i + j] ^= gf_mul(p[i], q[j]) # equivalent to: r[i + j] = gf_add(r[i+j], gf_mul(p[i], q[j])) -- you can see it's your usual polynomial multiplication
      return f gf_poly_mul_simple(p, q): # simple equivalent way of multiplying two polynomials without precomputation, but thus it's slower
      '''Multiply two polynomials, inside Galois Field'''
      # Pre-allocate the result array
      r = bytearray(len(p) + len(q) - 1)
      # Compute the polynomial multiplication (just like the outer product of two vectors, we multiply each coefficients of p with all coefficients of q)
      for j in xrange(len(q)):
          for i in xrange(len(p)):
              r[i + j] ^= gf_mul(p[i], q[j]) # equivalent to: r[i + j] = gf_add(r[i+j], gf_mul(p[i], q[j])) -- you can see it's your usual polynomial multiplication
      return r
docs: Multiply two polynomials, inside Galois Field