Constant galois_2p8::field::PRIMITIVES
source · pub const PRIMITIVES: [IrreducablePolynomial; 16];
Expand description
Contains the primitive polynomials of GF(2^8)
.
In GF(2^x)
wherein arithmetic operations are performed modulo a
polynomial, the polynomial is said to be primitive if for some alpha,
each nonzero member value of the field can be uniquely represented by
alpha ^ p
for p < 2^x
, where alpha is a root of the polynomial. That
is, for some root of the polynomial, every member of the field can
be represented as the exponentiation of said root.
In GF(2^x)
, the only nontrivial prime root of any given
IrreducablePolynomial
is two. We say “is primitive” as a shorthand
for meaning that the IrreducablePolynomial
is primitive assuming
a root of two.
The use of primitive polynomials confers an immediate performance benefit for single values: we can represent multiplication and division as addition and subtraction within logarithms and exponents. Additionally, some usages of Galois fields, e.g. Reed-Solomon syndrome coding, require primitive polynomials to function properly.
This table is used by the is_primitive
method. Specifically,
PRIMITIVES.binary_search(&poly).is_ok() == poly.is_primitive()