# multiplicative inverse from irreducible polynomial

Would you please explain how to compute multiplicative inverse from irreducible polynomial like x^4 x 1? Even if you can help me what to study to understand this conversion, that will be a great help.

edit retag close merge delete

( 2021-07-05 19:20:12 +0200 )edit

Not completely clear to me what you are asking.

( 2021-07-05 19:20:16 +0200 )edit

Sort by » oldest newest most voted

If you ask about computing multiplicative inverse modulo an irreducible polynomial, then this can be done by defining a corresponding quotient ring. For example, the following code inverts $x+1$ modulo $x^4+x+1$ over the field $GF(2)$:

R.<x> = PolynomialRing(GF(2))
K.<a> = R.quotient_ring(x^4+x+1)
print( (a+1)^(-1) )

Here a stands for a zero of $x^4+x+1$, which also may be thought of as the image of $x$ in the quotient ring.

more