0

Is there an efficient method for finding primitive polynomials, especially for larger fields like $GF(2^{64})$ or larger?

For $GF(2^n)$, XOR and carryless multiply can be used for polynomial math which is reasonably fast, but this won't work for $GF(p^n), p \ne 2$. I don't know if there is any demand for $GF(p^n), p \ne 2$.

What I've have done in the past. Using $GF(2^{64})$ as an example, try all 37820 combinations of $x^{64} + x^a + x^b + x^c + 1$. For each polynomial, check that $x^{64-1} = 1$ and $x^p \ne 1$, for $p = 7C6$ product sums of the 7 prime factors of $x^{64}-1 = \{3,5,17,257,641,65537,6700417\}$ taken 6 at a time. Using carryless multiply, (on X86, PCLMULQDQ), this was fairly quick, finding 696 polynomials in less than 0.2 seconds.

Extended math would be needed for a larger field.

I had also considered $GF(p^n), p \ne 2$, but not looking at that for now. All of the primitive tables I've seen are for $GF(2^n)$.

rcgldr
  • 764
  • Comments have been moved to chat; please do not continue the discussion here. Before posting a comment below this one, please review the purposes of comments. Comments that do not request clarification or suggest improvements usually belong as an answer, on [meta], or in [chat]. Comments continuing discussion may be removed. – Shaun Feb 02 '25 at 13:25

1 Answers1

1

I'm not sure exactly what you're asking, but here is an algorithm to produce all primitive polynomials of degree $n$ over $\mathbb{F}_q$.

If you have one multiplicative generator for an extension (i.e. one primitive element $a$), then you can take all appropriate powers ($a^k$ for $(k, q^n-1)=1$ for a degree $n$ extension). To get the corresponding primitive polynomials, you can do some linear algebra to find the minimal polynomials of the $a^k$. There will be repeats unless you take single representatives from the orbits of the action of the Galois group (i.e. all roots of a given primitive polynomials have the same minimal polynomial).

To get the initial primitive element $a$, one can proceed randomly: pick an element, compute its minimal polynomial, and check that it has the appropriate degree.

yoyo
  • 10,575
  • For this question, the polynomials are primitive, so the initial primitive element = $x$. – rcgldr Jan 30 '25 at 23:10
  • The main exception is isomorphic mapping where the field to map has pre-determined parameters, so a search for a compatible generator in the source field is done. – rcgldr Jan 30 '25 at 23:22
  • 1
    If you are not sure what the OP is requesting, a comment is better than an answer - a comment which requests for clarification. – Martin Brandenburg Jan 30 '25 at 23:27