galois.conway_poly

galois.conway_poly(characteristic: int, degree: int) Poly

Returns the Conway polynomial \(C_{p,m}(x)\) over \(\mathrm{GF}(p)\) with degree \(m\).

Parameters
characteristic

The prime characteristic \(p\) of the field \(\mathrm{GF}(p)\) that the polynomial is over.

degree

The degree \(m\) of the Conway polynomial.

Returns

The degree-\(m\) Conway polynomial \(C_{p,m}(x)\) over \(\mathrm{GF}(p)\).

Raises

LookupError – If the Conway polynomial \(C_{p,m}(x)\) is not found in Frank Luebeck’s database.

Notes

A Conway polynomial is an irreducible and primitive polynomial over \(\mathrm{GF}(p)\) that provides a standard representation of \(\mathrm{GF}(p^m)\) as a splitting field of \(C_{p,m}(x)\). Conway polynomials provide compatability between fields and their subfields and, hence, are the common way to represent extension fields.

The Conway polynomial \(C_{p,m}(x)\) is defined as the lexicographically-minimal monic primitive polynomial of degree \(m\) over \(\mathrm{GF}(p)\) that is compatible with all \(C_{p,n}(x)\) for \(n\) dividing \(m\).

This function uses Frank Luebeck’s Conway polynomial database for fast lookup, not construction.

Examples

Notice primitive_poly() returns the lexicographically-minimal primitive polynomial but conway_poly() returns the lexicographically-minimal primitive polynomial that is consistent with smaller Conway polynomials.

This is sometimes the same polynomial.

In [1]: galois.primitive_poly(2, 4)
Out[1]: Poly(x^4 + x + 1, GF(2))

In [2]: galois.conway_poly(2, 4)
Out[2]: Poly(x^4 + x + 1, GF(2))

However, it is not always.

In [3]: galois.primitive_poly(7, 10)
Out[3]: Poly(x^10 + 5x^2 + x + 5, GF(7))

In [4]: galois.conway_poly(7, 10)
Out[4]: Poly(x^10 + x^6 + x^5 + 4x^4 + x^3 + 2x^2 + 3x + 3, GF(7))

Last update: May 18, 2022