0

I'm trying to use the square and multiply algorithm to compute:

x^11 mod x^4+x+1 in Z2[x], ie. in the Galois Field 2^4, GF(16)

I believe all that I need to do is divide x^4+x+1 into x^11, and the remainder will be my answer but as I work through the division I'm getting:

-x^2 + x^5 

I don't know how to do all the math notation here to make it look really nice, but I'll do my best to illustrate my division:

             x^8-x^5
             ------------
 x^4 + x + 1 |x^11
             -x^11 -x^9-x^8
             ----------------
                   -x^9-x^8
                   +x^9+x^6+x^5
             -------------------
                       -x^2+x^5

I'm stuck here, as I can't reduce x^4 into x^2 but I still need to reduce x^5 down at least one more degree so it fits in the field (2^4). Did I make an arithmetic error somewhere or am I way off with my understanding of the square and multiply method and Galois Fields?

  • $-x^8+x^6\neq x^2$. In other words, at this point your remainder should be $x^8+x^6+x^5$. – Jyrki Lahtonen Oct 13 '15 at 05:04
  • Square-and-multiply might begin as follows: $$x\equiv x\pmod{x^4+x+1},$$ $$x^2\equiv x^2\pmod{x^4+x+1},$$ $$x^4\equiv x^4+(x^4+x+1)=x+1\pmod{x^4+x+1}.$$ Squaring this gives $$x^8=(x^4)^2\equiv(x+1)^2=x^2+1\pmod{x^4+x+1},$$ multipying by $x^2$ then gives $$x^{10}=x^8\cdot x^2\equiv (x^2+1)x^2=x^4+x^2\equiv x^2+x+1\pmod{x^4+x+1}.$$ You still need to multiply by $x$ to get $x^{11}$. – Jyrki Lahtonen Oct 13 '15 at 05:08
  • And you can check your answer from the table in the second from the bottom section. I denote the coset of $x$ modulo $x^4+x+1$ by $\gamma$ so that I don't need to write all those mods. – Jyrki Lahtonen Oct 13 '15 at 05:12
  • @JyrkiLahtonen Very nicely explained, thank you. I do have a question though, it is not clear to me how you got x^4 = x+1. – Talen Kylon Oct 13 '15 at 16:46
  • @TalenKylon I believe Jyrki may have intended to write it like this: $$x^4\equiv x^4-(x^4+x+1)=x+1\pmod{x^4+x+1}.$$ Subtracting $(x^4+x+1)$ instead of adding it would cancel out the $x^4$ and leave you with $x+1$ – Levitikon Aug 04 '18 at 15:10

0 Answers0