# Find the inverse of $\alpha^{38}$ in $\mathbb F = \mathbb Z_2[x]/\left<x^4+x+1\right>$

Let $\alpha$ be a root of $x^4+x+1$ and we are given some powers of $\alpha$ as linear combinations of $1,\alpha,\alpha^2$ and $\alpha^3$

$\alpha^4=\alpha+1$
$\alpha^5=\alpha^2+\alpha$
... (the rest are omitted - all the way up to) ...
$\alpha^{14}=\alpha^3+1$
$\alpha^{15}=1$

Now we are asked to find $(\alpha^{38})^{-1}$ in $\mathbb F$

$\alpha^{38} \equiv \alpha^8$ in $\mathbb Z_2[x]$ I think? and $\alpha^8$ happens to be $\alpha^2+1$

and an Inverse of an element $g$ in $\mathbb Z_2[x]$ means to find $g^{-1}$ such that ($g\times g^{-1}) \equiv 1$ in $\mathbb Z_2[x]$ right?

So am I correct in that what we need to find is the inverse of $\alpha^2+1$ such that $(\alpha^2+1)(\alpha^2+1)^{-1} \equiv 1$ in $\mathbb Z_2[x]$? And also, how do you do that?

-

You've got $\Bbb F=\Bbb F_{16}$ and $\alpha$ is visibly a generator of the multiplicative group of order $15$. So $\alpha^{-38}=\alpha^{(-38)\bmod15}=\alpha^7$ which equals $1+\alpha+\alpha^3$.
solve for $(pa^3+qa^2+ra+w)(a^2+1)=1$
$a^4+a^2+a^2+1=a$ thus, $a^2+1=a(a^2+1)^{-1}$ therefore $(a^2+a)^{-1}=a^{-1}(a^2+1)=(a^3+1)(a^2+1)$