Using the smoothness of p-1 for computing roots modulo p
Bartosz Zralek

TL;DR
This paper presents a deterministic polynomial-time method for factoring polynomials and computing roots modulo a prime p, based on the smoothness properties of p-1, without relying on the Extended Riemann Hypothesis.
Contribution
It introduces a new approach that leverages the smoothness of p-1 to enable efficient deterministic algorithms for polynomial factorization and root finding modulo p.
Findings
Complete polynomial factorization modulo p in deterministic polynomial time.
Deterministic computation of roots modulo p under smoothness conditions.
No reliance on the Extended Riemann Hypothesis for these results.
Abstract
We prove, without recourse to the Extended Riemann Hypothesis, that the projection modulo of any prefixed polynomial with integer coefficients can be completely factored in deterministic polynomial time if has a -smooth divisor exceeding for some arbitrary small . We also address the issue of computing roots modulo in deterministic time.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAlgebraic Geometry and Number Theory · Polynomial and algebraic computation · Mathematical Analysis and Transform Methods
Using the smoothness of for computing roots modulo
Bartosz Źrałek 111Institute of Mathematics, Polish Academy of Sciences, 00-956 Warsaw, Poland. email: [email protected]
Abstract
We prove, without recourse to the Extended Riemann Hypothesis, that the projection modulo of any prefixed polynomial with integer coefficients can be completely factored in deterministic polynomial time if has a -smooth divisor exceeding for some arbitrary small . We also address the issue of computing roots modulo in deterministic time.
1 Introduction
Factoring polynomials over finite fields in deterministic polynomial time is a long-standing open problem of computational number theory. The most important results obtained, though partial, are now classic. Berlekamp [2] was the first to devise a general deterministic algorithm for this problem; its running time bound , where is the characteristic of the finite field and the degree of the polynomial to be factored, can be seen as polynomial only if is fixed. A better and so far best time bound is achieved by an algorithm of Shoup [15]. There are also algorithms with running time bound of the form , such as the Cantor-Zassenhaus algorithm [4] (actually dating back to Legendre), but these use randomness in an essential way. In this article we pursue an approach developed by von zur Gathen [6] and Rónyai [13], which consists in taking advantage of the multiplicative structure of . Shoup [16] refined the algorithms of von zur Gathen and Rónyai, improving the running time bound from to , where is the largest prime factor of . These three algorithms are deterministic, however in their proofs of correctness the Extended Riemann Hypothesis must be assumed. We prove, without recourse to the ERH, that the projection modulo of any prefixed polynomial with integer coefficients can be completely factored in deterministic polynomial time if has a -smooth divisor exceeding for some arbitrary small .
Theorem 1.1
Let be an irreducible polynomial of degree in , with leading coefficient , and the polynomial of defined by . Let be the class number of , where is any complex root of . Let be a prime and the least prime such that the -smooth part of is no less than for some . Then the complete factorization of modulo can be found in deterministic time, where is any positive number and positive numbers satisfying .
Let us emphasize that the above big- constant depends severely on as to include the time of some necessary precomputations in the number field . For a thorough exposition of constructive algebraic number theory we refer the reader to [11]. In a sense, the idea of fixing the polynomial rather than the prime is at the opposite of Berlekamp’s algorithm. Actually, it has been already considered by Schoof [14] in the case when for an integer, and by Pila [9] when for a prime dividing . Both authors gave unconditional algorithms that factor the corresponding polynomial modulo in respectively and deterministic time. We address more generally the issue of computing roots modulo in the ensuing corollary. Our proofs are mainly based upon algebraic number theory, whereas Schoof’s and Pila’s rely on heavy machinery of algebraic geometry and this is of independent interest.
Corollary 1.2
Let be a prime and the least prime such that the -smooth part of is no less than for some . Let be a positive integer. Suppose that the integer is an -th power residue modulo . Then all the -th roots of modulo can be computed in deterministic time, where is any positive number, positive numbers satisfying , and the largest integer among the class numbers of the fields , running through the complex -th roots of .
In the cases covered by Schoof or Pila and such that the corresponding integer is equal to one the stated running time bound is slightly better for a sparse, but infinite set of primes . It is worth noting that our technique combined with the result of Pila and an observation of Tsz-Wo Sze [17] leads for an odd prime to a stronger theorem than corollary 1.2 (see last remark of section 5).
2 Notation
In all that follows, is a fixed, irreducible polynomial of degree in , with leading coefficient , and the corresponding monic, irreducible polynomial of degree in . The number field is the extension of by a complex root of the polynomial . The class number of is , its ring of integers - . A fixed, integral basis of , as well as a fixed, finite set of generators of the group of units are given. The ideals of that we consider are always supposed to be nonzero. The norm of an ideal in is the cardinality of . We let , respectively , be the number of ideals, respectively principal ideals, of with norm at most that can be written as a product of prime ideals, respectively principal ideals, of with norm at most .
The letter denotes an odd prime number. For , by we mean the quotient ring and by its multiplicative group. If the commutative group is a direct sum of two subgroups , , and is a subset of then the symbol , respectively , stands for the subgroup of generated by , respectively the subgroup of generated by the cosets , .
3 Auxiliary results
We will seek to compute the factorization of modulo ; it gives the factorization of by a change of variable whenever does not divide . In general, we can assume that the prime exceeds any given constant, since for small factoring in is ”easy”.
The algorithm of Fellows and Koblitz [5] for proving the primality of an integer or also the deterministic version of Pollard’s method [18] for factoring , perform certain operations on a ”small” subset of that generates modulo a ”large” multiplicative semigroup . In fact, can be chosen there as the set of prime numbers not exceeding ; the semigroup has then at least elements, where is the de Bruijn function. Here similarly, to factor modulo we will construct a small subset of generating a large multiplicative semigroup. By the following lemma, the latter task amounts to exhibiting a suitable subset of , at least if is sufficiently large.
Lemma 3.1
Assume that does not divide the index . Then induces an isomorphism .
Unlike however, is not a unique factorization domain (unless ). It is still a Dedekind domain and just as measures the smoothness of integers in , the function measures the smoothness of ideals in . The next theorem generalizes in this sense a result of Canfield et al. [3].
Theorem 3.2** (Moree, Stewart)**
There is an effective, positive constant such that for and we have
[TABLE]
The generator of a principal ideal in is defined up to a multiplicative unit of , so working with principal ideals, rather than general ones, is pretty much like working with integers. That is why we give via a lower bound for the function counting the number of ”smooth” principal ideals.
Lemma 3.3
*There is an effective, positive constant such that \tilde{\psi}_{K}(x,y)\geq~{}$$\frac{1}{h}$$\psi_{K}(c_{2}x,y^{\frac{1}{h}}) for .
***Proof. ** Let be a set of representatives for the class group of whose norms are bounded above by the Minkowski bound . We will prove that the lemma holds with . Define as the number of principal ideals of with norm at most that split as a product of prime ideals of with norm at most .
Let be an ideal counted by . There exists a , , such that is principal. Suppose that , i.e. . Then is counted by . Moreover, any ideal counted by can be written in at most ways as , where is counted by and . Consequently, \frac{1}{h}$$\psi_{K}(M_{K}^{-1}x,y^{\frac{1}{h}})\leq\psi_{K}^{\prime}(x,y^{\frac{1}{h}}).
Assume that the principal ideal of is a product of prime ideals of with norm at most . It is easy to show by induction on that is a product of principal ideals of with norm at most . Just use the fact that every product of at least ideals of contains a principal factor. Therefore any ideal counted by is also counted by , hence . **
It becomes apparent that if we let be the union of and a set containing pairwise non-associate integers with small norm then it should generate modulo a relatively large multiplicative semigroup . Nevertheless, three problems arise. Is indeed large though reduction modulo ? Can the suitable set be small and easy to find? The ensuing theorem helps to answer these questions positively.
Theorem 3.4** (Fincke, Pohst)**
*There is an effective, positive constant such that for any there exists generating the same ideal as and whose coordinates in the basis satisfy .
*Proof. ** Combine the equations (3.5b), chapter 5, and (4.3f), chapter 6 of [11].
We now summarize rigorously the above informal discussion. Actually, we show more: for any dividing modulo , a set derived from generates a large multiplicative semigroup in .
Lemma 3.5
*Suppose that the polynomial of degree divides modulo . Let and be as in lemma 3.1. Let and be the projections and respectively. Fix and define , . Then for any and , .
*Proof. ** Let . It is sufficient to prove that the desired inequality holds with replaced by . We invoke theorem 3.4 to get . By lemma 3.3, if is large enough the latter expression is no less than \frac{1}{h}$$\psi_{K}(c_{2}(\frac{p}{2c_{3}})^{d},\ln^{c}p). This in turn is greater than for any and sufficiently large , by theorem 3.2. Thus if exceeds some constant depending upon and . Assume that it does. As , we have . Furthermore, is an isomorphism, hence . Finally, is a surjective homomorphism, so the preimage under of any element of has elements. It follows that . Therefore .
Assume that is a product of at least two distinct, degree irreducible factors of modulo . Either the set mentioned above is not contained in , or generates a large subgroup of and thus should not be cyclic. The latter case is dealt with an extension of the Pohlig-Hellman algorithm [10] for computing discrete logarithms.
Theorem 3.6
*Let be a polynomial of degree in and the group . Write , . Suppose that we are given , and a subset of such that is not cyclic. Then we can find a nontrivial divisor of in deterministic time, where is largest prime factor of and any positive number.
*Proof. ** The deterministic Pollard-Strassen [12] algorithm can be used to find the complete factorization of the -smooth part of in the stated time. The rest of the proof is based on obvious modifications of the proofs of corollary 4.4, theorem 6.6 and on remark 4.3 from [18].
4 Proof of theorem 1.1
If , where is the constant from lemma 3.5, then we can find efficiently the complete factorization of using the deterministic Berlekamp algorithm for example. Now assume that the reverse inequality holds. We first compute the squarefree, distinct-degree factorization of modulo , that is the products , , of all distinct, degree irreducible divisors of modulo . Fix ; the complete factorization of will be found by using the following inductive procedure. Let be a factor of of degree , say . Suppose that . We show below how to split nontrivially. Keep the notation of lemma 3.5. Define . We can assume that ; in the contrary case is a nontrivial divisor of for some . Let . With as in theorem 3.6, let be the image of under the homomorphism raising every element to the power . Write as with - this condition uniquely determines and . We apply the algorithm from theorem 3.6 to check whether the group is cyclic. Suppose that it is, for otherwise we would obtain a nontrivial factor of . Then the order of divides . We will estimate this order from below to obtain a contradiction. We have . The kernel of has elements, hence . We appeal to lemma 3.5 to deduce that . Since , it follows that . Therefore . The right hand side of this inequality is easily seen to be no less than , which gives the desired contradiction. This means that a nontrivial divisor of had to be found at some stage. Once we have completely factored in , we get the complete factorization of in by the change of variable .
Obviously, the most time-consuming part of the described procedure is testing whether is cyclic. The stated running time follows from theorem 3.6, as .
5 Concluding remarks
Theorem 3.6 can be applied to get a short proof of Shoup’s result from [16], which states that under the ERH there is an algorithm that completely factors any degree polynomial in in deterministic time. It suffices to iterate the following procedure. Let be a reducible factor of . Adopt the notation of theorem 3.6. As in von zur Gathen’s algorithm, either we find directly a nontrivial divisor of , or compute an element of whose order is the power of some prime (cf. [1]). Then we find an -th power nonresidue modulo . Finally we use the algorithm from theorem 3.6 with and to find a nontrivial divisor of . All the required steps can be done in the stated time.
Instead of completely factoring we could be simply interested in splitting the polynomial modulo . To this end, the running time bound obtained in theorem 1.1 could be in some cases largely improved. For example, if the degree of is odd then it would be sufficient to take the integer therein as the least prime such that the -smooth part of is no less than for some .
As another example, consider the polynomial , where is an odd prime number and the integer is not an -th power. Suppose that splits modulo into distinct linear factors, or equivalently is an -th power residue modulo and divides . In order to split modulo within the time bound of theorem 1.1 it is then enough to choose as the least prime such that the -smooth part of is no less than for some . The point is that a nontrivial factor of modulo leads to an -th root of modulo (cf. [17]). The remaining -th roots of and hence the complete factorization of modulo can be found by computing a primitive -th root of unity modulo . This in turn can be done using Pila’s algorithm [9].
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] E. Bach, J. O. Shallit, Algorithmic Number Theory, Volume 1: Efficient Algorithms , MIT Press, 1996.
- 2[2] E. R. Berlekamp, Factoring Polynomials Over Finite Fields , Bell Systems Technical Journal, 46 (1967), 1853-1859.
- 3[3] E. R. Canfield, P. Erdös, C. Pomerance, On a problem of Oppenheim concerning ’Factorisatio Numerorum’ , Journal of Number Theory, 17 (1983), 1-28.
- 4[4] D. G. Cantor, H. Zassenhaus, A New Algorithm for Factoring Polynomials Over Finite Fields , Mathematics of Computation, 36 (1981), 587-592.
- 5[5] M. R. Fellows, N. Koblitz, Self-Witnessing Polynomial-Time Complexity and Prime Factorization , Designs, Codes and Cryptography, 2 (1992), 231-235.
- 6[6] J. von zur Gathen, Factoring Polynomials and Primitive Elements for Special Primes , Theoretical Computer Science, 52 (1987), 77-89.
- 7[7] A. K. Lenstra, H. W. Lenstra, Jr., L. Lovász, Factoring polynomials with rational coefficients , Mathematische Annalen, 261 (1982), 515-534.
- 8[8] P. Moree, C. L. Stewart, Some Ramanujan-Nagell equations with many solutions , Indagationes Mathematicae (N. S.), 1 (1990), 465-472.
