I don't know much about Galois fields. My question is the following Assume we are working with GF(8). Let say for example I want to multiply 2 by 4 in GF(8).
Then it should be equal to $2*4 \text{ mod 8}=0$, is this correct?
I don't know much about Galois fields. My question is the following Assume we are working with GF(8). Let say for example I want to multiply 2 by 4 in GF(8).
Then it should be equal to $2*4 \text{ mod 8}=0$, is this correct?
I guess you are possibly making the common mistake assuming the Galois fields $\operatorname{GF}(n)$ are the quotient rings $\mathbf{Z}/n\mathbf{Z}$, they aren't! (There are several questions on this site you can find explaining what they actually are in more detail).
In fact the Galois field $\operatorname{GF}(8)$ can be explicitly constructed as $$ (\mathbf{Z}/2\mathbf{Z})[T]/(T^3 + T + 1). $$ Here $2 = 1 + 1 =0$ and so $4 = 1 + 1 + 1 +1 = 0$ too and so their product is also $0$.
2
should denote. However, as Jyrki Lahtonen correctly points out in the comments to the question, many people (in computer science especially) use 2
to to denote the class of $T$ (and 4
to denote the class of $T^2$) in $GF(8)$. This is probably what user63050 meant, and it is the cause of much confusion. Another thing, of course, is that the irreductible polynomial is not unique, and multiplication in $GF(8)$ can only be computed if we know which one was chosen.
– Gro-Tsen
Jul 24 '14 at 16:19
GF(8), the field with 8 elements is definitely not $\mathbb{Z}_8$. One way to realize GF(8) is as $\mathbb{Z}_2[\alpha]$ where $\alpha$ satisfies the relation $\alpha^3=\alpha+1$ (all arithmetic is done mod 2. Equivalently GF(8) may be thought of as $\mathbb{Z}_2[x]/<x^3+x+1>$ (quotient ring). In the first realization we would have GF(8)$=\{p+q\alpha+r\alpha^2\mid p,q,r\in\mathbb{Z}_2\}$.
Then for instance we would have $(1+\alpha)(1+\alpha+\alpha^2)=1+\alpha+\alpha^2+\alpha+\alpha^2+\alpha^3=1+\alpha^3=1+1+\alpha=\alpha$. [In this calculation, $\alpha+\alpha=0$ because our coefficients are in $\mathbb{Z}_2$; and also $\alpha^3$ may be replaced by $\alpha+1$.
Most typically we have $GF(8)=\Bbb{F}_2[x]/\langle x^3+x+1\rangle$, and we use shorthand notation $q(2)$ for the element $q(x)+\langle x^3+x+1\rangle$. For that to work we first interpret the coefficients of $q$ from $\Bbb{F}_2=\{\overline{0},\overline{1}\}$ as integers $0,1$, and then we can evaluate $q(2)$ as an integer.
Let us denote $\alpha=x+\langle x^3+x+1\rangle$. Then the above identifications lead to $"2"=\alpha$ (with $q(x)=x$ we have $q(2)=2$) and $"4"=\alpha^2$ (coming from $q(x)=x^2$). Because $\alpha^3+\alpha+1=0$ we get that in $GF(8)$ $$ "4"\cdot"2"=\alpha^2\cdot\alpha=\alpha^3=\alpha^3+^(\alpha^3+\alpha+1)=\alpha+1="2+1"="3", $$ because $\alpha^3+\alpha^3=2\alpha^3=0$, as the polynomial $2x^3$ is the zero polynomial in $\Bbb{F}_2[x]$. In that ring the coefficients are reduced modulo two.
The full list of elements of $GF(8)$ is thus $$ \begin{aligned} "0"&=0\\ "1"&=1\\ "2"&=\alpha\\ "3"&=1+\alpha\\ "4"&=\alpha^2\\ "5"&=1+\alpha^2\\ "6"&=\alpha+\alpha^2\\ "7"&=1+\alpha+\alpha^2 \end{aligned} $$
TL;DR; with educated guessing in place in $GF(8)$ we have $$4\cdot2=3.$$
You can interprete that as a multiplication in the prime field $\mathbb{Z}/2\mathbb{Z}$, via the canonic monomorphism $\mathbb{Z}/2\mathbb{Z} \rightarrow \operatorname{GF}(8)$, so you're actually calculating modulo 2. Already $4$, $2$ and $0$ denote the same element in GF(8) in the mentioned way.
Maybe I should explain this a little more detailed.
We define $f: \mathbb{Z} \rightarrow \operatorname{GF}(8)$ as the ring homomorphism which sends the $1$ in $\mathbb{Z}$ to the $1$ in $\operatorname{GF}(8)$. Regard the characteristic of the Galois Field $\operatorname{GF}(8)$ now.
It is $\operatorname{Char} \operatorname{GF}(8) = 2$, such that f has the Kernel $2\mathbb{Z}$ and hence with the homomorphism theorem we know that $\operatorname{im} f \cong \mathbb{Z}/2\mathbb{Z}$ is our prime field.
That means $4$, $2$ and $0$ identify the same element in GF(8) through the homomorphism f and therefore all are $0$.