We have a Galois field GF (2 409 ) , and an irreducible polynomial over a field:
f (x) = x 409 + x 15 + x 6 + x + 1
// Coefficients with powers of only 0 or 1
Let me have some polynomial a (x) in this field. Question: How can I find the inverse of "a (x)", relative to f (x) element, using the Euclidean algorithm , and not raising the element "a (x)" to the power of 2,409 -2.
// I search the inverse element search algorithm in Python using a polynomial basis, and exponentiation on it works too long // Problems arise when introducing a division operation on polynomials
GF.invertin sympy - jfs2**409should not take a considerable amount of time). You can see how sympy implements gf_gcd (for education, I don’t think this is a particularly effective option). "Coefficients with powers of only 0 or 1" hints that polynomials can be effectively represented by integers. - jfs