# I calculated multiplicative inverses of my polynomial in AES using the EEA. How do I find the multiplicative inverses using Fermat's Little Theorem? [duplicate]

How do we find multiplicative inverses using Fermat's Little Theorem? I have the basic understanding of how we compute inverses of numbers, but can someone help with calculating inverses of polynomials in $$GF(2^8)$$

• I know it won't be as effective as the EEA, but I just want to show in my report that there are two methods we can calculate multiplicative inverses for S-box in AES. And as for your question, the only thing I really know is the theorem itself and how it can be applied to numbers to find their inverses. However, I have no idea how I would go about calculating inverses of polynomials using this method – user66581 Mar 11 '19 at 22:18
• I actually read that, it doesn't specify how I would go about calculating inverses for polynomials. – user66581 Mar 11 '19 at 22:24
• Fermat's little theorem is that $a^p = a$ in $\operatorname{GF}(p)$ for prime $p$, or equivalently $F(a) = a$ where $F(a) = a^p$ is the Frobenius map. Obviously $F$ is not the identity on $\operatorname{GF}(p^k)$ for $k > 1$, but is there another relation involving $F$ that you could think of as an extension of Fermat's little theorem to finite field extensions? – Squeamish Ossifrage Mar 11 '19 at 22:33
• A concise explanation is the second bullet there. – fgrieu Mar 12 '19 at 6:04