1

enter image description here

Possible that someone could confirm that I am doing this correctly?

Answer:

The term for $x^8 + x^4 + x^3 + x + 1$ over GF(2) in binary representation is 100011011

representation of $x^8$ is 100000000

$x^8 \bmod x^8 + x^4 + x^3 + x + 1$

(100011011) mod (100000000) = 011011

representation of $x^9$ in binary is = 1000000000

so $x^9\bmod x^8 + x^4 + x^3 + x + 1$

=> (1000000000) mod (100011011) = 010101111

representation of $x^{10}$ in binary is = 10000000000

so $x^{10} \bmod x^8 + x^4 + x^3 + x + 1$

=> (10000000000) mod (100011011) = 01000011

representation of $x^{11}$ in binary is 100000000000

so $x^{11} \bmod x^8 + x^4 + x^3 + x + 1$

=> (100000000000) mod (100011011) = 010000110

representation of $x^{12}$ in binary is 1000000000000

so $x^{12} \bmod x^8 + x^4 + x^3 + x + 1$

=> (1000000000000) mod (100011011) = 0100001100

representation of $x^{13}$ in binary is 10000000000000

so $x^{13} mod x^8 + x^4 + x^3 + x + 1$

=> (10000000000000) mod (100011011) = 011111101

representation of $x^{14}$ binary is 100000000000000

so $x^{14} \bmod x^8 + x^4 + x^3 + x + 1$

=> (100000000000000) mod (100011011) = 011111101

representation of $x^{15}$ in binary is 1000000000000000

so $x^{15} mod x^8 + x^4 + x^3 + x + 1$

=> (1000000000000000) mod (100011011) = 011011111

Jyrki Lahtonen
  • 133,153
Papps
  • 75
  • 1
    The remainder of $x^8$ w.r.t. this defining polynomial is indeed $x^4+x^3+x+1$, or if you prefer, $00011011$. But $x^9=x\cdot x^8$, and multiplication by $x$ is left shift, so the remainder of $x^9$ is $x(x^4+x^3+x+1)=x^5+x^4+x^2+x$ (or $00110110$). This has degree $<8$ so no further reduction is needed. – Jyrki Lahtonen Mar 27 '21 at 21:24
  • Close to being a duplicate of this. – Jyrki Lahtonen Mar 27 '21 at 21:33
  • Frankly, I don't have a clue how you got those results. Could you show a paper & pencil calculation. That would make it easier to see what you are doing wrong. – Jyrki Lahtonen Mar 27 '21 at 21:39
  • The list should go on like (all the congruences modulo $x^8+x^4+x^3+x+1$: $$x^9\equiv x^5+x^4+x^2+x$$ $$x^{10}\equiv x^6+x^5+x^3+x^2$$ $$x^{11}\equiv x^7+x^6+x^4+x^3$$ $$x^{12}\equiv x^8+x^7+x^5+x^4\equiv x^7+x^5+x^3+x+1$$ Multiply the previous by $x$. If you get an $x^8$ term, replace it with $x^4+x^3+x+1$. Reduce coefficients of all powers modulo $2$. – Jyrki Lahtonen Mar 27 '21 at 21:42
  • All the remainders have degree $<8$ so they have eight bits (cut the leading zeros at your own peril). – Jyrki Lahtonen Mar 27 '21 at 21:44
  • I am too tired to check, so I will just state that if your 'mod' refers to a remainder operation of integers, then you are doing it all wrong. This is polynomial arithmetic, those bit strings must not be interpreted as integers (when performing calculations in $GF(2^8)$). – Jyrki Lahtonen Mar 27 '21 at 21:55
  • It may be easier to work with $GF(8)$ defined by $x^3+x+1$ and $GF(16)$ defined by $x^4+x+1$ at first. Check out these tables I prepared for referrals like this back in the day. – Jyrki Lahtonen Mar 27 '21 at 21:58
  • Thank you for the help! @JyrkiLahtonen This is what I've written down https://pasteboard.co/JUBYsDS.png – Papps Mar 27 '21 at 22:00
  • @JyrkiLahtonen convert to an answer? – kelalaka Mar 27 '21 at 22:51
  • 1
    @kelalaka I firmly think that users with 6 digit rep scores should not answer duplicate questions. This objection does not apply (in my opinion) to newer users who have not yet seen bucketloads of essentially similar questions on the site already. – Jyrki Lahtonen Mar 28 '21 at 15:26
  • @JyrkiLahtonen It is true for everybody. OPs sometimes may be asking slightly different questions or has some mistakes in their works. In these cases, a new answer is not really bad, in my opinion. Besides, if you answer the question again you will not be answering in the same way, right? Otherwise, you don't have an improvement, you just repeat yourself. – kelalaka Mar 28 '21 at 16:36

0 Answers0