All monic primitive polynomials of a given degree over GF(p)
P = gf_primitive_polynomials(p, n)
Prime number: the characteristic of the field, at most 2^20.
Degree: an integer from 1 to 20, with p^n ≤ 2^20.
Matrix with one polynomial per row, each with n + 1 coefficients, constant term first. There are φ(p^n - 1)/n rows.
gf_primitive_polynomials lists every monic primitive polynomial of degree n over GF(p). Any of them can be passed to gf_create_field.
For n > 1 the rows are in the order described in gf_default_primitive_polynomial, so the first row is the default polynomial.
For n = 1 the rows are x - g for each primitive root g modulo p, in increasing order of g.
All p^n candidates are tested, so the time grows with p^n; the function is meant for small fields.
| Version | Description |
| 2.0.0 | Refactoring of the function/toolbox. |