betaFeedback

WorksComputer Science

Deterministic Polynomial-Time Factorization over Finite Fields

Abstract

Using prime-field factorization and a Dedekind zeta zero-free theorem, we obtain deterministic polynomial-time algorithms for complete factorization over finite fields and for constructing their presentations from their orders.

Introduction

Let pp be a prime, let m≥1m \ge1, and put q=pmq = p^m. Write Fq\mathbb{F}_q for a field of order qq and Fp\mathbb{F}_p for its prime field. Factoring a nonzero polynomial in the indeterminate XX over Fq\mathbb{F}_q means finding its leading coefficient and its distinct monic irreducible factors with their multiplicities. The deterministic complexity problem asks for a single algorithm whose number of bit operations is polynomial in the degree and log⁡2q\log_2 q, as both vary. Even a polynomial known to split into distinct linear factors poses the problem of finding its roots without testing all field elements.

Berlekamp’s 1967 algorithm [1] distinguishes irreducible factors by linear algebra in the quotient by the input polynomial. For a square-free input gg, the quotient Fq[X]/(g)\mathbb{F}_q[X]/(g) is a product of fields, one for each irreducible factor. The elements fixed by z↦zqz \mapsto z^q have coordinates in Fq\mathbb{F}_q. A fixed element whose coordinates differ separates the factors by greatest common divisors. Enumerating the possible coordinate values costs up to qq trials. In 1970 [2 Sections 3–7], Berlekamp reduced factorization over extension fields to root finding over the prime field, using trace and norm constructions to reach split polynomials. He identified deterministic root finding over large prime fields as the remaining difficulty.

Cantor and Zassenhaus [3] used random choices to split products of irreducibles of equal degree. This gives complete factorization in expected polynomial time. In the deterministic setting, Shoup [12] obtained a bound with a square-root dependence on the characteristic, up to smaller factors, and Evdokimov [5] obtained quasipolynomial time under the generalized Riemann hypothesis. A separate problem is to construct the field in which the coefficients are represented. Shoup [11 Theorem 3.1] reduced construction of irreducible polynomials to prime-field factorization, and Lenstra [6 Sections 2 and 7–9] developed deterministic constructions and isomorphisms for explicitly represented finite fields.

OpenAI’s prime-field preprint [8] separates the algebraic algorithm from the task of finding auxiliary primes. Its Theorem 1.2 gives a deterministic algorithm with a cost polynomial in the input length and the values of the auxiliary primes. Its Theorem 1.1 obtains a uniform polynomial bound by invoking a Hecke zero-free theorem. Curetón and Thorner [4 Theorem 1.1] give a fixed zero-free half-plane for Dedekind zeta functions of arbitrary number fields.

Shunia [13 Lemma 4.2] uses this theorem and a weighted difference of prime-ideal sums to find auxiliary primes for odd prime degrees in a primality test. A different approach, due to Spaenlehauer [14], reduces root finding to computations on an elliptic curve and its quadratic twist, with an online bound depending on the group orders of the supplied curve data.

Here we use the Dedekind zeta theorem to construct the full auxiliary table for the prime-field algorithm, including its entry of degree two. We give the extension-field reduction by taking the fixed space of z↦zpz \mapsto z^p directly. This makes the degree and number of prime-field queries explicit. The same prime-field algorithm supplies the queries in the construction of a field presentation.

An explicit presentation is a quotient Fp[U]/(h)\mathbb{F}_p[U]/(h) in an indeterminate UU with hh monic irreducible of degree mm. A field element is encoded by the mm coefficients of its representative of degree less than mm, with each coefficient represented in binary by its residue in {0,…,p−1}\{0,\ldots,p-1\}. A dense polynomial of degree nn is encoded by its n+1n+1 coefficients. A nonzero constant has an empty factor list.

Theorem 1.1. There is a uniform deterministic algorithm for complete factorization of every nonzero dense polynomial over an explicitly presented finite field of order qq. For degree nn the bit cost is polynomial in n+1n+1 and log⁡2q\log_2 q. Given the binary integer qq promised to be a prime power, the algorithm can first construct a presentation in time polynomial in log⁡2q\log_2 q. In this case the polynomial is then supplied in the resulting power basis.

Remark 1.2. The external inputs to Theorem 1.1 are the Dedekind zeta zero-free theorem of Cureton and Thorner [4 Theorem 1.1] and the auxiliary-prime factorization theorem, bit bound, and smoothed prime-ideal estimate of OpenAI [8 Theorem 1.2, Proposition 10.1, and Lemma 11.2].

Remark 1.3. The author of the present paper used Rethlas–OSV [10, 7] to review the following manuscripts in sequence. The first review, of OpenAI’s Deterministic Polynomial Factorization over Prime Fields [8], reported no mathematical issues. The review of Cureton and Thorner’s Dedekind zeta paper [4] identified gaps in the written proof. Rethlas–OSV supplied a revised manuscript with supplementary arguments. The revision passed a second Rethlas–OSV review, which reported no mathematical issues in the material reviewed. Unable to reach the authors, the author posted the review reports and the consolidated revision on GitHub. The subsequent reviews of OpenAI’s companion paper on primitive roots [9] and of the present paper reported no mathematical issues in the material reviewed.

Auxiliary primes and the prime-field algorithm

For a prime-field input of degree nn, put

B=20+(n+1)(⌈log⁡2p⌉+1).B = 20 + (n+1)(\lceil\log_2 p\rceil+1).

For n≥2n \ge2 and p>B200000p > B^{200000}, the algorithm of [8 Theorem 1.2] requires, for every prime r≤nr \le n, a rational prime ℓ\ell satisfying

ℓ∉{2,3,p,r},ℓ≡1(mod12r),p(ℓ−1)/r≢1(modℓ).(1)\ell\notin\{2,3,p,r\}, \qquad\ell\equiv1 \pmod{12r}, \qquad p^{(\ell-1)/r} \not\equiv1 \pmod{\ell}. \tag*{(1)}

For the remaining inputs the table is empty. If EE is the maximum of 2 and the supplied primes, the bit cost, including upward search for the primes, is O(B500000+B100E20)O(B^{500000}+B^{100}E^{20}) by [8 Proposition 10.1].

Lemma 2.1. For n≥2n \ge2, p>max⁡(n,3)p > \max(n,3), and each prime r≤nr \le n, there is a prime satisfying (1) with ℓ=O(B32)\ell= O(B^{32}), uniformly in p,n,rp,n,r.

Proof. Write K=Q(μ12r)K = \mathbb{Q}(\mu_{12r}), with μ12r\mu_{12r} the group of complex (12r)(12r)th roots of unity, and put M=K(p1/r)M = K(p^{1/r}) using the positive real root. Since p∤12rp \nmid12r, it is unramified in KK. The valuation normalized to give a uniformizer value one at any prime of KK over pp therefore gives pp value one. Hence Xr−pX^r-p is Eisenstein at that prime. Its roots are obtained by multiplying p1/rp^{1/r} by the rrth roots of unity, all of which lie in KK, so M/KM/K is cyclic of degree rr.

For a number field FF, let dF=[F:Q]d_F=[F:\mathbb{Q}] and let DFD_F be its absolute discriminant. Write log⁡\log for the natural logarithm. The cyclotomic degree satisfies dK≤4rd_K\leq4r, since among the integers up to 12r12r at most 4r4r are prime to 6. Let Φ12r\Phi_{12r} be the monic polynomial whose roots are the primitive (12r)(12r)th roots of unity. Write X12r−1=Φ12r(X)H(X)X^{12r}-1=\Phi_{12r}(X)H(X), where HH is the monic cofactor in Z[X]\mathbb{Z}[X]. At every primitive root ζ\zeta, differentiation gives

12rζ12r−1=Φ12r′(ζ)H(ζ).12r\zeta^{12r-1}=\Phi'_{12r}(\zeta)H(\zeta).

The product of the left sides is ±(12r)dK\pm(12r)^{d_K}. The product of the cofactor values is the field norm of an algebraic integer, hence an integer. The product of the derivatives is the polynomial discriminant up to sign. It follows that this discriminant divides (12r)dK(12r)^{d_K}. The field discriminant divides the polynomial discriminant, giving log⁡DK≤dKlog⁡(12r)\log D_K\leq d_K\log(12r). For Xr−pX^r-p, the product of rXr−1rX^{r-1} over the roots is rrpr−1r^rp^{r-1} up to sign. Thus the relative discriminant of M/KM/K divides the ideal generated by rrpr−1r^rp^{r-1}. The discriminant formula in the tower therefore gives

log⁡DM≤rlog⁡DK+dK(rlog⁡r+(r−1)log⁡p).\log D_M\leq r\log D_K+d_K\bigl(r\log r+(r-1)\log p\bigr).

Since dM=rdKd_M=rd_K, the weighted sum satisfies

(log⁡DK+dK)+r−1(log⁡DM+dM)≤dK(2log⁡(12r)+2+log⁡r+(1−1/r)log⁡p)=O(r(1+log⁡p))=O(B),\begin{aligned} (\log D_K+d_K)+r^{-1}(\log D_M+d_M)\leq d_K\bigl(2\log(12r)+2+\log r+(1-1/r)\log p\bigr) \\ &=O(r(1+\log p))=O(B), \end{aligned}

using r≤nr\leq n and r<pr<p.

Fix a smooth, nonnegative, nonzero real function ww compactly supported in (1,2)(1,2). For real x≥2x\geq2, define

ΨF(x)=∑p∑j≥1log⁡Np w((Np)j/x),c=∫12w(t) dt,\Psi_F(x)=\sum_{\mathfrak p}\sum_{j\geq1}\log N\mathfrak p\,w((N\mathfrak p)^j/x),\qquad c=\int_1^2w(t)\,dt,

where p\mathfrak p runs over the nonzero prime ideals of the ring of integers OF\mathcal{O}_F and Np=∣OF/p∣N\mathfrak p=|\mathcal{O}_F/\mathfrak p|. Here c>0c>0. By [4 Theorem 1.1], each nontrivial zero ρ\rho of the Dedekind zeta function of FF satisfies Re⁡ρ≤31/32\operatorname{Re}\rho\leq31/32. In the smoothed explicit formula of [8 Lemma 11.2], each zero contributes −xρ∫12w(t)tρ−1 dt-x^\rho\int_1^2w(t)t^{\rho-1}\,dt. The sum of the absolute values of the integrals, over the zeros with multiplicity, is Ow(log⁡DF+dF)O_w(\log D_F+d_F), and the remainder apart from the pole term cxcx has this same bound. Hence ΨF(x)−cx=Ow(x31/32(log⁡DF+dF))\Psi_F(x)-cx=O_w(x^{31/32}(\log D_F+d_F)), with constants depending only on ww. Applying it to both fields and retaining the weight 1/r1/r gives

ΨK(x)−r−1ΨM(x)=(1−r−1)cx+Ow(Bx31/32).\Psi_K(x)-r^{-1}\Psi_M(x)=(1-r^{-1})cx+O_w(Bx^{31/32}).

Suppose there is no prime satisfying (1) in (x,2x)(x,2x). A term in ΨK(x)\Psi_K(x) with j=1j=1 and residue degree one over a rational prime ℓ∉{2,3,p,r}\ell\notin\{2,3,p,r\} has x<ℓ<2xx<\ell<2x. The Frobenius at ℓ\ell acts on μ12r\mu_{12r} by raising to the ℓ\ellth power. Residue degree one makes this automorphism the identity, so ℓ≡1(mod12r)\ell\equiv1\pmod{12r}. By the supposition, ℓ(ℓ−1)/r≡1\ell^{(\ell-1)/r}\equiv1 in Fℓ\mathbb{F}_\ell. This is the criterion for being an rrth power in the cyclic group Fℓ×\mathbb{F}_\ell^\times of order ℓ−1\ell-1. Then Xr−pX^r-p has rr distinct roots in Fℓ\mathbb{F}_\ell, so the corresponding prime of KK splits completely in MM. Here ℓ\ell is prime to the power-basis discriminant, so reduction of the polynomial determines the splitting. The rr primes of MM above this prime each have norm ℓ\ell. Their terms, with weight −1/r-1/r, sum to the negative of the term from KK.

The terms left in ΨM(x)\Psi_M(x) enter with a negative sign. A remaining term from KK with jj times residue degree at least two lies over a rational prime at most 2x\sqrt{2x}. There are at most 2x\sqrt{2x} such rational primes and at most dKd_K prime ideals above each. Since (Np)j<2x(Np)^j < 2x on the support of a summand, the number of eligible jj is at most log⁡(2x)/log⁡Np\log(2x)/\log Np. Thus each ideal contributes at most ∥w∥∞log⁡(2x)\lVert w\rVert_\infty\log(2x), where ∥w∥∞\lVert w\rVert_\infty is the maximum of ww. Terms with j=1j=1 and residue degree one over the four exceptional primes contribute at most 4dK∥w∥∞log⁡(2x)4d_K\lVert w\rVert_\infty\log(2x). Consequently

ΨK(x)−r−1ΨM(x)≤Cwrxlog⁡(2x),\Psi_K(x)-r^{-1}\Psi_M(x)\le C_w r\sqrt{x}\log(2x),

where CwC_w depends only on ww. Set x=TB32x=TB^{32} with a fixed T≥2T\ge2. After division by xx, the explicit-formula error is Ow(T−1/32)O_w(T^{-1/32}). Since r≤Br\le B, dividing Cwrxlog⁡(2x)C_w r\sqrt{x}\log(2x) by xx gives a bound of order T−1/2(1+log⁡T)T^{-1/2}(1+\log T), uniformly in BB. Indeed, B/x=T−1/2B−15B/\sqrt{x}=T^{-1/2}B^{-15}, and log⁡(2x)=log⁡(2T)+32log⁡B\log(2x)=\log(2T)+32\log B. Both B−15B^{-15} and B−15log⁡BB^{-15}\log B are at most one. Choose TT so the divided error and the divided upper bound are each less than c/4c/4. The main term divided by xx is at least c/2c/2, a contradiction. The prime obtained is less than 2TB322TB^{32}.

In the branch n≥2n\ge2 and p>B200000p>B^{200000} we have p>max⁡(n,3)p>\max(n,3). Enumerate the primes r≤nr\le n by trial division. For each rr, test successive integers for primality and check (1) by modular exponentiation until a prime is found. Lemma 2.1 gives E=O(B32)E=O(B^{32}). The search bound need not be supplied to the algorithm. Substitution in the cited bit bound gives O(B500000)O(B^{500000}), since 100+20⋅32=740100+20\cdot32=740. In the empty-table branch the same bound follows with E=2E=2.

Reduction by absolute Frobenius

Proposition 3.1. For a nonzero input of degree nn over an explicitly presented field of order q=pmq=p^m, complete factorization reduces deterministically to at most max⁡(0,n−1)\max(0,n-1) prime-field factorizations of split square-free polynomials of degree at most nn. The other bit operations are polynomial in n+1n+1 and log⁡2q\log_2 q.

Proof. Record the leading coefficient and divide by it. For a constant, return the empty list. Consider a monic square-free polynomial g∈Fq[X]g\in\mathbb{F}_q[X] of positive degree. In Fq[X]/(g)\mathbb{F}_q[X]/(g), the map z↦zp−zz\mapsto z^p-z is Fp\mathbb{F}_p-linear by the binomial theorem and the equality ap=aa^p=a for a∈Fpa\in\mathbb{F}_p. Its matrix is obtained by raising the residue classes of UiXjU^iX^j, for 0≤i<m0\le i<m and 0≤j<deg⁡g0\le j<\deg g, to the ppth power modulo hh and gg and subtracting the original basis vectors. Gaussian elimination computes a basis of the kernel.

If gg has ss distinct irreducible factors, the Chinese remainder theorem identifies the quotient with a product of ss finite fields. In each field the fixed elements are exactly its prime field, since Xp−XX^p-X has at most pp roots and every element of Fp\mathbb{F}_p is a root. Thus the fixed space has dimension ss over Fp\mathbb{F}_p. If s=1s=1, return gg. Otherwise choose a basis vector bb of the fixed space outside Fp⋅1\mathbb{F}_p\cdot1. Compute the successive powers 1,b,b2,…1,b,b^2,\ldots and test linear dependence over Fp\mathbb{F}_p. The powers lie in the fixed space, so a dependence occurs by bsb^s. At the first dependent power, express it as a linear combination of the preceding powers and move the combination to the left. The resulting monic polynomial has least degree among those annihilating bb. A polynomial annihilates bb precisely when it vanishes at every coordinate of bb. Thus the minimal polynomial is the product of X−aX-a over the distinct coordinate values a∈Fpa\in\mathbb{F}_p. Its degree is between 22 and s≤deg⁡gs\le\deg g. Factor it over Fp\mathbb{F}_p, and for each root aa take the monic gcd of gg and the degree-<deg⁡g<\deg g representative of bb minus aa. An irreducible factor of gg divides this gcd exactly when the corresponding coordinate of bb equals a. As gg is square-free, the gcds multiply to gg and partition its irreducible factors into at least two nonempty groups. Recurse on the resulting factors of gg.

For a general monic polynomial ff of positive degree, let g=f/gcd⁡(f,f′)g=f/\operatorname{gcd}(f,f'), using the monic gcd and the formal derivative f′f'. For an irreducible factor uu of exponent ee in ff, write f=uevf=u^e v with u∤vu\nmid v. Then f′=ue−1(eu′v+uv′)f'=u^{e-1}(eu'v+uv'). The field Fq[X]/(u)\mathbb{F}_q[X]/(u) has qdeg⁡uq^{\deg u} elements, so uu divides Xqdeg⁡u−XX^{q^{\deg u}}-X, whose derivative is −1-1. Hence u∤u′u\nmid u'. The exponent of uu in gcd⁡(f,f′)\operatorname{gcd}(f,f') is therefore e−1e-1 if p∤ep\nmid e and ee otherwise. In particular gg is square-free. Factor gg by the square-free procedure if it is nonconstant. For each factor so obtained, recover its full multiplicity by repeated exact division and remove its full power. All remaining irreducible-factor multiplicities are divisible by pp, so the remainder is a ppth power. In characteristic pp a ppth power has only monomial exponents divisible by pp. If the remainder is nonconstant, divide these exponents by pp and raise each coefficient to pm−1p^{m-1}, the inverse of ppth powering on Fq\mathbb{F}_q since zpm=zz^{p^m}=z. Recurse and multiply the returned multiplicities by pp. This also treats f′=0f'=0 and terminates because each root step strictly lowers the degree.

Each square-free splitting tree has one query per internal vertex. If there are ss leaves, the number of edges is the number of internal vertices plus s−1s-1. Each internal vertex has at least two children, so there are at most s−1s-1 internal vertices. The sets of irreducibles processed at different root steps are disjoint, and their total size is at most nn. This gives the query count, including the constant case. Each root step lowers the degree by a factor of pp, and every successful division lowers the current degree by at least one. There are at most nn successful divisions in total and at most one failed division per factor whose multiplicity is recovered. Matrices have O(mn)O(mn) rows and columns. Multiplication and inversion in the coefficient field use polynomial multiplication and the extended Euclidean algorithm modulo hh. Quotient multiplication, greatest common divisors, and Gaussian elimination have polynomial cost in nn, mm and the binary length of pp. Binary powering uses a number of multiplications linear in the bit length of the exponent, at most 1+m⌈log⁡2p⌉1+m\lceil\log_2 p\rceil for the powers used here. Since mlog⁡2p=log⁡2qm\log_2 p=\log_2 q, this gives the stated bit bound.

Constructing the field presentation

Proposition 4.1. Given a prime pp and a positive integer mm, an irreducible polynomial of degree mm over Fp\mathbb{F}_p can be constructed using O(m2(1+log⁡2p))O(m^2(1+\log_2 p)) calls to prime-field factorization of degree at most mm and polynomial additional bit cost in mm and log⁡2p\log_2 p.

Proof. Return UU for m=1m=1. For m>1m>1, factor the integer mm by trial division. For each exact prime power rar^a dividing mm (so ra∣mr^a\mid m and ra+1∤mr^{a+1}\nmid m), first construct a field containing the degree-rar^a field over Fp\mathbb{F}_p.

Odd r≠pr\ne p. Factor 1+U+⋯+Ur−11+U+\cdots+U^{r-1} over Fp\mathbb{F}_p, and use any one of its irreducible factors as the modulus of a field EE. The residue class of UU has rrth power one by the geometric sum identity and is different from one because the sum takes value r≠0r\ne0 at one. Its order in E×E^\times is therefore rr, and [E:Fp]≤r−1[E:\mathbb{F}_p]\le r-1. Write vr(N)v_r(N) for the exponent of rr in a positive integer NN. Put t=vr(∣E∣−1)t=v_r(|E|-1), computed by division by rr. Starting with the element of order rr, repeatedly take an rrth root in EE until reaching an element of order rtr^t. In the cyclic group E×E^\times, the image of rrth powering contains the subgroup of order rt−1r^{t-1}. Thus an element of order rjr^j, for 1≤j<t1\le j<t, has an rrth root. If a root has order NN, then N/gcd⁡(N,r)=rjN/\operatorname{gcd}(N,r)=r^j, which forces N=rj+1N=r^{j+1}. For the current element b∈Eb\in E, apply Proposition 3.1 to Vr−bV^r-b in the already presented field EE, with VV an indeterminate. Choose the root of the first linear factor in a fixed order. If the initial element already has order rtr^t, the chain is empty.

If a root of Vra−cV^{r^a}-c has order NN in an algebraic closure of EE, its rar^ath power has order N/gcd⁡(N,ra)=rtN/\operatorname{gcd}(N,r^a)=r^t. Thus NN is an rr-power and, since t≥1t\ge1, N=rt+aN=r^{t+a}. Its degree over EE is the least e≥1e \ge1 such that rt+ar^{t+a} divides ∣E∣e−1|E|^e - 1, by the criterion for membership in the field of order ∣E∣e|E|^e. First raise ∣E∣|E| to the factor of ee prime to rr. By the geometric sum formula, the difference from one is ∣E∣−1|E|-1 times a sum congruent modulo rr to the number of its summands, which is prime to rr. Its valuation is therefore tt. Then each raising to the rrth power increases the valuation by one. Indeed, the binomial expansion of ur−1u^r-1 in powers of u−1u-1 starts with r(u−1)r(u-1). The terms of degrees 22 through r−1r-1 have coefficients divisible by rr. If vr(u−1)≥1v_r(u-1) \ge1 and rr is odd, the term (u−1)r(u-1)^r also has valuation strictly greater than 1+vr(u−1)1+v_r(u-1). For r=2r=2 the same strict inequality holds when v2(u−1)≥2v_2(u-1) \ge2. Thus vr(∣E∣e−1)=t+vr(e)v_r(|E|^e-1)=t+v_r(e), and the least degree is rar^a. Thus the binomial is irreducible and its quotient gives an explicit field whose degree over Fp\mathbb{F}_p is divisible by rar^a.

r=2≠pr=2 \ne p. If p≡1(mod4)p \equiv1 \pmod{4}, take E=FpE=\mathbb{F}_p and start at −1-1, of order two. The same root chain gives cc of order 2v2(p−1)2^{v_2(p-1)}. Since v2(p−1)≥2v_2(p-1) \ge2, the valuation calculation gives irreducibility of V2a−cV^{2^a}-c over EE. If p≡3(mod4)p \equiv3 \pmod{4}, first construct E=Fp[U]/(U2+1)E=\mathbb{F}_p[U]/(U^2+1) and let ii be the class of UU. The polynomial is irreducible since an element squaring to −1-1 would have order four in Fp2\mathbb{F}_{p^2}, whose order is p2−1≡2(mod4)p^2-1 \equiv2 \pmod{4}. For a=1a=1 this is the desired field. For a≥2a \ge2, start the chain at ii, of order four, and take square roots until reaching an element cc of order 2v2(p2−1)2^{v_2(p^2-1)}. Use V2a−1−cV^{2^{a-1}}-c over EE. Here ∣E∣=p2≡1(mod4)|E|=p^2 \equiv1 \pmod{4} and the valuation identity gives extension degree 2a−12^{a-1} over EE, hence degree 2a2^a over Fp\mathbb{F}_p.

r=pr=p. Starting at Fp\mathbb{F}_p, perform aa Artin–Schreier steps. In the current field EE, choose a basis element cc outside the image of the Fp\mathbb{F}_p-linear map z↦zp−zz \mapsto z^p-z. Its kernel is Fp\mathbb{F}_p, so the image has codimension one. The derivative of Vp−V−cV^p-V-c is −1-1. If α\alpha is one root, the pp distinct roots are α+j\alpha+j for j∈Fpj \in\mathbb{F}_p, so its splitting field is E(α)E(\alpha). Each automorphism acts on α\alpha by translation by such a jj, giving an injective homomorphism into the additive group of Fp\mathbb{F}_p. Since cc is outside the image, the polynomial has no root in EE. Thus the group has order pp and the polynomial is irreducible. Replace EE by E[V]/(Vp−V−c)E[V]/(V^p-V-c) at each step.

In each constructed field, compute the kernels of the Fp\mathbb{F}_p-linear maps z \mapsto z^{p^r^a}-z and z↦zpra−1−zz \mapsto z^{p^{r^{a-1}}}-z. Both rar^a and ra−1r^{a-1} divide the ambient degree, so the roots of the corresponding equations are exactly the subfields of degrees rar^a and ra−1r^{a-1} over Fp\mathbb{F}_p. Choose a basis vector of the larger kernel outside the smaller one. Every proper subfield of the degree-rar^a field is contained in the degree-ra−1r^{a-1} subfield. The first dependence of the powers of this vector, beginning with the zeroth power, gives its minimal polynomial, of degree rar^a.

Take the compositum of the resulting fields by successively adjoining the roots of their defining polynomials. If the current field has degree dd over Fp\mathbb{F}_p, adjoining a root of degree rar^a over Fp\mathbb{F}_p gives degree rar^a over the current field. In fact its orbit under pdp^dth powering has length ra/gcd⁡(d,ra)=rar^a/\gcd(d,r^a)=r^a, since the construction takes each prime divisor of mm only once. Thus each polynomial remains irreducible in the corresponding quotient construction. In the resulting degree-mm field take the sum of the chosen generators. If the sum has degree ee over Fp\mathbb{F}_p, then e∣me \mid m. For each exact prime power rar^a dividing mm, the subfield of degree lcm⁡(e,m/ra)\operatorname{lcm}(e,m/r^a) exists since that degree divides mm. It contains the sum and every other generator, so subtraction puts the generator of degree rar^a in it as well. Thus rar^a divides lcm⁡(e,m/ra)\operatorname{lcm}(e,m/r^a), and coprimality of rar^a and m/ram/r^a implies ra∣er^a \mid e. This holds for each prime power, giving e=me=m. The first linear dependence among the powers of the sum yields its monic minimal polynomial.

All choices can be made by fixed coordinate order or by a fixed elimination procedure. In the root chains the base fields have dimension at most rr over Fp\mathbb{F}_p, so each chain has O(r(1+log⁡2p))O(r(1+\log_2 p)) steps. A step calls Proposition 3.1 on degree rr, costing at most r−1r-1 prime-field queries. The initial cyclotomic queries have degree r−1r-1. The sum of distinct prime divisors of mm is at most mm, by iterating u+v≤uvu+v \le uv for integers u,v≥2u,v \ge2. The sum of their squares is at most the square of their sum. The root chains and cyclotomic queries therefore use O(m2(1+log⁡2p))O(m^2(1+\log_2 p)) queries in total. The temporary fields have dimension at most m2m^2 over Fp\mathbb{F}_p. Build a multiplication table at each stage of a tower by multiplying its basis monomials and reducing by the monic defining polynomial over the preceding field. The previous table implements arithmetic over that field. The dimensions and defining degrees are bounded by m2m^2, so each new table uses polynomially many operations. Once a table is available, multiplication is bilinear in the coordinates and inversion is a linear system. The exponent prαp^{r^\alpha} has at most 1+m⌈log⁡2p⌉1+m\lceil\log_2 p\rceil bits. Thus all powering, kernel computations, and changes of basis have polynomial bit cost in mm and log⁡2p\log_2 p.

Proof of Theorem 1.1. Use the prime-field algorithm of § 2 for the queries of Proposition 3.1. Each query has degree at most nn, and log⁡2p≤log⁡2q\log_2 p\le\log_2 q, giving the asserted polynomial bound. For the presentation interface, recover p,mp,m from the promised prime power qq by testing exact integer roots in decreasing order of exponent from ⌊log⁡2q⌋\lfloor\log_2 q\rfloor to 11. The largest successful exponent is mm by unique factorization. For each exponent, binary search on the integers from 22 to qq tests for an exact root. Binary powering with intermediate values capped at q+1q+1 keeps the integer bit lengths polynomial in log⁡2q\log_2 q. Apply Proposition 4.1 with the same prime-field algorithm. Since m≤log⁡2qm\le\log_2 q, the query count, query degrees and remaining computation are all polynomially bounded in log⁡2q\log_2 q.

Zhili College, Tsinghua University, Beijing 100084, China

Email address: [email protected]

References

  1. [1]E. R. Berlekamp, Factoring polynomials over finite fields, Bell System Tech. J. 46 (1967), 1853–1859.DOI
  2. [2]E. R. Berlekamp, Factoring polynomials over large finite fields, Math. Comp. 24 (1970), 713–735.
  3. [3]D. G. Cantor and H. Zassenhaus, A new algorithm for factoring polynomials over finite fields, Math. Comp. 36 (1981), 587–592.DOI
  4. [4]D. Cureton and J. Thorner, A quasi-Riemann hypothesis for Dedekind zeta functions, Hexagon 2610.00200v2, 2026.
  5. [5]S. Evdokimov, Factorization of polynomials over finite fields in subexponential time under GRH, Algorithmic Number Theory, Lecture Notes in Comput. Sci. 877, Springer, 1994, 209–219.DOI
  6. [6]H. W. Lenstra, Jr., Finding isomorphisms between finite fields, Math. Comp. 56 (1991), 329–347.DOI
  7. [7]F. Nie, H. Ye, S. Liu, Z. Wang, S. Ermon, and J. Zou, One-sided verification under limited expert review, arXiv:2610.18089v2, 2026.arxiv.org/abs/2610.18089
  8. [8]OpenAI, Deterministic polynomial factorization over prime fields, preprint, October 4, 2026.
  9. [9]OpenAI, Primitive roots for every admissible integer base, preprint, October 4, 2026.
  10. [10]OSVerify contributors, Rethlas–OSV, software, 2026.
  11. [11]V. Shoup, New algorithms for finding irreducible polynomials over finite fields, Math. Comp. 54 (1990), 435–447.
  12. [12]V. Shoup, On the deterministic complexity of factoring polynomials over finite fields, Inform. Process. Lett. 33 (1990), 261–267.DOI
  13. [13]J. M. Shunia, Deterministic polynomial-time primality testing with a single binomial congruence, arXiv:2611.02280v1, 2026.arxiv.org/abs/2611.02280
  14. [14]P.-J. Spaenlehauer, Deterministic root-finding over finite fields with elliptic curves, 2026. arXiv:2610.32508v1.arxiv.org/abs/2610.32508

Paper details

vlnc:W_tesg85he
Version
v2 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 35

downloads · 1

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents