Communications Toolbox    

List of All Elements of a Galois Field

Some Galois field functions in this toolbox require an argument that lists all elements of an extension field GF(pm). This is again relative to a particular primitive element A of GF(pm). The proper format for the list of elements is that of a matrix having pm rows, one for each element of the field. The matrix has m columns, one for each coefficient of a power of A in the polynomial format shown in Polynomial Format above. The first row contains only zeros because it corresponds to the zero element in GF(pm). If k is between 2 and pm, then the kth row specifies the polynomial format of the element Ak-2.

The minimal polynomial of A aids in the computation of this matrix, because it tells how to express Am in terms of lower powers of A. For example, the table below lists the elements of GF(32), where A is a root of the primitive polynomial 2 + 2x + x2. This polynomial allows repeated use of the substitution

when performing the computations in the middle column of the table.

Elements of GF(9) 
Exponential Format
Polynomial Format
Row of MATLAB Matrix of Elements
A-Inf
0
0 0
A0
1
1 0
A1
A
0 1
A2
1+A
1 1
A3
A + A2 = A + 1 + A = 1 + 2A
1 2
A4
A + 2A2 = A + 2 + 2A = 2
2 0
A5
2A
0 2
A6
2A2 = 2 + 2A
2 2
A7
2A + 2A2 = 2A + 2 + 2A = 2 + A
2 1

Example

An automatic way to generate the matrix whose rows are in the third column of the table above is to use the code below.

The gftuple function is discussed in more detail in Converting and Simplifying Element Formats.


  Polynomial Format Nonuniqueness of Representations