2

I'm given the problem of computing $x^n$ using multiply-and-square, ie finding $x^1$, $x^2$, $x^4$, etc.

I'm given an irreducible polynomial in $Z_2[x]$, $x^4 + x + 1$. I'm trying to understand if I'm doing this right. To start (and help me out), I've generated a list of 16 elements that comprise the field - $0$, $1$, $x$, $x + 1$, $x^2$, ..., $x^3 + x^2 + x$, $x^3 + x^2 + x + 1$.

The first couple of squares exist in the field, so no work is to be done. The first problem I hit is $x^4$. Here is my work so far:

$x^4 = x^4\ mod\ x^4+x + 1 = 1 * (x^4 + x + 1) - x - 1$.

From what I understand, the $1 * (x^4 + x + 1)$ part will cancel and I'm left with $-x - 1$. However, $-x - 1$ is not in my list of elements. From my understanding, I take each coefficient and $mod\ 2$, since we are in $Z_2$? Suppose we are in $Z_3$ - would I take $mod\ 3$?

If I take $mod\ 2$, I get $x + 1$, which is in my list of elements.

Take the next one as well, $x^8$ (assuming $x^4 = x + 1$).

$x^8 = x^4 * x^4 = (x+1) * (x + 1) = x^2 + 2x + 1 = x^2 + 1$

Am I going about this right? I'm wondering how I can tell what modulo to take the coefficients with, and what modulo to take the exponents with pretty much. thank you

Some Guy
  • 121
  • 2
    Yes, $-x-1$ is $1x+1$, since $1+1=0$, or $1=-1$ in $\mathbb{Z}_2$. In $\mathbb{Z}_3$ you would have $-x-1$ equals $2x+2$. –  Feb 25 '20 at 21:25
  • Yes. You are doing it correctly. You can check your answers with the middle part of this old answer I prepared with referrals like this in mind. I wrote the elements in terms of $\gamma$, which you may think of as the coset of $x$ modulo $x^4+x+1$ in $\Bbb{Z}_2[x]/(x^4+x+1)$. – Jyrki Lahtonen Feb 26 '20 at 10:02

0 Answers0