indeterminate over Galois field with matlab

70 Views Asked by At

If we have a Galois field $GF(2^3)$ for example, and I want to generate 12 indeterminate variables over this field $\alpha_1,\alpha_2,\alpha_3,\cdots,\alpha_{12}$ in Matlab, such that the addition and multiplication of this indeterminate is the same as the addition and multiplication of tow element in $GF(2^3)$.example if $GF(2)$ and $\alpha_1 \in GF(2)$ then $\alpha_1+\alpha_1=0$,

thanks. enter image description here

1

There are 1 best solutions below

1
On

There is a built-in function for $\mathbf{F}_{2^k}$. But we can create $\mathbf{F}_{p^k}$ from scratch once we know an irreducible polynomial of degree $k$.

Example : as $x^2+x+1$ is irreducible over $\mathbf{F}_2$ we find $$\mathbf{F}_{2^2} = \mathbf{F}_2[x]/(x^2+x+1) = \mathbf{F}_2[M], \qquad M ={\scriptstyle \begin{pmatrix} 0 & -1 \\ 1 & -1\end{pmatrix}}$$ the companion matrix of the polynomial.

Thus $$\mathbf{F}_{2^2} = \{ a I + b M \bmod 2 \ | \ (a,b) \in \mathbb{Z}/2\mathbb{Z}\}$$ and to compute the $n$-th power of an element in matlab we'll write mod((a*M^0+b*M)^n,2)