I am learning how to do arithmetic with Galois Fields (GF(2^4)). In particular, I am focusing on addition and multiplication.
The addition problem we are looking at is:
Compute A(x) + B(x) mod P(x) in GF(2^4).
Let A(x) = x^2 + 1, B(x) X^3 + x^2 + 1, P(x) = x^4 + x + 1.
So we begin by adding A and B:
x^2 + 1
x^3 + x^2 + 1
= x^3
Now here is where I'm confused, the mod P(x). What's throwing me off is that the degree of P(x) is greater than the degree of (A+B). My understanding (please correct me if I'm wrong) of the purpose of the mod P(x) is to reduce the polynomial so that it "fits" into the field GF(2^4). But if the degree of P(x) is larger than the highest degree in (A+B), how do we go about doing this?
The multiplication problem we are looking at is:
Compute A(x) * B(x) mod P(x).
Let A(x) = x^2 + 1, B(x) = x^3 + x^2 + 1, P(x) = x^4 + x + 1
So we multiply the two polynomials just like we were taught back in highschool:
(x^2 + 1) (x^3 + x^2 + 1) = x^5 + x^4 + x^2 + x^3 + x^2 + 1
*I'm unsure of what happens to the x^2 + x^2 here, because we are in GF(2), does this = 0?
Assuming that the two x^2's result in 0, the result is:
x^5 + x^4 + x^3 + 1 MOD x^4 + x + 1
If anyone could walk through the modular reduction of polynomials for me that would be much appreciated, I am not confident in my ability to do this just yet...
My attempt:
x^5 + x^4 + x^3 + 1 MOD x^4 + x + 1 = x^3 + x^2
MOD x^4+x+1
many times. That's why algebraists give a name to the residues class of $x$. I call it $\gamma$ in my answer. – Jyrki Lahtonen Oct 10 '15 at 17:17