# multiplicative inverse in galois field $2^8$

I am trying to compute the multiplicative inverse in galois field $2^8$.The question is to find the multiplicative inverse of the polynomial $x^5+x^4+x^3$ in galois field $2^8$ with the irreducible polynomial $x^8+x^4+x^3+x+1$. To get it I used the Extended Euclidean division but with operations used in galois field $2^8$ My answer is $x^7+x^6+x^5+x^4+x$ while the other answer is $x^6+x^4+x^2+x+1$. I am not sure if this answer is right so i need to make sure. If my answer is not right can someone please show me the details of getting to the solution. Thank you

Set $g(x)=x^8+x^4+x^3+x+1$ , $p(x)= x^5+x^4+x^3$.

Applying Euclidean algorithm,

$g(x)=p(x)(x^3+x^2+1) + (x+1)$,

$p(x)=(x^4+x^2+x+1)(x+1)+1$.

Therefore, $1=p(x) + (x^4+x^2+x+1)(x+1) = p(x) + (x^4+x^2+x+1)[g(x) + p(x)(x^3+x^2+1)] = [(x^4+x^2+x+1)(x^3+x^2+1)+1]p(x) + (x^4+x^2+x+1)g(x)$

Setting $q(x) = (x^4+x^2+x+1)(x^3+x^2+1)+1$ (please expand yourself), $p(x)q(x) = 1 \text{mod} g(x)$. So $q(x)$ is the inverse of $p(x)$.

Maybe there are some errors in my calculations because I didn't do double-check, but I'm sure of the process.

Sorry for bad editing. I'm a newbie to this site.

To check the answer, multiply the result polynomial to p(x) and divide by g(x). The answer must be 1.