ABSTRACT EQUATIONS OVER FINITE FIELDS AND SOME RELATED PROBLEMS. Department of Mathematics
|
|
|
- Mervyn Owen
- 9 years ago
- Views:
Transcription
1 ABSTRACT Title of dissertation: ON SOLVING UNIVARIATE POLYNOMIAL EQUATIONS OVER FINITE FIELDS AND SOME RELATED PROBLEMS Tsz Wo Sze, Doctor of Philosophy, 2007 Dissertation directed by: Professor Lawrence C. Washington Department of Mathematics In this thesis, we are mainly interested in constructing deterministic polynomialtime algorithms for solving some computational problems that arise in number theory and cryptography. The problems we are interested in include finite field arithmetic, primality testing, and elliptic curve arithmetic. We first present a novel idea to compute square roots over some families of finite fields. Our square root algorithm is deterministic polynomial-time and can be proven by elementary means. The approach of taking square roots is generalized to take nth roots. Then, we present a deterministic polynomial-time algorithm to solve polynomial equations over some families of finite fields. Note that polynomial equations are powerful constructs. Many problems can be formulated as polynomial equations. As applications, we construct a deterministic polynomial-time primality test for some forms of integers and show a deterministic polynomial-time algorithm computing elliptic curve nth roots.
2 For example, we prove the following statements. Denote a finite field with q elements and characteristic p by F q. (I) Suppose p 1 (mod 12), q = 2 e 3 f t + 1 for some e, f 1 and some t = O(poly(log q)). There is a deterministic polynomial time algorithm taking square roots over F q. (II) Let q 1 = r e 1 1 r em m be the prime factorization. Suppose r j = O(poly(log q)) and a primitive r j th root of unity can be computed efficiently for 1 j m. There is a deterministic polynomial time algorithm solving any polynomial equation with degree O(poly(log q)) over F q. (III) Let N = r e t+1 for some prime r and some positive integers t and e with r e > t. There is an Õ(r2 (log 2 N)(t+r log N)) deterministic primality testing algorithm. If r is a small constant and t = O(log N), the running time is Õ(log3 N).
3 ON SOLVING UNIVARIATE POLYNOMIAL EQUATIONS OVER FINITE FIELDS AND SOME RELATED PROBLEMS by Tsz Wo Sze Dissertation submitted to the Faculty of the Graduate School of the University of Maryland, College Park in partial fulfillment of the requirements for the degree of Doctor of Philosophy 2007 Advisory Committee: Professor Clyde P. Kruskal, Chair Professor Lawrence C. Washington Professor Jonathan Katz Professor William Gasarch Professor David Mount
4 c Copyright by Tsz Wo Sze 2007
5 Dedicated to Yuen-King Lau ii
6 Acknowledgements This work would not be possible without the guidance provided from my advisor, Lawrence Washington. The most critial step of my Ph.D. study at the University of Maryland was meeting him in my first semester. Although he is a very intelligent and knowledgeable mathematician, he is exceptionally patient with his students. He has been constantly giving me non-trivial insights to look at problems and providing thoughtful comments on my works. I also deeply admire his personality. He is wellknown to be one of the best professors, not only in the Department of Mathematics, but also the Department of Computer Science. I have learned a lot from him, from number theory to being a man. Jonathan Katz has inspired me a lot. I thank him for many useful discussions in cryptography. He also has recommended interesting problems to me and has carefully reviewed my works. I am grateful to have Clyde Kruskal as my mentor. He has helped me a lot in my study and shown me different realms of knowledge, including the areas in mathematics, computer science and economics. It was my luck to work with Nelson Padua-Pérez and Chau-Wen Tseng in teaching computer programming for several semesters. I highly repect their enthusiasm and committment to their students. I thank Amol Deshpande for serving on my preliminary examination committee, David Mount for serving on my dissertation committee and William Gasarch for serving both committees. iii
7 At last, I would like to thank the following people and organizations (in alphabetical order) for providing high quality resources and making them freely available in the internet. cr.yp.to by Daniel Bernstein MathWorld by Wolfram Research PARI/GP PlanetMath The Prime Pages (primes.utm.edu) by Chris Caldwell WikipediA iv
8 Table of Contents 1 Introduction Overview Taking Square Roots and rth Roots Applications Other Works Useful Facts Algorithms Finite Fields Elliptic Curves Riemann Hypothesis Taking Square Roots Main Results The Idea of Using Group Isomorphism A Special Group The Power Formulas in G α Singular Curves with a Double Root The Square Root Algorithms Case q = 2 e 3 f t Other Cases Computing ζ 2 3 k Finding ζ r by Searching Even Polynomials Taking rth Roots Main Results The rth Roots Problem Step 1: Find a Suitable Element a Step 2: Find a Suitable l Step 3: Compute a Non-trivial Factor Computing a Primitive r 2 th Root of Unity The Algorithm Finding a Non-trivial Factor of Φ r 2(x) Method Method v
9 3.7.3 More Variations Solving Polynomial Equations Factoring by Searching Elliptic curve nth root problem A Probabilistic Algorithm Primality Testing rth Root Primality Test Proth s Theorem A Potentially Fast Primality Test The Algorithm Upper bounds of G Producing elements of G Cyclotomic polymonials Lower bound for G Evidence for Conjecture vi
10 List of Symbols (a, b) : the greatest common divisor of a and b [a] : an element in G α (see below), where a is in some finite field C : the set of complex numbers E(F ) : the set of points on the curve E over a field F E ns (F ) : the set of non-singular points of the curve E over a field F F q : the finite field with q elements F : a fixed algebraic closure of a finite field F G α : a special group defined in Section 2.3 ord a (b) : the order of b in (Z/aZ), given (a, b) = 1 Φ n (x) : the nth cyclotomic polynomial R(s) : the real part of a complex number s Z : the set of integers ζ n : a fixed primitive nth root of unity vii
11 Chapter 1 Introduction In this thesis, we are mainly interested in constructing deterministic polynomial-time algorithms for solving some computational problems that arise in number theory and cryptography. The problems we are interested in include finite field arithmetic, primality testing and elliptic curve arithmetic. We give a short overview of this thesis in Section 1.1. See [61], [60] and [62] for the related papers. Following the overview, we state some useful facts in the rest of this section. 1.1 Overview The main problem we consider in this thesis is the problem of solving polynomial equations over finite fields. Let F q denote a finite field with q elements. Let f(x) = a d x d + a d 1 x d a 0 F q [x] be a polynomial with a i F q for all i and a d 0. We assume deg f def = d = O(poly(log q)). Then, the problem is to find the solutions of f(x) = 0 over F q. (1.1.1) 1
12 The input parameters are F q and f(x). Since there are d coefficients in f, the input size is O(d log q) = O(poly(log q)). There are at most d solutions for equation (1.1.1), therefore, the output size is also O(d log q) = O(poly(log q)). Interestingly, there are efficient probabilistic algorithms, for example Berlekamp s algorithm [13], for this problem. These probabilistic algorithms work very well in practice. However, there is no known deterministic polynomial-time algorithm in the literature, even for solving quadratic equations over finite fields. For more background information about solving polynomial equations, see the introduction in Chapter 4. Our main contribution is showing a deterministic algorithm to solve equation (1.1.1) for arbitrary f. The proof is totally elementary and does not assume any unproven hypothesis. The algorithm is polynomial-time if F q is a finite field such that for each prime factor r of q 1, r is small and a primitive rth root of unity can be computed efficiently. We have the following theorem 1. Theorem Let q 1 = r e 1 1 r e m m be the prime factorization. Suppose r j = O(poly(log q)) and a primitive r j th root of unity can be computed efficiently for 1 j m. There is a deterministic polynomial time algorithm solving any polynomial equation with degree O(poly(log q)) over F q. The algorithm for solving polynomial equations is presented in Section 4.1. The algorithm relies on an algorithm for taking roots, which will be discussed in the next section. 1 Theorem and Theorem are the same. 2
13 1.1.1 Taking Square Roots and rth Roots In Chapter 2, we present an algorithm to take square roots. Clearly, the square root problem is equivalent to the problem of solving quadratic equations. For arbitrary finite fields F q and arbitrary β F q, there is no known deterministic polynomial-time algorithm computing the square roots of β. For arbitrary prime fields F p and β with small absolute value, the square roots of β can be computed by Schoof s square root algorithm [55], which is deterministic polynomial-time. However, Schoof s algorithm becomes exponential-time for β with large absolute value. Square roots over finite fields can be computed by probabilistic algorithms such as Tonelli-Shanks [63, 56]. Some of these probabilistic algorithms becomes deterministic polynomial-time if a quadratic nonresidue is given as an additional input. However, there is no known deterministic polynomial-time algorithms to find a quadratic nonresidue. Probabilistic algorithms for finding a quadratic nonresidue work very well in practice because half of the non-zero elements in a finite field 2 are quadratic nonresidues. For prime fields, a quadratic nonresidue exists in a small range if the Riemann Hypothesis is true (see [7]). For other results for the square root problem, see the introduction in Chapter 2. We present a novel idea to compute square roots over some families of finite fields. The problem of taking square root of β with arbitrary size β is first reduced to the problem of constructing a primitive rth root of unity, ζ r. In some cases, ζ r can be 2 We assume the characteristic of the field is odd since if the characteristic is even, the square root problem is easy. 3
14 constructed by taking square roots of some small elements b i F q, which can be done by Schoof s algorithm. In some other situations, ζ r can be constructed directly. One family of finite fields is described in the theorem 3 below. More generally, if all prime factors of q 1 are small and a primitive kth root of unity can be computed efficiently for certain factors k of q 1, then our square root algorithm is applicable to F q. See Section 2.1 for the other results. Theorem Let p 1 (mod 12) be a prime and q = p n = 2 e 3 f t + 1 for some n, e, f 1. Suppose t = O(poly(log q)). Both taking square roots in F q and finding a quadratic nonresidue in F q can be computed in deterministic polynomial time. In addition, we discuss how to construct primitive rth roots of unity, ζ r, in Chapter 2. The interesting cases are r q 1 and either r = 4 or r an odd prime. We summarize the cases that ζ r can be constructed in deterministic polynomial time below. Let p be the characteristic of F q. r = 4 and p 1 (mod 4). r = 3 and 3 is a square modp. r = 2 3 k + 1 for some k 1, p 1 (mod r) and p 13, 25 (mod 36). q = r e t + 1 with r + t = O(poly(log q)). In Chapter 3, the idea of our square root algorithm is generalized to take rth roots for some positive integer r with r = O(poly(log q)). The requirement of the finite fields is similar as in taking square roots. 3 Theorem and Theorem are the same. 4
15 1.1.2 Applications Based on our rth root algorithm, we construct a deterministic polynomial-time primality test for some forms of integers in Section 5.1. We have the following theorem 4. Theorem Let N = r e t + 1 for some prime r and some positive integers t and e with r e > t. There is an Õ(r2 (log 2 N)(t + r log N)) deterministic primality testing algorithm. If r is a small constant and t = O(log N), the running time is Õ(log3 N). In Section 4.2, we construct a deterministic polynomial-time algorithm to compute elliptic curve n th root by our algorithm for solving polynomial equations, Other Works In Section 3.7, we show a deterministic polynomial-time algorithm to compute a nontrivial factor of the r 2 th cyclotomic polynomial Φ r 2(x) over a finite field for some prime r. An efficient probabilistic algorithm for solving polynomial equations is presented in Section 4.3. We discuss a potentially fast primality test in Section Useful Facts We state some useful facts in this section. Most of the proofs will be skipped. For the topics in algorithms, see [36] and [25]. For background material about number theory and computational number theory, see [32], [22] and [57]. For infomation about finite fields and abstract algebra, see [42] and [8]. For material about elliptic curves, see [69] and [58]. For the topics in cryptography, see [65] and [38]. 4 Theorem and Theorem are the same. 5
16 1.2.1 Algorithms Deterministic algorithms always produce the same correct output. In contrast, probabilistic algorithms may sometimes give incorrect output or fail to give an output at all. An algorithm is polynomial-time if its running time is polynomial in the input size 5. Running time means the number of operations required by the algorithm in order to finish the computation. All running times in this thesis are measured in term of bit operations. We ignore logarithmic factors in running time and adopt the Õ( ) notation. For example, the running time of the Schönhage-Strassen integer multiplication algorithm [54] is O(n log n log log n), which will be denoted by Õ(n). Arithmetic Operations Clearly addition and subtraction over integers can be done in linear time (i.e. O(n), where n is the input size 6 ). Multiplication, division with remainder and computing the greatest common divisor (GCD) over integers can be implemented by fast fourier transform (FFT) and other fast methods in essentially linear time (i.e. Õ(n)). See [28], [35], [54], [64] and [24]. The case is similar when the operations are carried over finite fields and polynomial rings: addition and subtraction are O(n); multiplication, division and computing GCD are Õ(n). See [29] and [68]. 5 Output size is ignored since the output size is always polynomial in the input size for all the problems in considered this thesis. 6 For a positive integer N, we have n = O(log N) because N can be represented by O(log N) bits. 6
17 For all cases, exponentiation a e can be computed by successive squaring. It requires O(log e) multiplications Finite Fields A finite field (also called Galois field) has finitely many elements. We denote a finite field with q elements by F q. The number of elements in F q is always a prime power q = p n for some prime p and positive integer n. Conversely, there is a unique (up to isomorphism) finite field F q for any prime power q > 1. The prime p is called the characteristic of F q. If d n, then F p d is a subfield of F p n. The subfield F p is called the prime field of F q or a prime field. A prime field is unique up to unique isomorphism. Note that F p Z/pZ but F p n Z/p n Z for n > 1. Quadratic Residues and Nonresidues In F q, we have a q = a for all a F q. It is a generalization of Fermat s Little Theorem stated below. Theorem (Fermat s Little Theorem) For any prime p, a p a (mod p) for any integer a. (1.2.1) If q is even (equivalently, the characheristic of F q is 2), then for any element a F q, a = (a q/2 ) 2. The element a q/2 is a square root of a. Therefore, taking square roots over F q is trivial for q even. 7
18 Suppose q is odd. The multiplicative group F q has q 1 elements. Since F q is cyclic, there is a generator g F q such that F q = g = {1, g, g 2,, g q 2 }. The element g is also called a primitive element of F q. Squaring the elements of F q, we obtain the set of all squares QR def = { 1, g 2, g 4,, g q 3}. Since the product of two squares is a square and the inverse of a square is a square, QR is a subgroup of F q. Let NR def = F q \ QR = { g, g 3, g 5,, g q 2} = gqr. For any element a NR, the square root of a does not exist in F q. The elements in QR and the elements in NR are called quadratic residues and quadratic nonresidues. We show in Theorem below that the least 7 quadratic nonresidue in a prime field is a prime. We will discuss the problems of finding a quadratic nonresidue and taking square roots over finite fields in Chapter 2. Theorem Let p > 2 be a prime. The least quadratic nonresidue in F p is a prime. Proof. Let a be the least quadratic nonresidue. Suppose a = uv with 1 < u, v < a. Since a is the least quadratic nonresidue, u and v must be quadratic residues. However, the product uv is also a quadratic residue, which is a contradiction. 7 We consider the elements in F p are integers from 0 to p 1. 8
19 Enumerating The Elements In some algorithms given in the later chapters, a simple mechanism for enumerating a small portion of the elements in F q is required. In addition, we require the enumeration satisfying equation (1.2.3) below. For completeness, we illustrate a method to obtain an enumeration of half of the elements in any finite field F q with q = p n. The finite field F q can be viewed as a vector space over F p with dimension n. Let {T 0, T 1,, T n 1 } be a basis of F q over F p. For 1 m q 1, choose k such 2 that pk 1 2 < m pk Write m 1 pk 1 2 = a 0 + a 1 p + + a k 1 p k 1 + a k p k with 0 a k < p 1 2 and 0 a j < p for 0 j < k. The mth element of F q in our enumeration is defined to be a 0 T 0 + a 1 T a k 1 T k 1 + (a k + 1)T k, (1.2.2) Let element(m) be the procedure returning the mth element in F q. It is easy to see that element(m) element(j) for 1 j, m q 1 2. (1.2.3) Elliptic Curves An elliptic curve E defined over a finite field F can be represented by the Weierstrass equation E : y 2 + a 1 xy + a 3 y = x 3 + a 2 x 2 + a 4 x + a 6 for some a 1, a 2, a 3, a 4, a 6 F. Denote the points on E with coordinates in F by E(F ). Interestingly, E(F ) is a well-defined group, which has a lot of applications in number theory and cryptogra- 9
20 phy. The applications include primality proving [9], integer factoring [33], public key cryptography [37] and identity based encryption [17]. Computing Points Fix the x-coordinate to x 0 F. If the quadratic equation f(y) = y 2 + (a 1 x 0 + a 3 )y (x a 2 x a 4 x 0 + a 6 ) = 0 has solutions in F, say y 1 and y 2, then (x, y 1 ) and (x, y 2 ) are points on E(F ). Similarly, fixing the y-coordinate to some y 0 F, if the cubic equation, g(x) = x 3 + a 2 x 2 + (a 4 a 1 y 0 )x + a 6 a 3 y 0 y 2 0 = 0 has solutions x 1, x 2, x 3 F, then (x 1, y 0 ), (x 2, y 0 ) and (x 3, y 0 ) are points on E(F ). In either case, we need to solve a polynomial equation over F. It is obvious that solving quadratic equations and taking square roots are equivalent problems. By some algebraic manipulation, for example Cardano s method, cubic equations can be solved by taking square roots and cubic roots. We will describe how to take rth roots over finite fields in Chapter 3 and how to solve polynomial equations over finite fields in Chapter 4. In addition, the elliptic curve nth root problem will be discussed in Chapter Riemann Hypothesis The Riemann Hypothesis (RH) is one of the most important open problems in mathematics. Most mathematicians believe RH is true. RH has a deep connection to 10
21 the distribution of prime numbers. Occasionally, there are results in computational number theory that assume RH or its generalizations. One typical example is Miller s primality test [44]. RH is not in our scope of study. We informally describe RH and two common generalizations below. The Riemann zeta-function over the complex numbers is defined as ζ(s) = n=1 1 n s for s C, R(s) > 1 (1.2.4) and then analytically continued to all s 1. The function ζ(s) has trivial zeros at the negative even integers 2, 4,. The Riemann Hypothesis, introduced in 1859, states that the non-trivial zeros of ζ(s) have real part equal to 1/2 (i.e. R(s) = 1/2). See [52]. Extended Riemann Hypothesis The Dirichlet L-function over the complex numbers is defined as L(χ, s) = n=1 χ(n) n s for s C, R(s) > 1 (1.2.5) and then analytically continued to all s, where χ is a non-trivial Dirichlet character. The Extended Riemann Hypothesis (ERH) says that for any non-trivial Dirichlet character χ and any s C with 0 < R(s) 1, if L(χ, s) = 0, then R(s) = 1/2. Generalized Riemann Hypothesis Let K be a number field and O K be the set of algebraic integers in K. The Dedekind zeta-function of K is defined as ζ K (s) = I 0 1 (NI) s for s C, R(s) > 1 (1.2.6) 11
22 and then analytically continued to all s 1, where I runs through all non-zero ideals of O K and N denotes the norm function such that NI def = [O K : I]. The Generalized Riemann Hypothesis (GRH) states that for any s C with 0 < R(s) 1, if ζ K (s) = 0, then R(s) = 1/2. 12
23 Chapter 2 Taking Square Roots In this chapter, we discuss the square root problem over finite fields. Let F q be a finite field with q elements. Suppose q is odd in this chapter. Otherwise, the square root problem is trivial. Let β be a square in F q. The square root problem over F q is to find α F q such that α 2 = β, given F q and β as inputs. The element α is called a square root of β. Note that α F q is also a square root of β. Denote a fixed square root of β by β or β 1/2. The problem of taking square roots over finite fields and the problem of constructing quadratic nonresidues over finite fields are closely related. If one can take square roots, one can compute ( 1) 1/2 = 1, ( 1) 1/4 = ( 1) 1/2, ( 1) 1/8 = ( 1) 1/4,, and eventually obtain a quadratic nonresidue because the 2-part of the multiplicative group of the field is finite. Conversely, given a quadratic nonresidue as an input, there are deterministic polynomial time algorithms [63], [56] and [2] for computing square roots. There is no known deterministic polynomial-time algorithm for constructing quadratic 13
24 nonresidues over a general finite field. However, the problem of deciding whether an element is a quadratic nonresidue in a finite field F q is easy since, for any non-zero element a F q, a is a quadratic nonresidue if and only if a (q 1)/2 = 1. Since the number of quadratic nonresidues is equal to the number of quadratic residues in F q, one could randomly pick an element a F q and then test whether a is a quadratic nonresidue by checking a (q 1)/2 = 1 in F q. Such simple strategy gives an efficient probabilistic algorithm for finding a quadratic nonresidue in F q. There are several efficient probabilistic algorithms for taking square roots in finite fields. Tonelli-Shanks [63, 56], Adleman-Manders-Miller [2] and Cipolla-Lehmer [20, 40] require a quadratic nonresidue as an input. Berlekamp-Rabin [14, 50] takes square roots by polynomial factoring over finite fields. The idea of Peralta [51] is similar to Berlekamp-Rabin. For other results, see [10], [11], [12], [15], [18], [43], [45] [46] and [66]. For the following, let F p be the finite field with p elements for some odd prime p. By assuming the ERH (see Section 1.2.4), Ankeny [7] showed that the least quadratic nonresidue in F p is less than c log 2 p for some constant c. It leads to a deterministic polynomial time algorithm for finding the least quadratic nonresidue in F p. The least quadratic nonresidue must be a prime (see Theorem 1.2.2). Since the problem of deciding quadratic nonresidues is easy, one could evaluate the Legendre symbol ( r p) r (p 1)/2 (mod p) with the primes r = 2, 3, 5, 7, until a quadratic nonresidue is found. Such quadratic nonresidue must be the least one. Given β a square in F p, Schoof [55] showed a deterministic algorithm for computing 14
25 square roots of β in F p with running time O(( β 1/2+ɛ log p) 9 ) bit operations 1 for all ɛ > 0. Thus, his algorithm is polynomial time with any constant β. We show below that a quadratic nonresidue in F p can be computed in deterministic polynomial time for primes p with p 1 (mod 240). Let ζ r be a primitive rth of unity. If p 1 (mod 16), at least one of ζ 2 = 1, ζ 4 = ± 1, ζ 8 = ± 1 2 (1 ± 1) is a quadratic nonresidue. Therefore, a quadratic nonresidue can be computed by Schoof s algorithm in this case. Suppose p 1 (mod 4) for the following. If p 2 (mod 3), then ( 3 p) = ( p 3) = ( 2 3) = 1. So 3 is a quadratic nonresidue. Similarly, if p 2, 3 (mod 5), then 5 is a quadratic nonresidue. Suppose p 4 (mod 5). In this case, 5 is a square mod p. Let ζ 5 = a + a 2 4 2, where a = (2.0.1) 2 Then, ζ 5 is a primitive 5th root of unity. Note that a F p but ζ 5 F p. Therefore, a 2 4 must be a quadratic nonresidue. In conclusion, the problem of finding a quadratic nonresidue in F p is hard only if p 1 (mod 16), p 1 (mod 3) and p 1 (mod 5), which is p 1 (mod 240). We present our main results and the idea behind them in Section 2.1 and Section 2.2, respectively. In Section 2.3, we construct a special group and discuss the computation of the operations in that group. In Section 2.4, we provide algorithms for taking square roots and finding quadratic nonresidues in finite fields. 1 β denotes the absolute value of β, where β is considered as an integer in ( p 1 2, p 1 2 ]. 15
26 2.1 Main Results We show deterministic polynomial time algorithms (without any unproven assumption) for computing square roots and finding quadratic nonresidues in some families of finite fields as stated in the following theorems. In some particular finite fields F q, there are algorithms for taking square roots with Õ(log2 q) bit operations. Theorem Let p 1 (mod 12) be a prime and q = p n = 2 e 3 f t + 1 for some n, e, f 1. Suppose t = O(poly(log q)). Both taking square roots in F q and finding a quadratic nonresidue in F q can be computed in deterministic polynomial time. Theorem Let p be a prime with p 13, 25 (mod 36). Let r 1, r 2,, r m be m distinct primes, where r j = 2 3 k j + 1 < M with k j 0 for some upper bound M and j = 1, 2,, m. Let q = p n = 2 e r f 1 1 r f 2 2 r fm m t + 1 for some n, e, f 1, f 2,, f m 1. Suppose p 1 (mod r 1 r 2 r m ) and M + t = O(poly(log q)). Both taking square roots in F q and finding a quadratic nonresidue in F q can be computed in deterministic polynomial time. Theorem Let p, r be primes and q = p n = r e t + 1 for some n, e 1. Suppose r + t = O(poly(log q)). Both taking square roots in F q and finding a quadratic nonresidue in F q can be computed in deterministic polynomial time. 2.2 The Idea of Using Group Isomorphism Let H be a cyclic group. Let G be another group such that G is isomorphic to H. However, we do not know the exact isomorphism, i.e. the isomorphism formula 16
27 contains an unknown parameter. Denote the isomorphism from G to H by ψ. Pick a non-identity element g in G. Let d be the order of g. Then, ψ(g) is an order d element in H. Suppose we can compute an element ζ H with order d. We must have ψ(g) = ζ j for some j (Z/dZ). since the group H is cyclic. If ψ is a simple formula and d is small, we can recover ψ by trying each possible j. We further elaborate the group isomorphism idea for computing square root below. Let F q be a finite field with q elements. Suppose β F q is a square. Then, α 2 = β for some α F q. Let G α be a group with the following properties: (i) the group operation in G α is efficiently computable with β but without the knowledge of α, (ii) G α is isomorphic to the multiplicative group F q, (iii) the isomorphism ψ α : G α F q depends on α as a parameter. Since the isomorphism ψ α depends on α while the value of α is unknown, ψ α and its inverse are not at first efficiently computable. We try to match certain elements in G α with the corresponding elements in F q. In the cases we consider, a matched pair reveals the isomorphism ψ α, and therefore α is obtained. Let r be an odd prime factor of q 1. Then, q = r e t + 1 for some t, e > 0 with (t, r) = 1. Denote the elements of G α as [g]. Suppose the order of [g] is rs for some 17
28 s > 0. The order of the element [a] = [g] s is r. Note that there are (r e 1)t possible elements of [g] leading to an element [a] with order r. Let ζ r be a primitive rth of unity in F q and suppose ζ r could be computed efficiently. For some 0 < j < r, the element [a] with order r must be matched up with ζr, j i.e. ψ α ([a]) = ζ j r, since F q is cyclic. If both the value of [a] and the value of ζ j r are known, the parameter α of ψ α can be computed. Suppose r is small. For j = 1, 2,, r 1, compute α = α j from ψ α, [a], and ζ j r. Check whether α 2 j = β. Eventually, the square roots of β are obtained. 2.3 A Special Group Let F q be a finite field with q odd. Define the set G α def = {[a] : a F q, a ±α} for some α F q. For distingishing the elements in G α and the elements in F q, we denote the former by [ ]. The number of elements in G α is q 2. By adding the element [ ] to G α, we obtain G α def = G α {[ ]}. 18
29 Define an operator in G α as following: [a] G α and [a 1 ], [a 2 ] G α with a 1 + a 2 0, [a] [ ] = [ ] [a] = [a], (2.3.1) [a 1 ] [ a 1 ] = [ ], (2.3.2) [a 1 ] [a 2 ] = [ ] a1 a 2 + α 2. a 1 + a 2 (2.3.3) Interestingly, (G α, ) is a well-defined group, which is isomorphic to the multiplicative group F q. The group G α provides a new computational point of view of the group F q. We will use G α to construct our square root algorithm later. Theorem (G α, ) is an abelian group with identity [ ]. The group G α is isomorphic to F q. Proof. Define a bijective mapping ψ : G α F q, [ ] 1, [a] a + α a α (2.3.4) with inverse [ ] α(b + 1) ψ 1 : F q G α, 1 [ ], b. (2.3.5) b 1 A straightforward calculation shows that ψ is a homomorphism. Note that G α is cyclic since F q is. Since q is odd, there is a unique order 2 element in F q or G α. Clearly, 1 is the order 2 element in F q. For any α F q, we have ψ([0]) = 0 + α 0 α = 1. Therefore, [0] is the only order 2 element in G α, independent of the choice of α. 19
30 2.3.1 The Power Formulas in G α Denote the power of an element in G α by [a] k def = [a] [a] [a] } {{ } k We have the following formula for computing [a] k. for all [a] G α, k > 0. Lemma Let [a] G α and k > 0. If the order of [a] does not divide k, then [a] k = [α (a + ] [ α)k + (a α) k a k + ( ] k = 2) a k 2 α 2 + (a + α) k (a α) k ka k 1 + (. (2.3.6) k 3) a k 3 α 2 + Proof. If the order of [a] does not divide k, then ψ([a]) k 1. We have [a] k = ψ 1 (ψ([a]) k ) [ ] = α ψ([a])k + 1 ψ([a]) k 1 = [α (a + ] α)k + (a α) k. (a + α) k (a α) k The last equality in equation (2.3.6) can be obtained by expanding (a ± α) k. Define the following polynomials in F q [x] for k 0, γ k (x) = (x + α)k + (x α) k 2 Ψ k (x) = (x + α)k (x α) k 2α k 2 = = j=0 k 1 2 j=0 ( ) k x k 2j α 2j, (2.3.7) 2j ( ) k x k 1 2j α 2j. (2.3.8) 2j + 1 Note that γ k (x), Ψ k (x) F p [α 2 ][x]. The polynomials γ k and Ψ k can be defined recursively. Lemma For k 0, we have the following recursion equations: γ k+1 = xγ k + α 2 Ψ k, (2.3.9) Ψ k+1 = γ k + xψ k. (2.3.10) 20
31 Proof. By equations (2.3.7) and (2.3.8), xγ k + α 2 Ψ k = x 2 ((x + α)k + (x α) k ) + α 2 ((x + α)k (x α) k ) = γ k+1 ; γ k + xψ k = (x + α)k + (x α) k 2 + x (x + α)k (x α) k 2α = 1 2 (x + α)k (1 + x α ) (x α)k (1 x α ) = Ψ k+1. The lemma follows. By some algebraic maniplations, the polynomials γ 2k, Ψ 2k, γ 2k+1 and Ψ 2k+1 can be written in terms of γ k, Ψ k, γ k+1 and Ψ k+1 as shown in Lemma As a consequence, only O(log n) polynomial multiplications are required for computing γ n and Ψ n. Lemma For k 0, γ 2k = γk 2 + α 2 Ψ 2 k, (2.3.11) Ψ 2k = 2γ k Ψ k, (2.3.12) γ 2k+1 = γ k γ k+1 + α 2 Ψ k Ψ k+1, (2.3.13) Ψ 2k+1 = γ k Ψ k+1 + γ k+1 Ψ k. (2.3.14) Proof. By Lemma 2.3.3, ( ) ( ) ( ) ( ) γk α 2 Ψ k x α 2 γk 1 α = 2 Ψ k 1 x α 2 k j ( ) γj α = 2 Ψ j Ψ k γ k 1 x Ψ k 1 γ k 1 1 x Ψ j γ j ( ) ( ) γ1 x for any k > 0 and 1 j k. We have =. Then, 1 Ψ 1 ( ) x α 2 k ( ) x α 2 k 1 ( ) ( ) γ1 α = 2 Ψ 1 γk α = 2 Ψ k 1 x 1 x Ψ 1 γ 1 Ψ k γ k (2.3.15) 21
32 for any k > 0. Finally, by equation (2.3.15), ( ) ( ) γ2k x α 2 k ( ) ( ) ( γk γk α = = 2 Ψ k γk 1 x which implies Ψ 2k Ψ k Ψ k γ k Ψ k ), γ 2k = γ 2 k + α 2 Ψ 2 k, Ψ 2k = 2γ k Ψ k ; and ( γ2k+1 Ψ 2k+1 ) ( ) x α 2 k ( ) ( ) ( ) γk+1 γk α = = 2 Ψ k γk+1, 1 x Ψ k+1 Ψ k γ k Ψ k+1 which implies γ 2k+1 = γ k γ k+1 + α 2 Ψ k Ψ k+1, Ψ 2k+1 = γ k Ψ k+1 + γ k+1 Ψ k. The lemma follows. We use the polynomials γ k and Ψ k to compute the power of an element [a] k in G α. With the recursion equations, [a] k can be computed efficiently by polynomial operations in F q [x]. It is not hard to see that the roots of Ψ d, together with [ ], are the elements in the d-torsion subgroup of G α. Proposition Let [a] G α. For d > 0, [a] d = [ ] if and only if Ψ d (a) = 0. Proof. Since [a] [ ], we have d > 1 and the order of [a] not dividing d 1. Then, [a] d = [ ] [a] d 1 = [ a] by equation (2.3.2) γ d 1 (a) Ψ d 1 (a) = a by Lemma Ψ d (a) = 0 by equation (2.3.10). 22
33 Note that if Ψ d (a) = 0, we have Ψ d 1 (a) 0. Otherwise, if Ψ d 1 (a) = 0, equation (2.3.10) implies γ d 1 (a) = 0. Then, (a + α) d 1 = 2γ d 1 (a) + 2αΨ d 1 (a) = 0 leads to a contradiction Singular Curves with a Double Root We can reinterpret the group law in terms of singular elliptic curves. Consider the curve E : y 2 = x 2 (x + α 2 ). Let E(F q ) be the points on the curve with coordinates in F q. The only singular point on E(F q ) is (0, 0), which is a double root. Let E ns (F q ) be the non-singular points on E(F q ). Then, the mapping τ : E ns (F q ) F q, 1, (x, y) (y/x) + α (y/x) α is an isomorphism from E ns (F q ) to F q. The inverse is τ 1 : F q E ns (F q ), 1, λ ( ) 4α 2 λ (λ 1), 4α3 (λ + 1). 2 (λ 1) 3 For proofs and details, see [69] p56 - p59. Together with the isomorphism ψ, we have G α F q E ns (F q ). The isomorphism from E ns (F q ) to G α is surprisingly simple: ψ 1 τ : E ns (F q ) G α, [ ], (x, y) [y/x]. It is possible to formulate our algorithms given in the later sections in terms of the language of elliptic curves. 23
34 2.4 The Square Root Algorithms Suppose β is a square in F q for some odd q. We have α 2 = β for some α F q. Consider the abelian group G α defined in the previous section. Let ζ m be a primitive mth root of unity in F q, a fixed algebraic closure of F q. If m divides q 1, then ζ m is in F q. We have the following proposition. Proposition Let [0] [a] G α. Suppose [a] d = [ ] for some d > 0. Then, α = ± a(ζk d 1) ζ k d + 1 for some 0 < k < d 2. Proof. Since ψ is an isomorphism, ψ([a]) d = 1 in F q. Therefore, ψ([a]) = ζ j d for some 0 < j < d. We have j d 2, otherwise, ζj d = 1. But [a] [0], which is the only order 2 element in G α. Then, [ ] [a] = ψ 1 (ζ j d ) = α(ζ j d + 1) ζ j d 1, which implies α = a(ζj d 1). If j < d, we prove the proposition by setting k = j. If ζ j d +1 2 j > d 2, let k = d j < d 2. Finally, a(ζ k d 1) ζ k d + 1 which implies the proposition. = a(ζ j d 1) ζ j d + 1 = a(1 ζj d ) 1 + ζ j d = α, Proposition suggests a method to compute α. It requires (1) an element [a] G α such that [a] d = [ ], (2) a primitive dth root of unity ζ d F q and (3) the index k in the proof. The power of an element [a] n has to be efficiently computable. 24
35 Lemma Given β a square in F q, the group operation and the power of an element in G α can be computed in polynomial time without the knowledge of α. Proof. Clearly, the computation of the group operation involving the identity element or the power of the identity element is trivial. For any [g 1 ], [g 2 ] G α, by equations (2.3.2 and 2.3.3), { [ ], if g1 = g 2, [g 1 ] [g 2 ] = [ ] g 1 g 2 +β g 1 +g 2, otherwise. (2.4.1) Therefore, the group operation with any elements can be computed in polynomial time. For any [g] G α, [g] 2 can be computed by equation (2.4.1). Then, [g] k can be evaluated efficiently by the successive squaring method. Another method for computing [g] k (2.3.6). If Ψ k (g) = 0, then [g] k = [ ]. Otherwise, [g] k = [ γk (g) Ψ k (g) is due to Proposition and equation ]. The polynomials γ k (g) and Ψ k (g) can be evaluated by the recursion equations in Lemma and Note that the coefficients in γ s, Ψ s and the recursion equations only involve integers and β, but not α. The running time for computing a group operation is Õ(log q) since multiplication and division in finite fields can be done in Õ(log q) (see Section 1.2.1). Then, the running time for computing [g] k for k < q is Õ(log2 q) for either of the methods described in the proof of the Lemma above. In the following sections, we present deterministic polynomial time algorithms to find square roots for some families of finite fields. Let element(m) be a procedure returning the mth element of F q in a fixed enumeration such that the procedure 25
36 element satisfies equation (1.2.3). Let power(g, k, β) denote a procedure computing [g] k in G α Case q = 2 e 3 f t + 1 Let F q be the finite field with q elements and characteristic p such that q = 2 e 3 f t + 1 and p 1 (mod 12). Note that e 2 and f 1 since p 1 (mod 12). Then, 1 and 3 are squares in the prime field F p. In this case, 1 and 3 in F p can be computed by Schoof s algorithm. We have the Algorithm for computing square roots in F q. Algorithm squareroot(β) { for m = 1 to t { Set g = element(m) if g 2 = β return ±g else if power(g, q 1 2 e 1, β) [ ] return matchzeta4(g, β) } } else if power(g, q 1 3 f, β) [ ] return matchzeta3(g, β) matchzeta4(g, β) { find the largest k such that power(g, q 1, β) = [ ] 2 k compute [a] = power(g, q 1, β) 2 k+2 return ±a 1 } matchzeta3(g, β) { 26
37 } find the largest k such that power(g, q 1, β) = [ ] 3 k compute [a] = power(g, q 1, β) 3 k+1 return ±a 3 Lemma Algorithm always returns the square roots of β. Proof. Inside the for-loop, if g 2 = β, clearly the Lemma is true. Let α 2 = β. Suppose g ±α. If [g] q 1 2 e 1 [ ], there exists 0 k < e 1 such that [g] q 1 2 k = [ ] and [g] q 1 2 k+1 [ ]. Let [a] = [g] q 1 2 k+2. Then, [a] 4 = 1. By proposition 2.4.1, α = ± a(ζ 4 1) ζ 4 +1 = ±a 1. Similarly, if [g] q 1 3 f [ ], there exists 0 k < f such that [g] q 1 3 k = [ ] and [g] q 1 3 k+1 [ ]. Let [a] = [g] q 1 3 k+1. Then, [a] 3 = 1. By proposition 2.4.1, α = ± a(ζ 3 1) ζ 3 +1 = ±a 3, where ζ 3 = 1± 3 2. We show that the algorithm always returns an answer. If [g] q 1 2 e 1 = [g] q 1 3 f = [ ], the order of [g] divides 2t. There is a unique subgroup H of G α with 2t elements since G α is cyclic. Then, [g] H. Since [ g] = [g] 1, we have [ g] H. We also have [ ], [0] H. Let g m = element(m) for 1 m t. There are 2t + 2 elements in the set {[ ], [0], [±g 1 ], [±g 2 ],, [±g t ]} by the property of the element() procedure (see equation (1.2.3)). Therefore, there exists some 1 m 0 t such that g m0 H. Then, g m0 leads to the algorithm returning an answer. For running time, element(m), g 2 and power(g, j, β) for j < q can be computed in Õ(log q), Õ(log q) and Õ(log2 q), respectively. Once a condition in one of the three if-statements is satisfied, the algorithm must return without further looping. So it needs Õ(t log2 q) for finishing the loop. 27
38 If g 2 = β, no further operations is required. If power(g, q 1 2 e 1, β) [ ], finding the required k needs Õ(log2 q), computing the power is Õ(log2 q) and computing the square roots of 1 in F p by Schoof s algorithm is O(log 9 p). The overall running time is Õ(log2 q + log 9 p). It is similar for the case power(g, q 1 3 f, β) [ ]. The running time is also Õ(log2 q + log 9 p). Therefore, the running time of the Algorithm is Õ(t log2 q + log 9 p). Proof of Theorem Since t = O(poly(log q)), square roots in F q can be computed by Algorithm with running time Õ(poly(log q) log2 q + log 9 p). For finding a quadratic nonresidue, we first take square root of 1 and obtain ( 1) 1/4. Then, keep taking square root of ( 1) 1/4, ( 1) 1/8,, ( 1) 1/2e 1. At last, we obtain ( 1) 1/2e which is a quadratic nonresidue in F q. Clearly, such algorithm is polynomial time Other Cases Algorithm in the previous section can be generalized as below. Lemma Let p 1, p 2,, p m be m distinct odd primes such that p j < M for some upper bound M. Let q = p n = 2 e 0 p e 1 1 p e 2 2 p em m t+1 with e 0 2, e j 1 and (2p j, t) = 1 for j = 1, 2,, m. Suppose M + t = O(poly(log q)) and ζ 4, ζ p1, ζ p2,, ζ pm F q are polynomial time computable. Then, there is a deterministic polynomial time algorithm for taking square roots and finding quadratic nonresidues in F q. Sketch of proof. Since M + t = O(poly(log q)) and ζ p1, ζ p2,, ζ pm F q can be computed in polynomial time, a deterministic polynomial time algorithm similar to Algorithm can be defined for taking square roots in F q. Note that for p j > 3, 28
39 once an order d element [g] G α with p j d is found, we could compute an order p j element in G α and match it up with ζ pj as shown in Algorithm below with r = p j (see also Proposition 2.4.1). Then, finding quadratic nonresidues can also be done in deterministic polynomial time For the prime 2, we have ζ 2 = 1. The relation ψ([0]) = 1 is independent of α. An order 4 element in G α and a 4th root of unity ζ 4 F q are required instead. Therefore, if 1 F q can be computed efficiently, the 2-part of F q can be handled. Algorithm matchzeta(r, ζ r, g, β) { } find the largest k such that power(g, q 1, β) = [ ] r k compute [a] = power(g, q 1, β) r k+1 ( ) find j {1, 2,, (r 1)/2} such that a(ζ j 2 r 1) = β return ± a(ζj r 1) ζ j r+1 ζ j r+1 For example, let p be a prime and r be a Fermat prime (i.e. r = 2 2k + 1 for some k 0). The rth root of unity ζ r can be written in terms of square roots (e.g. equation (2.0.1)) by Gaussian period theory. Suppose taking square roots in F p can be done in polynomial time (e.g. p 3, 5, 6 (mod 7) or p 1 (mod 240) or p = 2 e 3 f s + 1 for some small s). Then, ζ r can be computed in polynomial time. For any q = r e 1 1 r em m t + 1 with (1) q a power of p, (2) r 1,, r m Fermat primes and (3) t = O(poly(log q)), taking square roots in F q can be done in polynomial time. In particular, let r = 5 and p 1 (mod 20). Suppose taking square roots in F p can be done in polynomial time. Then, a 2 4 in equation (2.0.1) is a square in F p and 29
40 ζ 5 F p can be computed in polynomial time. In this case, for any q = p n = 2 e 2 5 e 5 t+1 with t = poly(log q), taking square roots in F q can be done in polynomial time Computing ζ 2 3k +1 Suppose p be a prime with p 1 (mod 4) and p 4, 7 (mod 9). We show in Lemma below that cubic roots in F p can be computed efficiently. Let r = 2 3 k + 1 be a prime for some k 1. The appendix in [61] shows a method to compute ζ r in deterministic polynomial time. Therefore, the r-part of F q can be handled. Lemma Let p be a prime with p 1 (mod 4) and p 4, 7 (mod 9). If b is a cubic residue in F p, cube roots of b can be computed in polynomial time. Proof. Let ζ 3 = 1± 3 2 F p, which can be computed by Schoof s algorithm in polynomial time. Since b is a cubic residue in F p, we have b (p 1)/3 = 1. If p 4 (mod 9), let a = b (2p+1)/9. Then, a 3 = b (2p+1)/3 = b 1+2(p 1)/3 = b. Therefore, b (2p+1)/9, b (2p+1)/9 ζ 3 and b (2p+1)/9 ζ3 2 are cube roots of b. Similarly, if p 7 (mod 9), let a = b (p+2)/9. Then, a 3 = b (p+2)/3 = b 1+(p 1)/3 = b. Therefore, b (p+2)/9, b (p+2)/9 ζ 3 and b (p+2)/9 ζ 2 3 are cube roots of b. Clearly, every step can be computed in polynomial time and so the cube roots of b can be. Proof of Theorem Since p 13, 25 (mod 36), cubic roots in F p can be computed in polynomial time by Lemma Compute 1, 3, r j by Schoof s algorithm. Then compute ζ 3 = 1± 3 2 and ζ 4 = ± 1. With p 1 (mod r j ) and r j = O(poly(log q)), ζ rj can be computed in polynomial time (see the appendix in [61]) for j = 1, 2,, m. Finally, Lemma implies the theorem. 30
41 2.4.4 Finding ζ r by Searching In the previous discussions, we first reduce the square root problem for arbitrary β to the problem of finding primitive roots of unity, which is further reduced to the square root problem for constant size β. Then, Schoof s algorithm can be used to compute the square roots of constant size β. In this section, we show another method to compute primitive roots of unity without the need of taking square roots. Let p, r be primes and q = p n = r e t + 1 for some n, e, t 1. Let H be the subgroup of F q with t elements. Let g m = element(m) be the mth element in F q (see equation (1.2.2)). Consider the set {g 1, g 2,, g t+1 } with t + 1 elements. There exists an element g m0 not in H for 1 m 0 t + 1. If t is small (i.e. r e is large), such m 0 can be found. Let d be the order of g m0. We have r d and ζ r = g d/r m 0 is an rth root of unity in F q. We have Algorithm below for finding ζ r with running time Õ(t log 2 q), which is faster than our previous methods for computing a root of unity. Algorithm findzeta(r) { } for m = 1 to t + 1 if g m (q 1)/re 1, where g m = element(m) find the largest k such that g m (q 1)/rk = 1 and then return g (q 1)/rk+1 m An algorithm similar to Algorithm can be constructed for computing the square roots. We have a for-loop, which is similar to the for-loop in Algorithm 2.4.3, in the algorithm. The running time of the for-loop is Õ(t log2 q). Algorithm (or matchzeta4() in Algorithm if r = 2) is used for matching the elements. The running time is Õ((log q + r) log q). Compute ζ r (or ζ 4 if r = 2) by Algorithm 31
42 The total running time is Õ((t log q + r) log q). If t is a small constant and r = O(log q), the running time becomes Õ(log2 q). For example, if p = 3 e is a prime, the running time of computing square roots in F p is Õ(log2 p). In particular, p is a prime for e = 569. Proof of Theorem Since t = O(poly(log q)), ζ r (or ζ 4 if r = 2) can be computed in polynomial time by Algorithm Together with r = O(poly(log q)), Lemma implies the theorem. If n is large, we have a better strategy for computing ζ r. Let F q = F p [x]/f(x) for some monic irreducible polynomial f(x) F p [x] with degree n. For 0 k < p, let S k = { ± k (x + m) e m F q : e m 0 and m=0 } k e m < n. m=0 be subsets of F q. All the elements in S k are distinct. The size of S k is n 1 ( ) ( ) j + k 1 n + k 1 S k = 2 = 2. j k j=0 Let H F q be the subgroup of F q with t elements. If S k > H = t, there exists x + m 0 H for some 0 m 0 k. Find the largest d such that (x + m 0 ) (q 1)/rd = 1. Then ζ r = (x + m 0 ) (q 1)/rd+1 is an rth root of unity in F q. For example, suppose n = log 2 p + 1 < p 1 and t < By Lemma below, ( 2 log 2 ) p p S k = 2 log 2 > 22 log2 > p log 2 p p2 log p 4 log p. Set k = log2 p. p2 log p 4 log p > t. There exists 0 m 0 log 2 p such that the order of x + m 0 equals rs for some s > 0. Then, ζ r = (x + m 0 ) s F q can be computed in polynomial time. 32
43 Lemma We have the following lower bound for the central binomial coefficient ( ) 2N > 22N 1 for N > 1. N N Proof. We show it by induction. For N = 2, we have ( ) 4 2 = 6 > 2 8. For k > 2, assume ( ) 2(k 1) k 1 > 2 2k 3 k 1. Then, ( ) 2k = k 2(2k 1) k ( ) 2k 2 > k 1 (2k 1)22k 2 k k 1 > 22k 1 k, since 2k 1 2 k(k 1) > 1 for k > Even Polynomials Let β be a non-zero square over some finite field F. The problem of computing the square roots of β is obviously equivalent to the problem of factoring x 2 β. It is possible to modify our square root algorithms (e.g. Algorithm 2.1.1) to find a non-trivial factor of x 2 β. The idea is to do the computation over the ring F [x]/(x 2 β), instead of G α. In Chapter 3, we will use this idea to generalize our square root algorithm to take rth roots. For taking rth roots, we will work in the ring F [x]/(x r θ), where θ is an rth power over F. Let f(x) F [x] be an even polynomial (i.e. f(x) = f( x)) such that f is a product distinct 2 of linear polynomials. Then, f(x) = i (x2 β i ) for some distinct squares β i F. In this case, we can modify our square root algorithm to work on the ring F [x]/(f(x)) for finding a non-trivial factor of f. The modification is similar 2 If f has repeated factors, it is easy to find a non-trivial factor of f. See Chapter 4, [71] and [29] for details. 33
44 to the rth root algorithm shown in Chapter 3. Since we already have an algorithm for solving arbitrary polynomial equations in Chapter 4, we skip the details of how to do the modification in this special case. 34
45 Chapter 3 Taking rth Roots In this chapter, we extend the square root algorithms discussed in the previous chapter and show deterministic polynomial time algorithms for taking rth roots in some finite fields. Like the relationship between taking square roots and constructing quadratic nonresidues, the problem of constructing rth nonresidues, r a small positive integer and r not the characteristic of the field, is polynomial time reducible to the problem of taking rth roots, and vice versa. Clearly, if we can take rth roots, we can first pick a non-zero, non-identity element in a finite field, then keep taking rth roots and finally obtain an rth nonresidue. For the converse, Shanks square root algorithm [56] can be generalized to take rth root with a given rth nonresidue. In [12], Barreto and Voloch showed deterministic polynomial time algorithms for taking rth root in the finite field F q when (r, q 1) = 1 or r q 1 (i.e. r q 1 and ((q 1)/r, r) = 1). Buchmann and Shoup [18] provided a deterministic algorithm for constructing kth power nonresidues over finite fields. Their algorithm is polynomial time under the assumption of ERH (see Section 1.2.4). For other related results, see 35
46 the introduction in the previous chapter. 3.1 Main Results We give a definition of a family of finite fields below. Definition Let F t be a family of finite fields such that for all F F t, F has q elements with (i) q = r e 1 1 r em m t + 1, (ii) r 1,, r m are distinct primes and (t, r 1 r m ) = 1, (iii) e j 1 for 1 j m, and (iv) r r m + t = O(poly(log q)). (v) a primitive r j th root of unity ζ rj can be computed efficiently for 1 j m. Informally, F t is a set of finite fields in which a primitive lth of unity can be computed for all prime factors l of q 1 except for l t. For deterministic polynomial time algorithms constructing primitive rth roots of unity over finite fields, see the previous chapter or [61]. Denote the union of all F t for t 1 by F def = t 1 F t. (3.1.1) Note that all prime factors of q 1 are small for F q F. Therefore, the factorization of q 1 can be computed efficiently. The main results are summarized in the theorems below. 36
47 Theorem Let F q F. For r {r 1,, r m }, there is a deterministic polynomial time algorithm computing an rth root of any rth residue in F q. Equivalently, there is a deterministic polynomial time algorithm constructing an rth nonresidue in F q. Theorem Let F q F 1. There is a deterministic polynomial time algorithm constructing a primitive element in F q. Proof. For any F q F 1, an r i th nonresidue ζ r e i i F q can be computed in deterministic polynomial for each i by Theorem Then the product m i=1 ζ r e i i is a primitive element in F q. 3.2 The rth Roots Problem Let F q F t (see Definition 3.1.1) be a finite field with q elements. Suppose β = α r for some α F q and some integer r > 1. (3.2.1) The problem of taking rth roots over F q is to find α, given a finite field F q, an element β and an integer r. If q 1 is not divisible by r 2, we can compute α easily. Therefore, assume r {r 1,, r m } and r e q 1 for some e 2 for the rest of the section. We show a deterministic polynomial time algorithm (Algorithm 3.6.1) for finding a non-trivial factor of x r β. Then α can be computed by Lemma below. The input parameters are r, e, β and F q (includes t, r 1,, r m, 37
48 e 1,, e m defined in Definition 3.1.1), which are globally available. Unlike other algorithms for taking rth roots, Algorithm does not require an rth nonresidue as an input and the associated proofs do not require any unproven assumption, like the Riemann Hypothesis. For the rest of this section, let ρ = ζ r, a fixed primitive r root of unity in F q. (3.2.2) Lemma Given a non-trivial factor of x r β, we can compute an rth root of β efficiently. Proof. Suppose x d + a d 1 x d a 0 F q [x] is a non-trivial factor of x r β. Since x r β = r 1 j=0 (x ρj α), we have a 0 = ( 1) d ρ k α d for some integer k. We also have (d, r) = 1 because d < r and r is prime. Find integers u, v by the Euclidean algorithm such that ud + vr = 1. Finally, ( 1) du a u 0β v = ρ ku α is an rth root of β. In our algorithms, we need to determine whether f(x) is equal to zero in the ring F q [x]/(x r β) for some polynomial f(x) F q [x]. Compute h(x) = (f(x), x r β). If h(x) is a non-trivial factor of x r β, we are done. Otherwise, f(x) is either divisible by x r β or relatively prime to x r β. We have the following algorithm. Algorithm iszero(f) /* Comment: is f(x) 0 (mod x r β)? */ { } compute h(x) = (f(x), x r β); if deg h = 0 return FALSE; else if deg h = r return TRUE; else output h and halt; /* Comment: found a non-trivial factor of x r β. */ 38
49 3.3 Step 1: Find a Suitable Element a Define a rational function ψ a (x) over F q as ψ a (x) = a x a ρx for some a F q such that a r β. Then, ψ a (x) c i (mod x ρ i α) for some c i F q for each i = 0,, r 1. Consider ψ a (x) rt. We have three cases below: (1) If the multiplicative order of c i divides rt for all 0 i r 1, we have ψ a (x) rt 1 (mod x r β). This case is not useful to us. We will show that the number of possible values of a s falling into this case is small. (2) The multiplicative order of at least one c i s divides rt and the multiplicative order of at least one c i s does not divide rt. Since a ρx (F q [x]/(x r β)), let h(x) = (ψ a (x) rt 1) mod (x r β) be a polynomial. Then, (h(x), x r β) is a non-trivial factor of x r β and we are done. (3) If the multiplicative orders of all c i s do not divide rt, we have ψ a (x) rt 1 (F q [x]/(x r β)). We want to find such a in this step if we cannot discover a non-trivial factor of x r β. Instead of working with the rational function ψ a, we define a polynomial g k (x, y, z) = (y x) k z(y ρx) k F q [x, y, z] for k > 0. (3.3.1) It is easy to see that in case (1), we have iszero(g rt (x, a, 1)) = TRUE; in case (2), iszero(g rt (x, a, 1)) outputs a non-trivial factor of x r β; and in case (3), we have 39
50 iszero(g rt (x, a, 1)) = FALSE. In step 1, we either find a non-trivial factor of x r β or a value of a such that iszero(g rt (x, a, 1)) = FALSE. In general we have the following lemma. Lemma Let d i = ord c i, the order of c i in F q. If d i divides k for all 0 i < r, we have iszero(g k (x, a, 1)) = TRUE. If d i does not divide k for all 0 i < r, we have iszero(g k (x, a, 1)) = FALSE. If there exists i 0, i 1 such that d i0 divides k but d i1 does not divide k, iszero(g k (x, a, 1)) outputs a non-trivial factor of x r β. Proof. It is obvious. We have the following algorithm finding a desired a. Algorithm finda() { for i = 1 to rt + 1 { set a i = ith element in F q ; if a r i = β output x a i and halt; } } if iszero(g rt (x, a i, 1)) = FALSE return a i ; Lemma There are at most rt distinct values of a F q such that a r β and iszero(g rt (x, a, 1)) = TRUE. Proof. Suppose a r β. The case iszero(g rt (x, a, 1)) = TRUE implies ψ a (α) rt = 1. So the multiplicative order of ψ a (α) divides rt. There are only rt elements in F q having multiplicative order dividing rt since F q is cyclic. We also have ψ a (α) ψ b (α) 40
51 whenever a b. Therefore there are at most rt distinct values of a s such that ψ a (α) rt = 1. The lemma follows. 3.4 Step 2: Find a Suitable l In this section, suppose a F q, is a fixed element obtained in the previous step, i.e. a r β and iszero(g rt (x, a, 1)) = FALSE. Let d i = ord ψ a (ρ i α), the multiplicative order in F q. We have d i not dividing rt for all 0 i < r by Lemma We have the following algorithm to find a suitable l {r 1,, r m }. Algorithm findl(a) { for j = 1 to m if r j r and iszero(g e (q 1)/r j (x, a, 1)) = FALSE j return r j ; } if iszero(g (q 1)/r e 1(x, a, 1)) = FALSE return r; All the return statements in Algorithm are conditional. It might seem that findl(a) may terminate without returning any value and giving any output. We show below that it is not the case. Lemma Suppose every call of iszero in findl(a) returns TRUE or FALSE but does not output a non-trivial factor of x r β. If iszero(g e (q 1)/r j (x, a, 1)) = TRUE for j all r j r, then iszero(g (q 1)/r e 1(x, a, 1)) = FALSE. Proof. Suppose iszero(g e (q 1)/r j (x, a, 1)) = TRUE for all r j r. We have d i dividing j (q 1)/r e j j for all 0 i < r and all 1 j m such that r j r. Then, d i divides 41
52 r e t = gcd 1 j m ((q 1)/r e j j ) for all i. Since d i does not divide rt for all i, we have r j r iszero(g (q 1)/r e 1(x, a, 1)) = FALSE. 3.5 Step 3: Compute a Non-trivial Factor Let l = findl(a) = r r j, if r j r and iszero(g e (q 1)/r j (x, a, 1)) = FALSE; j, otherwise. Case 1: Suppose l = r j0 r for some fixed j 0, is the value obtained from the previous step. We have iszero(g e (q 1)/l j0 (x, a, 1)) = FALSE. Since ψ a (ρ i α) q 1 = 1 for all 0 i < r, we have iszero(g q 1 (x, a, 1)) = TRUE. Suppose iszero(g (q 1)/l k(x, a, 1)) returns either TRUE or FALSE but does not output a non-trivial factor for 0 k e j0. By the lemma below, there exists 0 < k 0 < e j0 such that iszero(g (q 1)/l k(x, a, 1)) = TRUE for k = 0, 1,, k 0 and iszero(g (q 1)/l k(x, a, 1)) = FALSE for k = k 0 +1,, e j0. Lemma If iszero(g k (x, a, 1)) = TRUE, then iszero(g nk (x, a, 1)) = TRUE for any positive integer n. Proof. If iszero(g k (x, a, 1)) = TRUE, we have ψ a (ρ i α) k = 1 for all 0 i < r. Then ψ a (ρ i α) nk = 1 for all 0 i < r. Finally, iszero(g nk (x, a, 1)) = TRUE by Lemma Let d = (q 1)/l k 0+1 and d i = ord ψ a (ρ i α). We have d i dividing ld and d i not dividing d for all 0 i < r. Since F q is cyclic, we have ψ a (ρ i α) d = ζ n i l for some integer n i (Z/lZ) for i = 0,, r 1, 42
53 where ζ l is a primitive lth root of unity which can be computed efficiently by the assumption that F q F 1 and the property (v) of F 1 in Definition Lemma Let N be a prime power with 1 < N r. For some positive integer D, suppose ψ a (ρ i α) D = ζ n i N for some integer n i (Z/NZ) for i = 0,, r 1, Then, there exist i 0 and i 1 such that n i0 n i1. Proof. Suppose n 0 = = n r 1 = n for some integer n with (n, N) = 1. Let ζ = ζ n N. For all 0 i < r, we have ψ a (ρ i α) D = ζ, which is equivalent to g D (ρ i α, a, ζ) = 0. Then, r 1 (a α) D (1 ζ r ) = ζ i g D (ρ i α, a, ζ) = 0. i=0 Thus, ζ r = 1 since a α. We have N rn which is a contradiction. By Lemma (with N = l and D = d), x α divides g d (x, a, ζ n 0 l ) and there exists 0 < i < r such that x ρ i α does not divide g d (x, a, ζ n 0 l ). Therefore, (g d (x, a, ζ n 0 l ), x r β) is a non-trivial factor of x r β. We try (g d (x, a, ζ n l ), xr β) to find a non-trivial factor for n = 1,, l 1. See procedure factorbyzeta (with N = l) in Algorithm Case 2: Suppose l = r. The situation is similar: we have iszero(g (q 1)/r e 1(x, a, 1)) = FALSE. Suppose iszero(g (q 1)/l k(x, a, 1)) returns either TRUE or FALSE but does not output a non-trivial factor for 0 k e 1. By Lemma and the fact that ψ a (ρ i α) q 1 = 1 for all 0 i < r, there exists 0 < k 0 < e 1 such that 43
54 iszero(g (q 1)/l k(x, a, 1)) = TRUE for k = 0, 1,, k 0 and iszero(g (q 1)/l k(x, a, 1)) = FALSE for k = k 0 + 1,, e 1. Let d = (q 1)/r k 0+2. For i = 0,, r 1, the element ψ a (ρ i α) d is a primitive r 2 th root of unity. Then, ψ a (ρ i α) d = ζ n i r 2 for some integer n i such that (n i, r) = 1. By Lemma (with N = r 2 and D = d), x α divides g d (x, a, ζ n 0 r 2 ) and there exists 0 < i < r such that x ρ i α does not divide g d (x, a, ζ n 0 r 2 ). Therefore, (g d (x, a, ζ n 0 r 2 ), x r β) is a non-trivial factor of x r β. We try (g d (x, a, ζ n r 2 ), x r β) to find a non-trivial factor for each n (Z/r 2 Z). See factorbyzeta (with N = r 2 ) in Algorithm Computing a Primitive r 2 th Root of Unity In case 2, we need to find a primitive r 2 th root of unity, ζ r 2. We have ρ, a primitive rth root of unity, by assumption. Then ζ r 2 can be computed by finding a non-trivial factor of x r ρ. Compute a = finda() in step 1 and l = findl(a) in step 2. Suppose all evaluations of iszero in step 1 and 2 do not output. If l r, we continue with case 1 in step 3 and a non-trivial factor of x r ρ is obtained. Suppose l = r. We are in case 2. We find d as before. Then (g d (x, a, ζ n r ), x r ρ) 2 is a non-trivial factor of x r ρ for some n. Nevertheless, we cannot compute the gcd directly because we do not have ζ r 2. Suppose ψ a (ρ i ζ r 2) d = ζ n i r 2 for some integer n i (Z/r 2 Z) for i = 0,, r 1. Consider the polynomial g d (x, a, x n 0 ). We have x ζ r 2 dividing g d (x, a, x n 0 ). We show in the lemma below that there exists 0 < i < r such that x ρ i ζ r 2 does not 44
55 divide g d (x, a, x n 0 ). We try (g d (x, a, x n ), x r ρ) to find a non-trivial factor for each n (Z/r 2 Z). See factorbyx in Algorithm Lemma Suppose x ζ r 2 divides g d (x, a, x n ) for some n (Z/rZ). There exists 0 < i < r such that x ρ i ζ r 2 does not divide g d (x, a, x n ). Proof. Let ζ = ζ r 2. Suppose x ρ i ζ divides g d (x, a, x n ) for all 0 < i < r. We have g d (ρ i ζ, a, (ρ i ζ) n ) = (a ρ i ζ) d ρ in ζ n (a ρ i+1 ζ) d = 0 for i = 0,, r 1. Let s k = k 1 i=0 i = k(k 1)/2. Then, r 1 0 = ρ sin ζ in g d (ρ i ζ, a, (ρ i ζ) n ) = (a ζ) d (1 ρ srn ζ rn ) = (a ζ) d (1 ζ rn ), i=0 which implies ζ rn = 1 since a ζ. We have r 2 rn, a contradiction. 3.6 The Algorithm We present the entire algorithm below and prove Theorem at the end of the section. Algorithm factor(x r β) { set a = finda(); set l = findl(a); k 0 = the largest k such that iszero(g (q 1)/l k(x, a, 1)) = TRUE; if l r factorbyzeta(l, q 1, a); /* Comment: defined below */ l k 0 +1 else if β = ζ r factorbyx( q 1, a); /* Comment: defined below */ r k 0 +2 else 45
56 } factorbyzeta(r 2 q 1,, a); r k 0 +2 factorbyzeta(n, d, a) /* Comment: β ζ r in this case */ { find ζ N, a primitive Nth root of unity; for each n (Z/NZ) iszero(g d (x, a, ζ n N )); } factorbyx(d, a) /* Comment: β = ζ r in this case */ { for each n (Z/r 2 Z) iszero(g d (x, a, x n )); } Proof of Theorem From our discussion in this section, Algorithm (together with Lemma 3.2.1) is a deterministic algorithm for computing an rth root of any rth residue in F q. We list out the running times below: Procedures Factoring q 1 Running time (bit operations) O(poly(log q)) finda O (r 2 t log q) findl O (mr log 2 q) Computing k 0 O (r log 2 q) factorbyzeta O (Nr log 2 q) factorbyx O (r 3 log 2 q) Computing an rth root from a non-trivial factor of x r β O (log2 q) Therefore, the overall running time is polynomial in the input size. For constructing an rth nonresidue in F q, we keep taking rth roots beginning from ζ r and obtain ζ r 2 = r ζ r, ζ r 3 = r ζ r 2,, ζ r e = r ζ r e 1. Finally, ζ r e is an rth 46
57 nonresidue in F q. 3.7 Finding a Non-trivial Factor of Φ r 2(x) Let F q be a finite field with q elements. Let ζ n F q be a primitive nth root of unity, where F q denotes a fixed algebraic closure of F q. Denote the nth cyclotomic polynomial by Φ n (x) def = i (Z/nZ) (x ζ i n). It is easy to see that Φ n (x) F q [x] since Φ n (x) is fixed by any automorphism which fixes F q. Let r be a prime such that r 2 q 1. We have r 1 Φ r 2(x) = Φ r (x r ) = x ir. We consider the problem of finding a non-trivial factor of Φ r 2(x) in this section. We may be able to construct a primitive rth root of unity from a non-trivial factor of Φ r 2(x). If we have a non-trivial factor of Φ r 2(x) with constant term not equal to ±1, a primitive rth root of unity can be constructed from the constant term. Unfortunately, it is possible to have a non-trivial factor of Φ r 2(x) with constant term equal ±1, although the number of such cases is small. i= Method 1 Write q = p e 1 1 p e m m +1 for some distinct primes p 1,, p m and some positive integers e 1,, e m, where p 1 = r and e 1 2. Suppose ζ p2,, ζ pm are available. Let ζ = ζ r 2 F q, ρ = ζ r F q 47
58 We try to factor Φ r 2(x) by Algorithm with some modifications. We use Φ r 2(x) as an input, instead of x r β. In Algorithm 3.6.1, we work on ψ a (x). Here, we work on the rational polynomial a x a x r+1 (mod Φ r 2(x)). With the corresponding modifications, compute 1 a and l. If l r, we proceed with the Case 1 in Section 3.5 to obtain a non-trivial factor of Φ r 2(a). The bad case is when l = r. We find d as the Case 2 in Section 3.5. Define a polynomial h j (x) def = (a x) d x j (a x r+1 ) d. Then, a non-trivial factor of Φ r 2(x) can be discovered by the lemma below. Lemma (h j (x), Φ r 2(x)) for some j (Z/r 2 Z) is a non-trivial factor of Φ r 2(x). Proof. By the construction of a, l and d, ( a x ) d = ζ n i (mod x ζ i ) for some n i (Z/r 2 Z) for all i (Z/r 2 Z). a x r+1 If there exist i 0, i 1 such that n i0 /i 0 n i1 /i 1, we are done. Suppose n i /i = j (Z/r 2 Z) for all i (Z/r 2 Z). Then, ( a ζ i ) d = ζ ij for all i (Z/r 2 Z). a ζ i(r+1) 1 We assume Φ r (a) 0 and Φ r 2(a) 0. If Φ r (a) = 0 or Φ r 2(a) = 0, a primitive rth root of unity can be constructed. We can compute the complete factorization of Φ r 2(a) by the algorithm in Chapter 4. 48
59 Equivalently, h j (ζ i ) = 0 for all i (Z/r 2 Z). Let s n = n 1 k=0 (r + 1)k = (r+1)n 1 r T n def = and n 1 ζ js k h j (ζ (r+1)k ) = 0 for all n > 0. k=0 We also have 0 = T n = (a ζ) d ζ js n (a ζ (r+1)n ) d for all n > 0. By the fact that (r + 1) r 1 (mod r 2 ), we have 0 = T r = (a ζ) d ζ js r (a ζ (r+1)r ) d = (a ζ) d (1 ζ j((r+1)r 1)/r ). Finally, ζ j((r+1)r 1)/r = 1 since a ζ. We have r 2 dividing j((r + 1) r 1)/r, which is a contradiction Method 2 We show a second method for finding a non-trivial factor of Φ r 2(x) in this section. Suppose we have the same situation as in the previous section. We consider the rational polynomial and define a polynomial a x r a x (r 1)r (mod Φ r 2(x)) h j(x) def = (a x r ) d x j (a x (r 1)r ) d. Replace h j (x) by h j(x) and find a, l and d as before. Suppose l = r (otherwise, it falls in Case 1 which is an easy case). Then, a non-trivial factor of Φ r 2(x) can be discovered by the lemma below. 49
60 Lemma (h j(x), Φ r 2(x)) for some j (Z/r 2 Z) is a non-trivial factor of Φ r 2(x). Proof. We use a similar technique as in the proof of Lemma Suppose ( a ζ ir ) d = ζ ij for some j (Z/r 2 Z), for all i (Z/r 2 Z). a ζ i(r 1)r Then, h j(ζ i ) = 0 for all i (Z/r 2 Z). However, 0 = h j(ζ) + ζ j h j(ζ r 1 ) = (a ζ r ) d ζ rj (a ζ (r 1)2r ) d = (a ζ r ) d (1 ζ rj ), which implies r 2 rj, a contradiction More Variations Suppose g 1 (x),, g m (x) are the non-trivial factors obtained in Method 1. It guarantees that f 1 (x) def = (x ζ r+1 )(x ζ (r+1)2 ) (x ζ (r+1)r ) does not divide g i (x) for all i = 1,, m. Similarly, Method 2 guarantees the non-trivial factors obtained are not divisible by f 2 (x) def = (x ζ r )(x ζ (r 1)r ). We can have more variations by beginning with the rational polynomials τ k (x) def = a x and σ a x kr+1 k (x) def = 50 a x r a x (kr 1)r for 0 < k < r.
61 Then, the non-trivial factors computed from τ k (x) are not divisible by (x ζ kr+1 )(x ζ (kr+1)2 ) (x ζ (kr+1)r ) = f 1 (x) and the non-trivial factors computed from σ k (x) are not divisible by (x ζ r )(x ζ (kr 1)r ) = f 2 (x). Although the polynomials (i.e. f 1, f 2 ) are the same, the computation processes are different, therefore, the non-trivial factors computed may be different. If any of the non-trivial factors obtained has a constant term not equal to ±1, then a primitive rth root of unity can be constructed. 51
62 Chapter 4 Solving Polynomial Equations The problem of solving polynomial equations over finite fields is a generalization of the following problems over finite fields constructing primitive nth roots of unity, taking nth roots, constructing nth nonresidues, constructing primitive elements (generators of the multiplicative group) for any positive n dividing the number of elements of the underlying field. By the Tonelli-Shanks square root algorithm [63, 56] and its generalization for taking nth roots, constructing nth nonresidues and taking nth roots are polynomial time equivalent for all n. It is clear that primitive nth roots of unity can be computed efficiently from any nth nonresidue when n is prime. It is obvious that a primitive element is also an nth nonresidue. In [61], we showed that, for some families of finite fields, once 52
63 we can compute a primitive nth root of unity for some suitably chosen n, we can take square roots. The problem of solving polynomial equations is a special case of the problem of polynomial factoring. There is a deterministic polynomial time algorithm, Lenstra- Lenstra-Lovász [41], for factoring polynomials over rational numbers. For polynomial factoring over finite fields, we have Berlekamp s algorithm [13], which is deterministic but exponential time. So it only works well in small finite fields. There is a probabilistic version of Berlekamp s algorithm [14] for large finite fields. We also have Cantor-Zassenhaus [19], which is a probabilistic algorithm, for polynomial factoring over finite fields. For a survey of polynomial factoring, see [29]. The problem of solving polynomial equations is to find the solutions of f(x) = 0 over F q, where F q is a finite field with q elements and f(x) F q [x] is a polynomial with deg f = O(poly(log q)). We may assume f is a product of distinct linear factors since squarefree factorization 1 (see [71] and [35]) and distinct degree factorization (see [29]) can be done efficiently. If f has a multiple root, then (f, f ) is a non-trivial factor of f, where f is the first derivative of f. Since x q x is a product of all linear polynomials in F q [x], we can work on (f(x), x q x) instead of f(x). In addition to the polynomial factoring algorithms discussed above, algorithms related to solving univariate polynomial equations in finite fields include the following: Tonelli-Shanks [63, 56], Adleman-Manders-Miller [2] and Cipolla-Lehmer [20, 40] are 1 Suppose the input polynomial is a product of some irreducible factors with multiplicity 1. Squarefree factorization is the process finding the product of the same set of irreducible factors with multiplicity equal 1. 53
64 polynomial time square root algorithms, which require a quadratic nonresidue as an input. Shanks algorithm can be generalized to take nth root with a given nth nonresidue. Schoof s algorithm [55], which takes square root for the elements in prime fields, is deterministic but the running time is polynomial only if the input element is small. In the previous chapters, we have shown deterministic polynomial time algorithms for constructing primitive rth roots of unity, taking square roots and taking rth roots over some families of finite fields. In this chapter, we prove that there is a deterministic polynomial time algorithm solving polynomial equations over any finite field F in F 1 (see Definition 3.1.1). As an application of our algorithm for solving polynomial equations, we show a deterministic polynomial time algorithm computing elliptic curve nth roots over F. At last, we show a probabilistic algorithm for solving polynomial equations over arbitrary finite fields with odd characteristic. 4.1 Factoring by Searching Let F q be the finite field of q elements. Let f(x) F q [x] be a polynomial. In this section, we consider the problem of solving the polynomial equation f(x) = 0, i.e. finding roots of f. As in the discussion in the introduction, we may assume f is a product of two or more distinct linear factors. With some algebraic and combinatorial techniques, we show below that, in some finite fields F q, the problem of solving polynoimal equations is polynomial time reducible to the problem of taking lth roots for all l q 1. 54
65 Write q = p e 1 1 p e m m + 1 for some distinct primes p 1,, p m. Suppose we can compute the p j th roots of a for any a F q and 1 j m. We show a deterministic algorithm (Algorithm below) to factor f, where f is product of two or more distinct linear factors and f(0) 0. The idea is simple: suppose f(x) x d a for some integer d q 1 and some a F q with ord(a) = (q 1)/d. Let l be a prime factor of d and ζ l be a primitive lth root of unity in F q. Then, x d a = l 1 i=0 (xd/l ζ i l l a). We have l 1 f(x) = (f(x), x d/l ζl i l a). i=0 We compute (f(x), x d/l ζ i l l a) for each i = 0,, l 1. If (f(x), x d/l ζ i l l a) is a non-trivial factor of f(x) for some 0 i < l, we are done (or keep factoring until the complete factorization of f(x) is obtained). Otherwise, f(x) x d/l ζ i l l a for some 0 i < l. Then, repeat the process with d = d/l and a = ζ i l l a. In the beginning, we have f(x) x q 1 1 (i.e. d = q 1 and a = 1). Algorithm factorbysearching(f) { set a = 1; set d = q 1; for j = 1 to m for k = 1 to e j { set d = d/p j ; Label 1: set b = a 1/p j ; set i 0 = search(f, j, d, b); set a = ζ i 0 p j b; } } search(f, j, d, b) 55
66 { for i = 0 to p j 1 { compute g(x) = (f(x), x d ζp i j b); if 1 < deg g < deg f Label 2: output g and halt; else if deg g = deg f return i; } } Lemma Suppose f(x) F q [x] is product of linear factors such that f(0) 0. Algorithm always outputs a non-trivial factor of f. Proof. It is easy to see that a always is a p j th residue in F q at Label 1. We show by induction that f(x) divides x p jd a at Label 1 whenever the algorithm is still running. When j = k = 1, we have a = 1 and d = (q 1)/p 1. Obviously, f(x) divides x q 1 1. For j = j 0 and k = k 0, denote a j0,k 0 = a and d j0,k 0 = d at Label 1. Assume f(x) divides x p j 0 d j0,k 0 a j0,k 0. Let b = a 1/p j 0 j 0,k 0 and g i (x) = (f(x), x d j 0,k 0 ζ i p j0 b) for i = 0,, p j0 1. Then, x p j 0 d j0,k 0 aj0,k 0 = p j0 1 i=0 ( ) x d j 0,k 0 ζ i pj0 b and f(x) = c p j0 1 i=0 g i (x) for some constant c. If there exists g i such that 1 < deg g i < deg f, then g i is a non-trivial factor of f. The algorithm outputs g i and halts. Otherwise, there exists a unique i 0 such that deg g i0 = deg f and i 0 is returned. Denote the pair of j, k followed j 0, k 0 by j 1, k 1. For j = j 1 and k = k 1, we have a = ζ i 0 p j0 a 1/p j 0 j 0,k 0 and d = d j0,k 0 /p j1 at Label 1. By the definition of g i0, f(x) divides x p j 1 d a. The algorithm always outputs a non-trivial factor and halts at Label 2. Otherwise, for j = m and k = e m, we have f(x) dividing x p m a at Label 1 but x ζ i p jm a 1/p jm 56
67 does not divide f(x) for all i = 0,, p jm 1 since the algorithm does not output. It leads to a contradiction. Theorem Let F q be a finite field of q elements such that l = O(poly(log q)) for every prime factor l of q 1. Suppose there is a deterministic polynomial time algorithm to compute lth roots. Then, there is a deterministic polynomial time algorithm solving any polynomial equation over F q. Proof. By our previous discussion, we may assume the input polynomial f(x) F q [x] is a product of two or more distinct linear factors and f(0) 0. Since lth roots can be computed in deterministic polynomial time, Algorithm can factor f in deterministic polynomial time by Lemma Theorem Let F q be a finite field of q elements such that l = O(poly(log q)) for every prime factor l of q 1. Given a primitive element in F q, there is a deterministic polynomial time algorithm solving any polynomial equation over F q. Proof. Denote the given primitive element by a. Note that a is an lth nonresidue in F q for all prime factor l of q 1. Then, lth roots can be computed by a generalized Shanks algorithm with a as an input. See Section 3.2 in [67] for modifying Shanks algorithm to take rth roots. Finally, the theorem follows from Theorem Theorem Let F q F 1. There is a deterministic polynomial time algorithm solving any polynomial equation over F q. Proof. It is an obvious consequence of Theorem and Theorem
68 4.2 Elliptic curve nth root problem As an application of our algorithms for solving polynomial equations, we show a deterministic polynomial-time algorithm to solve the elliptic curve nth root problem in this section. Let F F 1 (see Definition 3.1.1) be a finite field. Denote an elliptic curve E defined over F by the Weierstrass equation E : y 2 + a 1 xy + a 3 y = x 3 + a 2 x 2 + a 4 x + a 6 for some a 1, a 2, a 3, a 4, a 6 F. Consider the following problem: given a point Q E(F ) and a positive integer n O(poly(log q)), (I) decide whether Q = np for some = P E(F ), (II) find P if such P exists. Although we write the elliptic curve group operation additively, the nature of the problem above is closer to the nth root problem in finite fields than the multiplicative inverse problem. It is well known that multiplication by n is an endomorphism and n(x, y) = ( R1 (x) S 1 (x), y R ) 2(x) S 2 (x) for some R 1 (x), S 1 (x), R 2 (x), S 2 (x) F [x] with (R 1, S 1 ) = (R 2, S 2 ) = 1, deg R 1 = n 2 and deg S 1 n 2 1. We have S 1 (x) = Ψ(x) 2 for some Ψ(x) F [x]. All polynomials R 1, S 1, R 2, S 2 and Ψ can be computed in deterministic polynomial time. See [69] for the details. 58
69 Suppose (a, b) = Q. Then, Q = n(x, y) implies x is a solution of f(x) def = R 1 (x) as 1 (x) = 0 (4.2.1) over F. Let α 1,, α m F be the roots of the equation (4.2.1). For (I), a solution of Q = np exists if and only if m > 0. For each α i, compute β i = b S 2(α) R 2. For (II), (α) {(α i, β i ) : 1 i m} is the complete set of solutions of P. Suppose Q =. Then, P E[n](F ) def = E[n] E(F ), where E[n] is the n-torsion subgroup of E(F ), where F denotes a fixed algebraic closure of F. Let α 1,, α m F be the roots of the equation Ψ(x) = 0. Consider the quadratic equation g i (y) def = y 2 + (a 1 α i + a 3 )y (α 3 i + a 2 α 2 i + a 4 α i + a 6 ) = 0. Let J = {j : g j has a root in F, 1 j m} be an index set. In this case, P = always is a solution of Q = np. For (I), a solution P of Q = np exists if and only if J is non-empty. Let β j,1, β j,2 F be the roots of g j for j J. For (II), {(α j, β j,k ) : j J and k = 1, 2} { } is the complete set of solutions of P. Theorem Let F q F 1. There is a deterministic polynomial time algorithm computing elliptic curve nth roots over F q. Proof. The polynomial equations can be solved in deterministic polynomial time by Theorem By the discussion above, the theorem follows. 4.3 A Probabilistic Algorithm In this section, we discuss a probabilistic algorithm for factoring products of linear polynomial over an arbitrary finite field F with characteristic not equal to 2. Our 59
70 idea is to use the fact that half of the elements in F are quadratic residues and the other half of the elements in F are quadratic nonresidues. Let f(x) = (x α 1 ) (x α d ) F [x] be a polynomial. We may assume α i are non-zero and distinct. Suppose α 1,, α m are quadratic residues and α m+1,, α d are quadratic nonresidues for some 0 < m < d. Compute g(x) = (f(x 2 ), x q 1 1). Then, g(x) = (x 2 α 1 ) (x 2 α m ). Therefore, g( x) is a non-trivial factor of f. If all the roots of f are quadratic residues or all the roots of f are quadratic nonresidues, we can shift the roots of f by an arbitrary element a F and try to factor the shifted polynomial. The algorithm shown below captures this idea with a as an input. If the algorithm fails for some a, we can try again with a different a. Algorithm factor(f, a) { if f(a) = 0 output x a; } compute g(x) = (f(x 2 + a), x q 1 1); if 0 < deg g < 2 deg f output g( x a); Proposition For any finite field F, let f(x) = (x α 1 ) (x α d ) F [x] for some distinct α i F. The success probability of Algorithm for any a F is approximately d, where d = deg f 2. Proof. The probability of each α i a being a quadratic residue is approximately 1/2. Algorithm does not work when all (α i a) s are quadratic residues or all (α i a) s are quadratic nonresidues. Therefore, the overall success probability is approximately d. 60
71 The running time of Algorithm is Õ(d log q) bit operations, where q is the number of element in F and d is the degree of f. The most costly operation in the algorithm is computing GCD, which takes Õ(d log q) bit operations. The other operations in the algorithm are obviously bounded by it. Algorithm can be generalized by replacing the shift operation by a with some 1-1 mapping σ over F. The mapping σ should be efficiently computable for both σ and σ 1 ; induce an 1-1 mapping from polynomial to polynomial; map quadratic residues and quadratic nonresidues randomly. In Algorithm 4.3.1, we use σ a : x x a and the induced polynomial map is τ a : f(x) f(x + a). A more general map is σ a,b,c,d : x ax + b cx + d for some a, b, c, d F with ad bc 0 and an induced polynomial map is τ a,b,c,d : f(x) (cx + d) deg f f( ax + b cx + d ). 61
72 Chapter 5 Primality Testing Primality testing is the process of checking whether a positive integer is a prime. The problem of primality testing is in great interest in modern research since many modern cryptographic schemes rely on finding large prime numbers. One typical example is the RSA public key cryptosystem [53]. Directly from the definition, if N is composite, then there exists a prime p N such that N is divisible by p. However, checking all prime p N requires exponential time to the input size. This idea was known to ancient Greeks. Another test, called Fermat s test, is to find an integer a with (a, N) = 1 such that a N 1 1 (mod N). If such a exsits, then N is composite by Fermat s Little Theorem (Theorem 1.2.1). Fermat s test does not prove primality. Even if a N 1 1 (mod N) for all a with (a, N) = 1, (5.0.1) the integer N may not be a prime since there exist infinitely many composite numbers, called Carmichael numbers (see [6]), satisfying equation (5.0.1). Fermat s test also 62
73 fails to prove the compositeness of Carmichael numbers. For some forms of numbers, there are specific primality tests. We have Lucas- Lehmer (see [70]) for Mersenne numbers (N = 2 q 1 for some prime q) and Pépin s test [47] for Fermat number (N = 2 2n + 1). Both algorithms are Õ(log2 N) and deterministic. In 2002, Agrawal, Kayal and Saxena (AKS) gave the first deterministic polynomialtime primality testing algorithm [5]. See also [26]. We will discuss more details of AKS and the related works in Section 5.2. Before AKS, there were many primality testing algorithms which are either probablistic or not polynomial-time: Pocklington-Lehmer [48, 39], Miller-Rabin [44, 49], Solovay-Strassen [59], Adleman-Pomerance-Rumely [3], elliptic curve primality proving [30, 9], and some other tests [23], [1] and [4]. See [31] for a survey. In this chapter, we show a deterministic polynomial-time primality test for some form of numbers in Section 5.1 and present a potentially fast primality test based on AKS in Section rth Root Primality Test In this section, we show a deterministic primality testing algorithm, for some form of numbers. The primality test is constructed by our rth root algorithms presented in Chapter 3. The idea of our primality test is similar to the Pocklington-Lehmer primality test [48, 39]. We have the following theorem. Theorem Let N = r e t + 1 for some prime r and some positive integers t and 63
74 e with r e > t. There is an Õ(r2 (log 2 N)(t + r log N)) deterministic primality testing algorithm. If r is a small constant and t = O(log N), the running time is Õ(log3 N). Proof. Firstly, we try to find a primitive rth root of unity ζ r over (Z/NZ) by Algorithm If ζ r (Z/NZ), Algorithm will fail and we conclude that N is composite. Otherwise, try computing ζ r 2 = r ζ r, ζ r 3 = r ζ r 2,, ζ r e = r ζ r e 1 over the ring Z/NZ by Algorithm If N is prime, we will obtain ζ r e eventually. If N is composite, ζ r e does not exist in Z/NZ by a generalized Proth s Theorem (Theorem in the next section). Since Algorithm is deterministic, it must fail in some point during computing ζ r e. Therefore, N is prime if and only if ζ r e can be computed successfully by the procedure described. The running time of Algorithm and Algorithm are Õ(t log2 N) and Õ(r 2 log N(t + r log N)), respectively. Since Algorithm is used e 1 times, the overall running time is Õ(r2 log 2 N(t + r log N)). The theorem follows. For N = r e t + 1 with r a small constant and t = O(log N), the running time our algorithm is Õ(log3 N), which is faster than other deterministic primality tests which are applicable. The running time of the AKS test [5] and Lenstra-Pomerance s modified AKS test [34] are Õ(log7.5 N) and Õ(log6 N), respectively. Assuming ERH (see Section 1.2.4), Miller s test [44] is deterministic with running time Õ(log4 N) Proth s Theorem In 1878, a self-taught farmer, Francois Proth, proved the following theorem. 64
75 Theorem (Proth s Theorem) Let N = 2 e t + 1 for some odd t with 2 e > t. If a (N 1)/2 1 (mod N) for some a, then N is a prime. See [70] for the details of Proth s Theorem. We will show a generalization of Proth s theorem (Theorem 5.1.4). This generalization of Proth s theorem is well known. The following lemma is used in the proof of Theorem Lemma Let n = l k for some prime l and k 1. Let r e be a prime power with r l. If r e φ(n) and r e > n, then n is a prime (i.e. k = 1). Proof. We have r e dividing φ(n) = (l 1)l k 1, therefore, r e l 1. If k > 1, then φ(n) (l 1)l > r 2e > n, which is a contradiction. Thus, k = 1 and n is a prime. Theorem (Generalized Proth s Theorem) Let N = r e t+1 for some prime r and integers e, t 1. Suppose r e > t. If a N 1 1 (mod N) and a (N 1)/r 1 (mod N), (5.1.1) for some integer a, then N is a prime. Proof. Suppose there exists an integer a satisfying equations (5.1.1). Let d be the order of a in (Z/NZ). Then r e d. Let b a d/re (mod N). The order of b in (Z/NZ) is r e. Note that r e > N. Suppose N = l k for some prime l and k 1. Since (N, r) = 1, we have l r. The order of b, r e divides φ(n). By Lemma 5.1.3, k = 1 and N is a prime. 65
76 Suppose N = l k 1 1 l k m m for m > 1, some distinct primes l 1,, l m and integers k 1,, k m 1. Let d i be the order of b in (Z/l k i i Z). Since b re 1 (mod l k i i ), we have d i = r s i for some 0 s i e. Without loss of generality, assume s 1 = max(s 1,, s m ). If s 1 < e, we have b rs 1 1 (mod l k i i ) for all 1 i m. By the Chinese Remainder Theorem, b rs 1 1 (mod N) but r e does not divide r s 1, contradiction. Therefore, s 1 = e. We have r e φ(l k 1 1 ), which implies k 1 = 1 by Lemma Write l 1 = r e t and N/l 1 = r e 0 t with (r, t 0 ) = 1. Then N = (t 0 t 1 r e 0 + t 1 + t 0 r e 0 e )r e + 1. We have e 0 e, otherwise, t = t 0 t 1 r e 0 + t 1 + t 0 r e 0 e is not an integer. However, N = l 1 (N/l 1 ) > r e+e 0 r 2e > N, contradiction. 5.2 A Potentially Fast Primality Test In 2002, Agrawal, Kayal and Saxena [5] gave the first deterministic, polynomial-time primality testing algorithm. The main step was the following. Theorem (AKS) Given an integer n > 1, let r be an integer such that ord r (n) > log 2 n. Suppose (x + a) n x n + a (mod n, x r 1) for a = 1,, φ(r) log n. (5.2.1) Then, n has a prime factor r or n is a prime power. The running time is Õ(r1.5 log 3 n). It can be shown by elementary means that the required r is O(log 5 n). So the running time is Õ(log10.5 n). Moreover, by Fouvry s Theorem [27], such r exists in O(log 3 n), so the running time becomes Õ(log7.5 n). It is 66
77 conjectured that such r exists in O(log 2 n), which makes the running time Õ(log6 n). However, the conjecture is still not proved yet. In [34], Lenstra and Pomerance showed that the AKS primality test can be improved by replacing the polynomial x r 1 in equation (5.2.1) with a specially constructed polynomial f(x), so that the degree of f(x) is O(log 2 n). The overall running time of their algorithm is Õ(log6 n). With an extra input integer a, Berrizbeitia [16] has provided a deterministic primality test with time complexity 2 min(k, 2 log log n ) Õ(log 6 n), where 2 k n 1 if n 1 (mod 4) and 2 k n + 1 if n 3 (mod 4). If k 2 log log n, this algorithm runs in Õ(log 4 n). The algorithm is also a modification of AKS by verifying the congruence (1 + mx) n 1 + mx n (mod n, x 2s a) for a fixed s and some clever choices of m. The main drawback of this algorithm is that it requires a satisfying the Jacobi symbol ( a n) = 1 if n 1 (mod 4) and ( a ) ( n = 1 a ) n = 1 if n 3 (mod 4). Since there is no deterministic algorithm to find such a yet, Berrizbeitia s algorithm is considered as a probabilistic test. We attempt to improve the AKS primality test in another direction. We suggest that equation (5.2.1) may be checked with only the single value a = 1. If a certain conjecture (Conjecture 5.2.8) about cyclotomic polynomials holds, we obtain a deterministic primality testing algorithm with running time Õ(r log2 n). The requirement of r is exactly the same as in AKS. Therefore, the running time would be Õ(log5 n) if r is O(log 3 n). 67
78 5.2.1 The Algorithm Let SimplePrimalityTest(n) be an O( n) primality test algorithm. We show our algorithm below. Algorithm PrimalityTest(n) { if n < n 0 = , return SimplePrimalityTest(n); if n = a e for some prime a and some e > 1, return COMPOSITE; find smallest r such that ord r (n) > log 2 n; if 1 < (a, n) < n for some a r, return COMPOSITE; if n r, return PRIME; } if (x 1) n x n 1 (mod n, x r 1), return COMPOSITE; return PRIME; Throughout this section, suppose n > 1 is an integer and Algorithm returns PRIME at the last line. Therefore, n is not a non-trivial power of a prime (that is, n p e for some e > 1), ord r (n) > log 2 n, all prime divisors of n are greater than r (x 1) n x n 1 (mod n, x r 1). Let p be a prime dividing n such that ord r (p) > 1. Since ord r (n) > 1, such a prime p exists. Let G = { ( n } p )i p j (mod r) : i, j Z (Z/rZ). 68
79 Let t = G. Let h(x) be an irreducible factor of Φ r (x) in F p. Then, deg(h) = ord r (p) > 1. Let F = (Z/pZ)[x]/(h(x)), which is isomorphic to the finite field F p deg(h). Let P = {f Z[x] : f(x) n f(x n ) (mod p, Φ r (x))} and G = {f(x) (mod p, h(x)) : f P } F. In F, it can be shown that f(x) n = f(x n ) implies f(x) n/p = f(x n/p ) (see [5] for a proof). Since p is the characteristic of F, we have f(x) p = f(x p ). Therefore, for all f G, we have f(x) m = f(x m ) for all m G Upper bounds of G Some upper bounds of the size of G can be shown as follows. Lemma Suppose n is not a power of p. Then, G n t. Proof. The proof is essentially the same as the proof of Lemma 4.8 in [5]. Lemma Suppose n is not a power of p. If ord r (n) > t 384, then G n t 2/5. Proof. Suppose n 2/5 p n 3/5. Let Î = { ( n p )i p j : 0 i, j } t. 69
80 The size of Î satisfies Î = ( t + 1) 2 > t. Since G = Î (mod r) and G = t, there exist m 1, m 2 Î with m 1 < m 2 such that m 1 m 2 (mod r). Consider the polynomial ψ(t ) = T m 2 m 1 1 F [T ]. For all f(x) G, ψ(f(x)) = f(x) m 2 m 1 1 = f(xm 2 ) f(x m 1 ) 1 = 0. Therefore, ψ(t ) has at least G roots in F. Let { M = max ( n p ) t p t 1, ( n } p ) t 1 p t. Note that M n t 2/5 n t 2/5 since both p, n p n2/5. We claim that m 1, m 2 can be chosen such that m 2 m 1 M. This implies that G deg(ψ) = m 2 m 1 n t 2/5. To prove the claim, let m 1 m 2 (mod r) with m 1, m 2 Î and m 1 < m 2. If m 2 < n t, then m 2 (n/p) i p j with either i < t or j < t. Then m 2 M, so m 2 m 1 M. We can set m 1 = m 1 and m 2 = m 2. The case m 1 = 1 and m 2 = n t is not possible; otherwise, 1 n t (mod r), so ord r (n) t. Finally, assume 1 m 1 < m 2 = n t. The definition of Î shows that m 1 n t = m 2. { } Choose m 1 = 1 and m 2 = m 2/m 1. Since m 1 min p, n n 2/5, this completes the p proof of the claim. Now suppose that p < n 2/5 or p > n 3/5, Let n δ = min { } Then n 1 δ = max p, n p. Let { } p, n p with 0 < δ < 2 5. Ĩ = { n δi n (1 δ)j : 0 i A and 0 j B }, 70
81 t(1 δ) where A = and B = δ tδ 1 δ. Then Ĩ = (A + 1)(B + 1) > t. As before, there exist m 3, m 4 Ĩ, such that m 3 m 4 (mod r) with m 3 < m 4. Note that m 4 n Aδ n B(1 δ) n 2 tδ(1 δ) n 24t/25 < n t 2/5 for t 384. All the elements in G are roots of the polynomial T m 4 T m 3. Therefore, G m 4 n t 2/ Producing elements of G One way to find a lower bound on the size of G is to produce a large number of elements of G. If we have chosen r so that n is a primitive root mod r, then this is easy. Lemma Assume that n is a primitive root mod r and that (x 1) n x n 1 (mod n, x r 1). If (m, r) = 1, then x m 1 (x 1) e (mod n, x r 1) for some integer e. Proof. Write m n f (mod r). Then x m 1 x nf 1 (x 1) nf. Consider the cyclotomic field of rth roots of unity Q(ζ), where ζ is a primitive rth root of unity. The cyclotomic units are generated by the quotients (ζ a 1)/(ζ 1) with (a, r) = 1. The index of these units in the full group of units of the ring Z[ζ] is the class number of the real subfield Q(ζ +ζ 1 ). This class number tends to be rather 71
82 small, so the cyclotomic units are of small index in the full group of units. Let p be prime and let p be a prime ideal of Z[ζ] dividing p. The field Z[ζ]/p is isomorphic to F p [x]/(p, h(x)), where h(x) is an irreducible factor mod p of Φ r (x). Work on Artin s primitive root conjecture (see, for example, [21]) shows that the reduction mod p of the group of units of Z[ζ] should often be quite large. In fact, it is conjectured to be the full multiplicative group of Z[ζ]/p for a positive density of primes p. Since the index of the cyclotomic units tends to be small, we expect that the cyclotomic units also generate a large subgroup of the multipicative group. Therefore, the polynomials x m 1 should generate a large subgroup of F p [x]/(p, h(x)), so we expect that the group G should be large for many p. In the next section, we formulate a conjecture on cyclotomic polynomials (Conjecture 5.2.8) that can be regarded as a way of producing a large number of polynomials in G. In the case that n is a primitive root mod r, the following lemma shows that the group obtained is contained in the group generated by x 1. Lemma If n is a primitive root mod r and (x 1) n x n 1 (mod n, x r 1), then Φ m (x) {(x 1) e : e Z} F for (m, r) = 1. Proof. Since Φ m (x) = d m (x m/d 1) µ(d) where µ(d) is the Möbius function, the previous lemma yields the result. 72
83 5.2.4 Cyclotomic polymonials We conjecture that once equation (5.2.1) is verified with a = 1, the size of G is larger than the upper bounds in Lemma and If the conjecture is true, then n must be a prime when Algorithm returns PRIME at the last line. In particular, we have the mth cyclotomic polynomial Φ m (x) G for all m > 0 with (m, r) = 1 as shown in Lemma Since there are infinitely many distinct Φ m (x) in Z[x], some of them must be congruent to each other in F. We will show that there exist r distinct Φ q (x) s in F for q prime (see Lemma ). By Lemma , for primes p 1 and q 1, Φ p1 (x) and Φ q1 (x) are distinct whenever p 1 q 1 (mod r). Conjecture suggests a generalized situation that Φ p1 p k (x) and Φ q1 q k (x) are distinct unless p i q σ(i) (mod r) for all 1 i k and some permutation σ. Proposition proves Conjecture with k = 2. Lemma If (x 1) n x n 1 (mod n, x r 1), then for k 1 with (k, r) = 1, Φ k (x) n Φ k (x n ) (mod p, Φ r (x)). (5.2.2) Proof. We use induction. By the hypothesis, Φ 1 (x) = x 1 satisfies the conclusion because p n and Φ r (x) divides x r 1. Suppose Φ i (x) n Φ i (x n ) (mod p, Φ r (x)) for 1 i < k with (i, r) = 1. For k > 1 with (k, r) = 1, the congruence (x 1) n x n 1 (mod n, x r 1) implies that (x k 1) n x kn 1 (mod n, x kr 1). 73
84 Since p n and Φ r (x) divides x kr 1, (x k 1) n (x n ) k 1 (mod p, Φ r (x)). By the identity T k 1 = d k Φ d(t ), n Φ d (x) Φ d (x n ) (mod p, Φ r (x)). (5.2.3) d k d k For any proper divisor d of k, (d, r) = 1 and Φ d (x) n Φ d (x n ) (mod p, Φ r (x)) by the induction assumption. Let g(x) = (Φ d (x), Φ r (x)) F p [x]. If g(x) 1, let α F p be a root of g(x). Then, α d = 1 and α r = 1. But (d, r) = 1 implies that α = 1. However, Φ r (1) = r 1 i=0 1 = r 0 in F p since r, p are distinct primes. Therefore, (Φ d (x), Φ r (x)) = 1. so equation yields Φ k (x) n Φ k (x n ) (mod p, Φ r (x)). Conjecture Let p 1, p 2,, p k be prime numbers that are distinct mod r and none of them are congruent to 1, 0, 1 (mod r). Similarly, let q 1, q 2,, q k be primes that are distinct mod r and none of them are congruent to 1, 0, 1 (mod r). Let h(x) be an irreducible factor of Φ r (x) mod p. Then, Φ p1 p 2 p k (x) Φ q1 q 2 q k (x) (mod p, h(x)) if and only if there is a permutation σ of {1, 2,..., k} such that p i q σ(i) (mod r) for i = 1, 2,, k. One direction of this conjecture can be proved. In Section 5.2.6, we give evidence for the other direction. 74
85 Proof of. We prove a stronger version of the statement: p i q i (mod r) for i = 1, 2,, k, implies Φ p1 p 2 p k (x) Φ q1 q 2 q k (x) (mod p, Φ r (x)). We show it by induction. For k = 1, the statement is true by Lemma For k > 1, suppose p i q i (mod r) for i = 1, 2,, k. By the induction assumption, Φ p1 p 2 p k 1 (y) Φ q1 q 2 q k 1 (y) (mod p, Φ r (y)). Put y = x p k. We have Φ p1 p 2 p k 1 (x p k ) Φ q1 q 2 q k 1 (x p k ) (mod p, Φ r (x p k )). Since Φ r (x) divides Φ r (x p k ), Φ p1 p 2 p k 1 (x p k ) Φ q1 q 2 q k 1 (x p k ) (mod p, Φ r (x)). We claim that Φ p1 p 2 p k 1 (x) and Φ r (x) are relatively prime mod p. To see this, let α F p be a common root mod p of the two polynomials. Then α p 1p 2 p k 1 = 1 = α r, so α = 1. But Φ r (1) = r 0 (mod p). Therfore, the two polynomials have no common root mod p, which proves the claim. So Φ p1 p 2 p k 1 (x) is a unit mod Φ r (x). Finally, Φ p1 p 2 p k (x) = Φ p 1 p 2 p k 1 (x p k ) Φ p1 p 2 p k 1 (x) Φ q 1 q 2 q k 1 (x p k ) Φ q1 q 2 q k 1 (x) Φ q 1 q 2 q k 1 (x q k ) Φ q1 q 2 q k 1 (x) (mod p, Φ r (x)) (mod p, Φ r (x)) = Φ q1 q 2 q k (x). 75
86 In Conjecture 5.2.8, we require p i, q i 1, 0, 1 (mod r) for i = 1, 2,, k, otherwise, the conjecture is obviously false. For any prime q, if q 0 (mod r), then q = r and Φ q (x) 0 (mod Φ r (x)) is not a unit. If q 1 (mod r), we have Φ q (x) 1 (mod Φ r (x)), which is the multiplicative identity. Then, Φ qm (x) 1 (mod Φ r (x)) for any integer m > 0. If q 1 (mod r), then Φ q (x) x 1 (mod Φ r (x)). The subgroup of F generated by x 1 has only 2r elements, where F = (Z/pZ)[x]/(h(x)). We have Φ qm1 (x) Φ qm2 (x) (mod Φ r (x)) for some 1 m 1 m 2 (mod 2r) Lower bound for G Assuming Conjecture is true, we establish a lower bound for G in Lemma that implies the correctness of Algorithm See Theorem Recall the following. Theorem (Stirling s approximation) For N > 0, 2πN( N e )N e 1/(12N+1) < N! < 2πN( N e )N e 1/(12N). Lemma If Conjecture is true, then G > 1 2 r 11 r. Proof. If r 5, then 1 11 r < 2 G since G has as least two elements, x and x 1. 2 r Suppose r > 5, i.e. r 7. If Conjecture is true, there are ( ) r 3 k distinct Φ p1 p 2 p k (x) in G by Lemma and Dirichlet s Theorem (Theorem ). Consider 1 For example, let m 1 and m 2 be distinct primes such that m 1 m 2 m (mod 2r) with m 1, 0, 1 (mod r). 76
87 k = r 3. By Theorem 5.2.9, 2 (r 3)! (((r 3)/2)!) 2 > = ( r 3 e )r 3 e 1/(12r 35) 2π(r 3) ( ) 2 ( r 3 2e )(r 3)/2 e 1/(6r 18) 2π( r 3) 2 2 r 32π(r 3) e 1 12r r 9 Therefore, G ( ) r 3 (r 3)/2 > 1 2 r 11 > e π 2 r r > 1 2 r. 11 r r, as required. Theorem If Conjecture is true, then Algorithm returns PRIME at the last line only if n is a prime. Proof. If algorithm returns PRIME at the last line, then r is an odd prime, n is not a nontrivial power of a prime, n n 0 = , and ord r (n) = r 1 > log 2 n. Moreover, all prime divisors of n are greater than r, and (x 1) n x n 1 (mod n, x r 1). Suppose ord r (n) > t 384. Let c = (log 2 n)/r > 1 and let ( f(c, n) = n2/5 n (c ) c) log n. log n c Note that n2/5 log n is increasing for n > 32. So f(c, n) is increasing in n for n > 32 and c 1. The term n(c c) log n c is increasing in c for c 1. For n > 392 and c c 0 = 1.084, which implies that ( n 2/5 n (c ) c) log n = f(c, n) > f(c 0, 384) > 11, log n c 1 2 r = 1 11 r 11 ( n c log n c log n ) > n c log n 2 5 = n r
88 If 1 c < c 0 and n n 0, then n2/5 log n > 11 c 0 for n n 0 and 1 2 r > 1 11 r 11 ( n r c0 log n ) > n r 2 5. If n is not a power of p, then Lemma and Lemma together imply that n n 2 5 G > n n 2 5, which is a contradiction. Since the algorithm removes nontrivial powers of primes, we must have that n is a prime. Now suppose that ord r (n) t. Then, r > t (ord r n) 2 > log 4 n. We have 1 2 r 1 11 r 11 n log n r r > n r for n 5 and r 3, which includes all possible values of n and r. By Lemma and Lemma , n is a prime. Note that it is possible to minimize the value of n 0 by manipulating the parameters in the proof of Theorem However, such minimization is unnecessary for any practical use of Algorithm because n 0 = is small enough for running an O( n) algorithm Evidence for Conjecture In this section, we give evidence for Conjecture In particular, we prove it for k = 1, 2. Recall that p and r are primes as in Conjecture Lemma For any positive integer M, M 1 k=0 x k 0 (mod p, Φ r (x)) M 0 (mod r). 78
89 Proof. Let m M (mod r) with 0 m < r. Then, M 1 k=0 m 1 x k 0 x k 0 k=0 (mod p, Φ r (x)) (mod p, Φ r (x)) m = 0 M 0 (mod r) The following result is well known. Theorem (Dirichlet s theorem) Let a, d be two positive coprime integers. Then, there are infinitely many primes congruent to a mod d. Lemma For any positive integer N with (N, r) = 1, there exist infinitely many primes q such that Φ q (x) N 1 k=0 x k (mod p, Φ r (x)). Proof. Given N > 0 and (N, r) = 1, by Theorem there exists a prime q with q N (mod r). By Lemma , q 1 Φ q (x) = k=0 ( q N 1 x k = x N k=0 x k ) + N 1 k=0 x k N 1 k=0 x k (mod p, Φ r (x)). Proposition Φ p1 (x) Φ q1 (x) (mod p, Φ r (x)) p 1 q 1 (mod r), where p 1, q 1 are primes. 79
90 Proof. If p 1 = q 1, the proposition is trivially true. Without loss of generality, suppose p 1 < q 1. Then, Φ p1 (x) Φ q1 (x) p 1 1 k=0 q 1 p 1 1 k=0 x k x k 0 q 1 1 k=0 x k (mod p, Φ r (x)) (mod p, Φ r (x)) (mod p, Φ r (x)) p 1 q 1 (mod r), by Lemma Proposition Let p 1, p 2, q 1, q 2 be primes with p 1, p 2 distinct mod r, and with q 1, q 2 distinct mod r. Moreover, assume that p i 1 (mod r) for i = 1, 2. Then, Φ p1 p 2 (x) Φ q1 q 2 (x) (mod p, Φ r (x)) (5.2.4) implies where {i, j} = {1, 2}. p 1 q i (mod r) and p 2 q j (mod r), Proof. Case 1: Suppose that all p 1, p 2, q 1, q 2 are distinct mod r. Then, r is at least 7. For primes p 0 q 0, Φ p0 q 0 (x) = (xp 0 q 0 1)(x 1) (x p 0 1)(x q 0 1). Therefore, Φ p 1 p 2 (x) Φ q1 q 2 (x) (mod p, Φ r (x)) implies (x p 1p 2 1)(x 1) (x p 1 1)(x p 2 (xq1q2 1)(x 1) 1) (x q 1 1)(x q 2 (mod p, Φ r (x)) 1) Multiply both sides by the denominators: (x p 1p 2 1)(x q 1 1)(x q 2 1) (x q 1q 2 1)(x p 1 1)(x p 2 1) (mod p, Φ r (x)). (5.2.5) 80
91 If p 1 p 2 q 1 q 2 (mod r), congruence (5.2.5) becomes (x q 1 1)(x q 2 1) (x p 1 1)(x p 2 1) (mod p, Φ r (x)), x q 1+q 2 + x p 1 + x p 2 x p 1+p 2 + x q 1 + x q 2 (mod p, Φ r (x)). Note that p 1 + p 2 q 1 + q 2 (mod r). Otherwise, p 1, p 2, q 1, q 2 are distinct roots of T 2 (p 1 + p 2 )T + p 1 p 2 in F r, which is a contradiction. Then, x q 1+q 2 + x p 1 + x p 2 (mod p, x r 1) and x p 1+p 2 + x q 1 + x q 2 (mod p, x r 1) are polynomials with different degrees since the three terms x q 1+q 2, x p 1, x p 2 are not congruent to any of x p 1+p 2, x q 1, x q 2. Therefore, since Φ r (x) = (x r 1)/(x 1), x q 1+q 2 + x p 1 + x p2 x p 1+p 2 + x q 1 + x q 2 (mod p, x r 1) = x q 1+q 2 x p 1+p 2 x 1 xq 1 x p 1 x 1 + xq 2 x p 2 x 1 (mod p, Φ r (x)) = x q 1+q 2 + x p 1 + x p2 x p 1+p 2 + x q 1 + x q 2 (mod p, Φ r (x)) This contradiction implies that p 1 p 2 q 1 q 2 (mod r). Expanding the terms in congruence (5.2.5), we have x p 1p 2 +q 1 +q 2 x p 1p 2 +q 1 x p 1p 2 +q 2 x q 1+q 2 + x p 1p 2 + x q 1 + x q 2 1 x q 1q 2 +p 1 +p 2 x q 1q 2 +p 1 x q 1q 2 +p 2 x p 1+p 2 + x q 1q 2 + x p 1 + x p 2 1 (mod p, Φ r (x)) Let f(x) = x p 1p 2 +q 1 +q 2 + x q 1q 2 +p 1 + x q 1q 2 +p 2 + x p 1+p 2 + x p 1p 2 + x q 1 + x q 2, g(x) = x q 1q 2 +p 1 +p 2 + x p 1p 2 +q 1 + x p 1p 2 +q 2 + x q 1+q 2 + x q 1q 2 + x p 1 + x p 2. As before, we first show that f(x) g(x) (mod p, x r 1). Since x 1 divides 81
92 f(x) g(x), we must have f(x) g(x) (mod p, Φ r (x)). As a result, congruence (5.2.5) leads to a contradiction. The sum of the coefficients in f(x) (mod x r 1) is exactly 7. There are only 7 terms in f(x). Since each power of x is congruent mod x r 1 to a power x j with 0 j < r, we see that f(x) is congruent mod x r 1 to a sum of seven not necessarily distinct such powers x j. Since p > r 7, these cannot cancel each other mod p. A similar result holds for g(x). If f(x) g(x) (mod p, x r 1), then x p 2 is congruent to some term in f(x). The only possibilities are x p 1p 2 +q 1 +q 2 and x q 1q 2 +p 1. Similarly, x p 1 must be congruent to x p 1p 2 +q 1 +q 2 or x q 1q 2 +p 2. If p 2 q 1 q 2 + p 1 (mod r), (5.2.6) then p 1 q 1 q 2 + p 2 (mod r); otherwise, p 2 p 1 q 1 q 2 p 1 p 2 (mod r), which is impossible. Therefore, p 1 p 1 p 2 + q 1 + q 2 (mod r). Then, using these congruences for p 1 and p 2, we obtain x q 1q 2 +p 2 + x p 1+p 2 + x p 1p 2 + x q 1 + x q 2 x q 1q 2 +p 1 +p 2 + x p 1p 2 +q 1 + x p 1p 2 +q 2 + x q 1+q 2 + x q 1q 2 (mod p, x r 1) The only possible term in the left-hand side congruent to x q 1q 2 is x p 1+p 2. But congruence (5.2.6) implies q 1 q 2 p 2 p 1 (mod r). So q 1 q 2 p 1 + p 2 (mod r). Hence, f(x) g(x) (mod p, x r 1). If p 2 p 1 p 2 + q 1 + q 2 (mod r), then p 1 q 1 q 2 + p 2 (mod r). The case is the same as before by switching the roles of p 1 and p 2. 82
93 Case 2: Suppose that some p i is congruent to some q j mod r. we may assume that p 1 q 1 m (mod r) for some 1 < m < r. Note that m 1 by assumption. By Lemma , Φ p1 (x) Φ q1 (x) m 1 k=0 xk (mod p, Φ r (x)). Therefore, Φ p1 p 2 (x) Φ q1 q 2 (x) (mod p, x r 1) = Φ p1 (x)φ p1 p 2 (x) Φ q1 (x)φ q1 q 2 (x) (mod p, x r 1) = Φ p1 (x p 2 ) Φ q1 (x q 2 ) (mod p, x r 1) = m 1 k=1 x kp 2 m 1 k=1 x kq 2 (mod p, x r 1) Let M = {1, 2,, m 1}. We see that p 2 M = q 2 M as subsets of Z/rZ. Let a p 2 q 1 2 (mod r). Then multiplication by a (mod r) is a permutation of M. By Lemma below, a = 1. Therefore, p 2 q 2 (mod r). Lemma Let q be a prime and let 1 < m < q. Let M = {1, 2,, m 1}. Suppose 0 a < q and am = M in F q. Then, a = 1. Proof. If a = 0, then am = {0} = M, so we may assume that a 1. For any 1 a < q, multiplication by a (mod q) is a permutation of {1, 2,, q 1}. If am = M, multiplication by a (mod q) is also a permutation of M. As a consequence, multiplication by a (mod q) also permutes M def = {m,, q 1}. Both M and M are not empty since 1 < m < q. Suppose a 1. Let q = ua+v, where the quotient u = q/a 1 and the remainder v = q ua < a ua. This implies ua > q/2. We claim that {1, 2,, ua} M and {q 1, q 2,, q ua} M. Then, M + M > q, which leads to a contradiction. 83
94 We show by induction that A k def = {1, 2,, ak} M for 1 k u. Note that A k is a set of exactly ak elements in F q because ak au < q. Since 1 M, we have a 1 M. Therefore, 1 a m 1, so A 1 M. Assume A k 1 M for k > 1. We have k A k 1 because k 2(k 1) a(k 1). Then, ak am = M, which implies A k M. The statement {q 1, q 2,, q ak} M can be shown by a similar argument, beginning with q 1 M. 84
95 Bibliography [1] William Adams and Daniel Shanks. Strong primality tests that are not sufficient. Math. Comp., 39(159): , [2] Leonard M. Adleman, Kenneth L. Manders, and Gary L. Miller. On taking roots in finite fields. In FOCS, pages IEEE, [3] Leonard M. Adleman, Carl Pomerance, and Robert S. Rumely. On distinguishing prime numbers from composite numbers. Ann. of Math., 117(1): , jan [4] Manindra Agrawal and Somenath Biswas. Primality and identity testing via Chinese remaindering. J. ACM, 50(4): , [5] Manindra Agrawal, Neeraj Kayal, and Nitin Saxena. PRIMES is in P. Ann. of Math. (2), 160(2): , [6] W. R. Alford, Andrew Granville, and Carl Pomerance. There are infinitely many Carmichael numbers. Ann. of Math., 139: , [7] Nesmith C. Ankeny. The least quadratic non residue. Ann. of Math., 55(1):65 72, jan [8] Michael Artin. Algebra. Prentic Hall, [9] A. O. L. Atkin and F. Morain. Elliptic curves and primality proving. Math. Comp., 61(203):29 68, [10] Eric Bach. A note on square roots in finite fields. IEEE Transactions on Information Theory, 36(6): , nov [11] Eric Bach and Klaus Huber. Note on taking square-roots modulo N. IEEE Transactions on Information Theory, 45(2): , mar [12] Paulo S. Barreto and José Felipe Voloch. Efficient computation of roots in finite fields. Des. Codes Cryptography, 39(2): , [13] Elwyn R. Berlekamp. Factoring polynomials over finite fields. Bell System Technical Journal, 46: ,
96 [14] Elwyn R. Berlekamp. Factoring polynomials over large finite fields. Math. Comp., 24: , [15] Daniel J. Bernstein. Faster square roots in annoying finite fields. Preprint. [16] Pedro Berrizbeitia. Sharpening PRIMES is in P for a large family of numbers. Math. Comp., 74(252): (electronic), [17] Dan Boneh and Matt Franklin. Identity-based encryption from the Weil pairing. SIAM J. of Computing, 32: , [18] Johannes Buchmann and Victor Shoup. Constructing nonresidues in finite fields and the extended riemann hypothesis. Math. Comp., 65(215): , jul [19] David G. Cantor and Hans Zassenhaus. A new algorithm for factoring polynomials over finite fields. Math. Comp., 36(154): , [20] Michele Cipolla. Un metodo per la risoluzione della congruenza di secondo grado. Rendiconto dell Accademia delle Scienze Fisiche e Matematiche Napoli, 9: , [21] David A. Clark and M. Ram Murty. The Euclidean algorithm for Galois extensions of Q. J. Reine Angew. Math., 459: , [22] Henri Cohen. A Course in Computational Algebraic Number Theory. Graduate Texts in Mathematics. Springer-Verlag, [23] Henri Cohen and Hendrik W. Lenstra Jr. Primality testing and Jacobi sums. Math. Comp., 42(165): , [24] Stephen A. Cook. On the minimum computation time of functions. PhD thesis, Harvard University, [25] Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. Introduction to Algorithms. The MIT Press, [26] Martin Dietzfelbinger. Primality Testing in Polynomial Time: From Randomized Algorithms to PRIMES Is in P. Springer, [27] Etienne Fouvry. Théorème de Brun-Titchmarsh; application au théorème de Fermat. Invent. Math., 79(2): , [28] Martin Fürer. Faster integer multiplication. In STOC 07: Proceedings of the thirty-ninth annual ACM symposium on Theory of computing, pages 57 66, New York, NY, USA, ACM Press. [29] Joachim Von Zur Gathen and Daniel Panario. Factoring polynomials over finite fields: a survey. J. Symb. Comput., 31(1-2):3 17,
97 [30] Shafi Goldwasser and Joe Kilian. Primality testing using elliptic curves. J. ACM, 46(4): , [31] Andrew Granville. It is easy to determine whether a given integer is prime. Bull. Amer. Math. Soc., 42:3 38, [32] Gareth A. Jones and Josephine M. Jones. Elementary Number Theory. Springer- Verlag, [33] Hendrik W. Lenstra Jr. Factoring integers with elliptic curves. Ann. of Math., 126: , [34] Hendrik W. Lenstra Jr. and Carl Pomerance. Primality testing with gaussian periods, Preliminary version. Available at carlp/pdf/complexity12.pdf. [35] Donald E. Knuth. The Art of Computer Programming, Volume 2: Seminumerical Algorithms. Addison-Wesley, Reading, 1st (2nd printing) edition, [36] Donald E. Knuth. The Art of Computer Programming, Volume 1: Fundamental Algorithms. Addison-Wesley, Reading, 3rd edition, [37] Neal Koblitz. Elliptic curve cryptosystems. Math. Comp., 48: , [38] Neal Koblitz. A Course in Number Theory and Cryptography. Graduate Texts in Mathematics. Springer-Verlag, [39] Derrick H. Lehmer. Tests for primality by the converse of Fermat s theorem. Bull. AMS, 33: , [40] Derrick H. Lehmer. Computer technology applied to the theory of numbers. In Studies in Number Theory, pages Math. Assoc. Amer. (distributed by Prentice-Hall, Englewood Cliffs, N.J.), [41] Arjen K. Lenstra, Hendrik W. Lenstra Jr., and László Lovász. Factoring polynomials with rational coefficients. Math. Annalen, 261: , [42] Rudolf Lidl and Harald Niederreiter. Introduction to Finite Fields and their Applications. Cambridge University Press, [43] Scott Lindhurst. An analysis of Shanks s algorithm for computing square roots in finite fields. CRM Proceedings and Lecture Notes, 19: , [44] Gary L. Miller. Riemann s hypothesis and tests for primality. In STOC 75: Proceedings of seventh annual ACM symposium on Theory of computing, pages , New York, NY, USA, ACM Press. [45] Siguna Müller. On probable prime testing and the computation of square roots mod n. In Wieb Bosma, editor, Algorithmic number theory: ANTS-IV, volume 1838 of Lecture Notes in Computer Science, pages , Berlin, Springer-Verlag. 87
98 [46] Siguna Müller. On the computation of square roots in finite fields. Des. Codes Cryptography, 31(3): , [47] P. Pépin. Sur la formule 2 2n + 1. Comptes Rendus Acad. Sci. Paris, 85: , [48] Henry C. Pocklington. The determination of the prime or composite nature of large numbers by Fermat s theorem. Proc. of the Cambridge Philosophical Soc., 18:29 30, [49] Michael O. Rabin. Probabilistic algorithm for testing primality. J. Number Theory, 12(1): , [50] Michael O. Rabin. Probabilistic algorithms in finite fields. SIAM Journal on Computing, 9(2): , [51] René C. Peralta. A simple and fast probabilistic algorithm for computing square roots modulo a prime number. IEEE Transactions on Information Theory, 32(6): , nov [52] Bernhard Riemann. Ueber die Anzahl der Primzahlen unter einer gegebenen Grösse. Monatsberichte der Berliner Akademie, pages , nov [53] Ronald L. Rivest, Adi Shamir, and Leonard M. Adleman. A method for obtaining digital signatures and public-key cryptosystems. Commun. ACM, 21(2): , [54] Arnold Schönhage and Volker Strassen. Schnelle Multiplikation großer Zahlen. Computing, 7: , [55] René Schoof. Elliptic curves over finite fields and the computation of square roots mod p. Math. Comp., 44(170): , apr [56] Daniel Shanks. Five number-theoretic algorithms. In Proc. 2nd Manitoba Conf. Numer. Math., volume VII of Congressus Numerantium, pages 51 70, Winnipeg, Manitoba, Utilitas Mathematica. [57] Victor Shoup. A Computational Introduction to Number Theory and Algebra. Cambridge University Press, [58] Joseph H. Silverman. The Arithmetic of Elliptic Curves. Graduate Texts in Mathematics. Springer, [59] Robert Solovay and V. Strassen. A fast Monte-Carlo test for primality. SIAM Journal on Computing, 6(1):84 85, [60] Tsz-Wo Sze. On solving univariate polynomial equations over finite fields and some related problems, Preliminary version. 88
99 [61] Tsz-Wo Sze. On taking square roots and constructing quadratic nonresidues over finite fields, Preliminary version. [62] Tsz-Wo Sze. A potentially fast primality test, Preliminary version. [63] Alberto Tonelli. Bemerkung über die Auflösung quadratischer Congruenzen. Nachrichten der Akademie der Wissenschaften in Göttingen, pages , [64] Andrei L. Toom. The complexity of a scheme of functional elements realizing the multiplication of integers. Soviet Mathematics Doklady, 3: , [65] Wade Trappe and Lawrence C. Washington. Introduction to Cryptography with Coding Theory. Prentice Hall, 2nd edition, [66] Stephen M. Turner. Square roots mod p. The American Mathematical Monthly, 101(5): , may [67] Christiaan van de Woestijne. Deterministic equation solving over finite fields. PhD thesis, Universiteit Leiden, Leiden, Netherlands, [68] Joachim von zur Gathen and Jürgen Gerhard. Modern Computer Algebra. Cambridge University Press, Cambridge, United Kingdom, 2nd edition, [69] Lawrence C. Washington. Elliptic Curves: Number Theory and Cryptography. Chapman & Hall/CRC, [70] Hugh C. Williams. Édouard Lucas and Primality Testing, volume 22 of Canadian Mathematical Society Series of Monographs and Advanced Texts. Wiley- Interscience, [71] David Y.Y. Yun. On square-free decomposition algorithms. In SYMSAC 76: Proceedings of the third ACM symposium on Symbolic and algebraic computation, pages 26 35, New York, NY, USA, ACM Press. 89
I. GROUPS: BASIC DEFINITIONS AND EXAMPLES
I GROUPS: BASIC DEFINITIONS AND EXAMPLES Definition 1: An operation on a set G is a function : G G G Definition 2: A group is a set G which is equipped with an operation and a special element e G, called
minimal polyonomial Example
Minimal Polynomials Definition Let α be an element in GF(p e ). We call the monic polynomial of smallest degree which has coefficients in GF(p) and α as a root, the minimal polyonomial of α. Example: We
Lecture 13 - Basic Number Theory.
Lecture 13 - Basic Number Theory. Boaz Barak March 22, 2010 Divisibility and primes Unless mentioned otherwise throughout this lecture all numbers are non-negative integers. We say that A divides B, denoted
7. Some irreducible polynomials
7. Some irreducible polynomials 7.1 Irreducibles over a finite field 7.2 Worked examples Linear factors x α of a polynomial P (x) with coefficients in a field k correspond precisely to roots α k [1] of
How To Prove The Dirichlet Unit Theorem
Chapter 6 The Dirichlet Unit Theorem As usual, we will be working in the ring B of algebraic integers of a number field L. Two factorizations of an element of B are regarded as essentially the same if
Primality - Factorization
Primality - Factorization Christophe Ritzenthaler November 9, 2009 1 Prime and factorization Definition 1.1. An integer p > 1 is called a prime number (nombre premier) if it has only 1 and p as divisors.
8 Primes and Modular Arithmetic
8 Primes and Modular Arithmetic 8.1 Primes and Factors Over two millennia ago already, people all over the world were considering the properties of numbers. One of the simplest concepts is prime numbers.
Module MA3411: Abstract Algebra Galois Theory Appendix Michaelmas Term 2013
Module MA3411: Abstract Algebra Galois Theory Appendix Michaelmas Term 2013 D. R. Wilkins Copyright c David R. Wilkins 1997 2013 Contents A Cyclotomic Polynomials 79 A.1 Minimum Polynomials of Roots of
Prime numbers and prime polynomials. Paul Pollack Dartmouth College
Prime numbers and prime polynomials Paul Pollack Dartmouth College May 1, 2008 Analogies everywhere! Analogies in elementary number theory (continued fractions, quadratic reciprocity, Fermat s last theorem)
FACTORING POLYNOMIALS IN THE RING OF FORMAL POWER SERIES OVER Z
FACTORING POLYNOMIALS IN THE RING OF FORMAL POWER SERIES OVER Z DANIEL BIRMAJER, JUAN B GIL, AND MICHAEL WEINER Abstract We consider polynomials with integer coefficients and discuss their factorization
CONTINUED FRACTIONS AND PELL S EQUATION. Contents 1. Continued Fractions 1 2. Solution to Pell s Equation 9 References 12
CONTINUED FRACTIONS AND PELL S EQUATION SEUNG HYUN YANG Abstract. In this REU paper, I will use some important characteristics of continued fractions to give the complete set of solutions to Pell s equation.
Faster deterministic integer factorisation
David Harvey (joint work with Edgar Costa, NYU) University of New South Wales 25th October 2011 The obvious mathematical breakthrough would be the development of an easy way to factor large prime numbers
Galois Theory III. 3.1. Splitting fields.
Galois Theory III. 3.1. Splitting fields. We know how to construct a field extension L of a given field K where a given irreducible polynomial P (X) K[X] has a root. We need a field extension of K where
Short Programs for functions on Curves
Short Programs for functions on Curves Victor S. Miller Exploratory Computer Science IBM, Thomas J. Watson Research Center Yorktown Heights, NY 10598 May 6, 1986 Abstract The problem of deducing a function
CHAPTER SIX IRREDUCIBILITY AND FACTORIZATION 1. BASIC DIVISIBILITY THEORY
January 10, 2010 CHAPTER SIX IRREDUCIBILITY AND FACTORIZATION 1. BASIC DIVISIBILITY THEORY The set of polynomials over a field F is a ring, whose structure shares with the ring of integers many characteristics.
Factoring & Primality
Factoring & Primality Lecturer: Dimitris Papadopoulos In this lecture we will discuss the problem of integer factorization and primality testing, two problems that have been the focus of a great amount
On the largest prime factor of x 2 1
On the largest prime factor of x 2 1 Florian Luca and Filip Najman Abstract In this paper, we find all integers x such that x 2 1 has only prime factors smaller than 100. This gives some interesting numerical
SOLVING POLYNOMIAL EQUATIONS BY RADICALS
SOLVING POLYNOMIAL EQUATIONS BY RADICALS Lee Si Ying 1 and Zhang De-Qi 2 1 Raffles Girls School (Secondary), 20 Anderson Road, Singapore 259978 2 Department of Mathematics, National University of Singapore,
Cyclotomic Extensions
Chapter 7 Cyclotomic Extensions A cyclotomic extension Q(ζ n ) of the rationals is formed by adjoining a primitive n th root of unity ζ n. In this chapter, we will find an integral basis and calculate
Introduction to Finite Fields (cont.)
Chapter 6 Introduction to Finite Fields (cont.) 6.1 Recall Theorem. Z m is a field m is a prime number. Theorem (Subfield Isomorphic to Z p ). Every finite field has the order of a power of a prime number
ALGEBRAIC APPROACH TO COMPOSITE INTEGER FACTORIZATION
ALGEBRAIC APPROACH TO COMPOSITE INTEGER FACTORIZATION Aldrin W. Wanambisi 1* School of Pure and Applied Science, Mount Kenya University, P.O box 553-50100, Kakamega, Kenya. Shem Aywa 2 Department of Mathematics,
Introduction. Appendix D Mathematical Induction D1
Appendix D Mathematical Induction D D Mathematical Induction Use mathematical induction to prove a formula. Find a sum of powers of integers. Find a formula for a finite sum. Use finite differences to
Continued Fractions and the Euclidean Algorithm
Continued Fractions and the Euclidean Algorithm Lecture notes prepared for MATH 326, Spring 997 Department of Mathematics and Statistics University at Albany William F Hammond Table of Contents Introduction
3 1. Note that all cubes solve it; therefore, there are no more
Math 13 Problem set 5 Artin 11.4.7 Factor the following polynomials into irreducible factors in Q[x]: (a) x 3 3x (b) x 3 3x + (c) x 9 6x 6 + 9x 3 3 Solution: The first two polynomials are cubics, so if
U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009. Notes on Algebra
U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009 Notes on Algebra These notes contain as little theory as possible, and most results are stated without proof. Any introductory
SUM OF TWO SQUARES JAHNAVI BHASKAR
SUM OF TWO SQUARES JAHNAVI BHASKAR Abstract. I will investigate which numbers can be written as the sum of two squares and in how many ways, providing enough basic number theory so even the unacquainted
Factoring polynomials over finite fields
Factoring polynomials over finite fields Summary and et questions 12 octobre 2011 1 Finite fields Let p an odd prime and let F p = Z/pZ the (unique up to automorphism) field with p-elements. We want to
SOLUTIONS TO PROBLEM SET 3
SOLUTIONS TO PROBLEM SET 3 MATTI ÅSTRAND The General Cubic Extension Denote L = k(α 1, α 2, α 3 ), F = k(a 1, a 2, a 3 ) and K = F (α 1 ). The polynomial f(x) = x 3 a 1 x 2 + a 2 x a 3 = (x α 1 )(x α 2
Is n a Prime Number? Manindra Agrawal. March 27, 2006, Delft. IIT Kanpur
Is n a Prime Number? Manindra Agrawal IIT Kanpur March 27, 2006, Delft Manindra Agrawal (IIT Kanpur) Is n a Prime Number? March 27, 2006, Delft 1 / 47 Overview 1 The Problem 2 Two Simple, and Slow, Methods
SYSTEMS OF PYTHAGOREAN TRIPLES. Acknowledgements. I would like to thank Professor Laura Schueller for advising and guiding me
SYSTEMS OF PYTHAGOREAN TRIPLES CHRISTOPHER TOBIN-CAMPBELL Abstract. This paper explores systems of Pythagorean triples. It describes the generating formulas for primitive Pythagorean triples, determines
Integer Factorization using the Quadratic Sieve
Integer Factorization using the Quadratic Sieve Chad Seibert* Division of Science and Mathematics University of Minnesota, Morris Morris, MN 56567 [email protected] March 16, 2011 Abstract We give
Modern Algebra Lecture Notes: Rings and fields set 4 (Revision 2)
Modern Algebra Lecture Notes: Rings and fields set 4 (Revision 2) Kevin Broughan University of Waikato, Hamilton, New Zealand May 13, 2010 Remainder and Factor Theorem 15 Definition of factor If f (x)
ABSTRACT ALGEBRA: A STUDY GUIDE FOR BEGINNERS
ABSTRACT ALGEBRA: A STUDY GUIDE FOR BEGINNERS John A. Beachy Northern Illinois University 2014 ii J.A.Beachy This is a supplement to Abstract Algebra, Third Edition by John A. Beachy and William D. Blair
Prime Numbers and Irreducible Polynomials
Prime Numbers and Irreducible Polynomials M. Ram Murty The similarity between prime numbers and irreducible polynomials has been a dominant theme in the development of number theory and algebraic geometry.
Factoring Cubic Polynomials
Factoring Cubic Polynomials Robert G. Underwood 1. Introduction There are at least two ways in which using the famous Cardano formulas (1545) to factor cubic polynomials present more difficulties than
Quotient Rings and Field Extensions
Chapter 5 Quotient Rings and Field Extensions In this chapter we describe a method for producing field extension of a given field. If F is a field, then a field extension is a field K that contains F.
r + s = i + j (q + t)n; 2 rs = ij (qj + ti)n + qtn.
Chapter 7 Introduction to finite fields This chapter provides an introduction to several kinds of abstract algebraic structures, particularly groups, fields, and polynomials. Our primary interest is in
Factoring Polynomials
Factoring Polynomials Sue Geller June 19, 2006 Factoring polynomials over the rational numbers, real numbers, and complex numbers has long been a standard topic of high school algebra. With the advent
1 Homework 1. [p 0 q i+j +... + p i 1 q j+1 ] + [p i q j ] + [p i+1 q j 1 +... + p i+j q 0 ]
1 Homework 1 (1) Prove the ideal (3,x) is a maximal ideal in Z[x]. SOLUTION: Suppose we expand this ideal by including another generator polynomial, P / (3, x). Write P = n + x Q with n an integer not
ECE 842 Report Implementation of Elliptic Curve Cryptography
ECE 842 Report Implementation of Elliptic Curve Cryptography Wei-Yang Lin December 15, 2004 Abstract The aim of this report is to illustrate the issues in implementing a practical elliptic curve cryptographic
On the generation of elliptic curves with 16 rational torsion points by Pythagorean triples
On the generation of elliptic curves with 16 rational torsion points by Pythagorean triples Brian Hilley Boston College MT695 Honors Seminar March 3, 2006 1 Introduction 1.1 Mazur s Theorem Let C be a
An Overview of Integer Factoring Algorithms. The Problem
An Overview of Integer Factoring Algorithms Manindra Agrawal IITK / NUS The Problem Given an integer n, find all its prime divisors as efficiently as possible. 1 A Difficult Problem No efficient algorithm
MATH 289 PROBLEM SET 4: NUMBER THEORY
MATH 289 PROBLEM SET 4: NUMBER THEORY 1. The greatest common divisor If d and n are integers, then we say that d divides n if and only if there exists an integer q such that n = qd. Notice that if d divides
Ideal Class Group and Units
Chapter 4 Ideal Class Group and Units We are now interested in understanding two aspects of ring of integers of number fields: how principal they are (that is, what is the proportion of principal ideals
1 = (a 0 + b 0 α) 2 + + (a m 1 + b m 1 α) 2. for certain elements a 0,..., a m 1, b 0,..., b m 1 of F. Multiplying out, we obtain
Notes on real-closed fields These notes develop the algebraic background needed to understand the model theory of real-closed fields. To understand these notes, a standard graduate course in algebra is
6.2 Permutations continued
6.2 Permutations continued Theorem A permutation on a finite set A is either a cycle or can be expressed as a product (composition of disjoint cycles. Proof is by (strong induction on the number, r, of
A characterization of trace zero symmetric nonnegative 5x5 matrices
A characterization of trace zero symmetric nonnegative 5x5 matrices Oren Spector June 1, 009 Abstract The problem of determining necessary and sufficient conditions for a set of real numbers to be the
Factorization Algorithms for Polynomials over Finite Fields
Degree Project Factorization Algorithms for Polynomials over Finite Fields Sajid Hanif, Muhammad Imran 2011-05-03 Subject: Mathematics Level: Master Course code: 4MA11E Abstract Integer factorization is
Revised Version of Chapter 23. We learned long ago how to solve linear congruences. ax c (mod m)
Chapter 23 Squares Modulo p Revised Version of Chapter 23 We learned long ago how to solve linear congruences ax c (mod m) (see Chapter 8). It s now time to take the plunge and move on to quadratic equations.
MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS
MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS Systems of Equations and Matrices Representation of a linear system The general system of m equations in n unknowns can be written a x + a 2 x 2 + + a n x n b a
THE FUNDAMENTAL THEOREM OF ALGEBRA VIA PROPER MAPS
THE FUNDAMENTAL THEOREM OF ALGEBRA VIA PROPER MAPS KEITH CONRAD 1. Introduction The Fundamental Theorem of Algebra says every nonconstant polynomial with complex coefficients can be factored into linear
SECTION 10-2 Mathematical Induction
73 0 Sequences and Series 6. Approximate e 0. using the first five terms of the series. Compare this approximation with your calculator evaluation of e 0.. 6. Approximate e 0.5 using the first five terms
Monogenic Fields and Power Bases Michael Decker 12/07/07
Monogenic Fields and Power Bases Michael Decker 12/07/07 1 Introduction Let K be a number field of degree k and O K its ring of integers Then considering O K as a Z-module, the nicest possible case is
ELLIPTIC CURVES AND LENSTRA S FACTORIZATION ALGORITHM
ELLIPTIC CURVES AND LENSTRA S FACTORIZATION ALGORITHM DANIEL PARKER Abstract. This paper provides a foundation for understanding Lenstra s Elliptic Curve Algorithm for factoring large numbers. We give
Winter Camp 2011 Polynomials Alexander Remorov. Polynomials. Alexander Remorov [email protected]
Polynomials Alexander Remorov [email protected] Warm-up Problem 1: Let f(x) be a quadratic polynomial. Prove that there exist quadratic polynomials g(x) and h(x) such that f(x)f(x + 1) = g(h(x)).
Integer roots of quadratic and cubic polynomials with integer coefficients
Integer roots of quadratic and cubic polynomials with integer coefficients Konstantine Zelator Mathematics, Computer Science and Statistics 212 Ben Franklin Hall Bloomsburg University 400 East Second Street
Algebraic and Transcendental Numbers
Pondicherry University July 2000 Algebraic and Transcendental Numbers Stéphane Fischler This text is meant to be an introduction to algebraic and transcendental numbers. For a detailed (though elementary)
Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics
Undergraduate Notes in Mathematics Arkansas Tech University Department of Mathematics An Introductory Single Variable Real Analysis: A Learning Approach through Problem Solving Marcel B. Finan c All Rights
calculating the result modulo 3, as follows: p(0) = 0 3 + 0 + 1 = 1 0,
Homework #02, due 1/27/10 = 9.4.1, 9.4.2, 9.4.5, 9.4.6, 9.4.7. Additional problems recommended for study: (9.4.3), 9.4.4, 9.4.9, 9.4.11, 9.4.13, (9.4.14), 9.4.17 9.4.1 Determine whether the following polynomials
Basics of Polynomial Theory
3 Basics of Polynomial Theory 3.1 Polynomial Equations In geodesy and geoinformatics, most observations are related to unknowns parameters through equations of algebraic (polynomial) type. In cases where
Mathematics Course 111: Algebra I Part IV: Vector Spaces
Mathematics Course 111: Algebra I Part IV: Vector Spaces D. R. Wilkins Academic Year 1996-7 9 Vector Spaces A vector space over some field K is an algebraic structure consisting of a set V on which are
Every Positive Integer is the Sum of Four Squares! (and other exciting problems)
Every Positive Integer is the Sum of Four Squares! (and other exciting problems) Sophex University of Texas at Austin October 18th, 00 Matilde N. Lalín 1. Lagrange s Theorem Theorem 1 Every positive integer
FINITE FIELDS KEITH CONRAD
FINITE FIELDS KEITH CONRAD This handout discusses finite fields: how to construct them, properties of elements in a finite field, and relations between different finite fields. We write Z/(p) and F p interchangeably
Breaking The Code. Ryan Lowe. Ryan Lowe is currently a Ball State senior with a double major in Computer Science and Mathematics and
Breaking The Code Ryan Lowe Ryan Lowe is currently a Ball State senior with a double major in Computer Science and Mathematics and a minor in Applied Physics. As a sophomore, he took an independent study
11 Ideals. 11.1 Revisiting Z
11 Ideals The presentation here is somewhat different than the text. In particular, the sections do not match up. We have seen issues with the failure of unique factorization already, e.g., Z[ 5] = O Q(
FACTORING AFTER DEDEKIND
FACTORING AFTER DEDEKIND KEITH CONRAD Let K be a number field and p be a prime number. When we factor (p) = po K into prime ideals, say (p) = p e 1 1 peg g, we refer to the data of the e i s, the exponents
Math 4310 Handout - Quotient Vector Spaces
Math 4310 Handout - Quotient Vector Spaces Dan Collins The textbook defines a subspace of a vector space in Chapter 4, but it avoids ever discussing the notion of a quotient space. This is understandable
Number Theory. Proof. Suppose otherwise. Then there would be a finite number n of primes, which we may
Number Theory Divisibility and Primes Definition. If a and b are integers and there is some integer c such that a = b c, then we say that b divides a or is a factor or divisor of a and write b a. Definition
Lectures on Number Theory. Lars-Åke Lindahl
Lectures on Number Theory Lars-Åke Lindahl 2002 Contents 1 Divisibility 1 2 Prime Numbers 7 3 The Linear Diophantine Equation ax+by=c 12 4 Congruences 15 5 Linear Congruences 19 6 The Chinese Remainder
Die ganzen zahlen hat Gott gemacht
Die ganzen zahlen hat Gott gemacht Polynomials with integer values B.Sury A quote attributed to the famous mathematician L.Kronecker is Die Ganzen Zahlen hat Gott gemacht, alles andere ist Menschenwerk.
Factoring Algorithms
Factoring Algorithms The p 1 Method and Quadratic Sieve November 17, 2008 () Factoring Algorithms November 17, 2008 1 / 12 Fermat s factoring method Fermat made the observation that if n has two factors
(a) Write each of p and q as a polynomial in x with coefficients in Z[y, z]. deg(p) = 7 deg(q) = 9
Homework #01, due 1/20/10 = 9.1.2, 9.1.4, 9.1.6, 9.1.8, 9.2.3 Additional problems for study: 9.1.1, 9.1.3, 9.1.5, 9.1.13, 9.2.1, 9.2.2, 9.2.4, 9.2.5, 9.2.6, 9.3.2, 9.3.3 9.1.1 (This problem was not assigned
Constructing Pairing-Friendly Elliptic Curves with Embedding Degree 10
with Embedding Degree 10 University of California, Berkeley, USA ANTS-VII, 2006 Outline 1 Introduction 2 The CM Method: The Basic Construction The CM Method: Generating Families of Curves 3 Outline 1 Introduction
a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2.
Chapter 1 LINEAR EQUATIONS 1.1 Introduction to linear equations A linear equation in n unknowns x 1, x,, x n is an equation of the form a 1 x 1 + a x + + a n x n = b, where a 1, a,..., a n, b are given
RSA Question 2. Bob thinks that p and q are primes but p isn t. Then, Bob thinks Φ Bob :=(p-1)(q-1) = φ(n). Is this true?
RSA Question 2 Bob thinks that p and q are primes but p isn t. Then, Bob thinks Φ Bob :=(p-1)(q-1) = φ(n). Is this true? Bob chooses a random e (1 < e < Φ Bob ) such that gcd(e,φ Bob )=1. Then, d = e -1
MATH10040 Chapter 2: Prime and relatively prime numbers
MATH10040 Chapter 2: Prime and relatively prime numbers Recall the basic definition: 1. Prime numbers Definition 1.1. Recall that a positive integer is said to be prime if it has precisely two positive
Factorization Methods: Very Quick Overview
Factorization Methods: Very Quick Overview Yuval Filmus October 17, 2012 1 Introduction In this lecture we introduce modern factorization methods. We will assume several facts from analytic number theory.
OSTROWSKI FOR NUMBER FIELDS
OSTROWSKI FOR NUMBER FIELDS KEITH CONRAD Ostrowski classified the nontrivial absolute values on Q: up to equivalence, they are the usual (archimedean) absolute value and the p-adic absolute values for
Chapter 4, Arithmetic in F [x] Polynomial arithmetic and the division algorithm.
Chapter 4, Arithmetic in F [x] Polynomial arithmetic and the division algorithm. We begin by defining the ring of polynomials with coefficients in a ring R. After some preliminary results, we specialize
MOP 2007 Black Group Integer Polynomials Yufei Zhao. Integer Polynomials. June 29, 2007 Yufei Zhao [email protected]
Integer Polynomials June 9, 007 Yufei Zhao [email protected] We will use Z[x] to denote the ring of polynomials with integer coefficients. We begin by summarizing some of the common approaches used in dealing
Homework until Test #2
MATH31: Number Theory Homework until Test # Philipp BRAUN Section 3.1 page 43, 1. It has been conjectured that there are infinitely many primes of the form n. Exhibit five such primes. Solution. Five such
H/wk 13, Solutions to selected problems
H/wk 13, Solutions to selected problems Ch. 4.1, Problem 5 (a) Find the number of roots of x x in Z 4, Z Z, any integral domain, Z 6. (b) Find a commutative ring in which x x has infinitely many roots.
PYTHAGOREAN TRIPLES KEITH CONRAD
PYTHAGOREAN TRIPLES KEITH CONRAD 1. Introduction A Pythagorean triple is a triple of positive integers (a, b, c) where a + b = c. Examples include (3, 4, 5), (5, 1, 13), and (8, 15, 17). Below is an ancient
QUADRATIC RECIPROCITY IN CHARACTERISTIC 2
QUADRATIC RECIPROCITY IN CHARACTERISTIC 2 KEITH CONRAD 1. Introduction Let F be a finite field. When F has odd characteristic, the quadratic reciprocity law in F[T ] (see [4, Section 3.2.2] or [5]) lets
Arithmetic algorithms for cryptology 5 October 2015, Paris. Sieves. Razvan Barbulescu CNRS and IMJ-PRG. R. Barbulescu Sieves 0 / 28
Arithmetic algorithms for cryptology 5 October 2015, Paris Sieves Razvan Barbulescu CNRS and IMJ-PRG R. Barbulescu Sieves 0 / 28 Starting point Notations q prime g a generator of (F q ) X a (secret) integer
ON GALOIS REALIZATIONS OF THE 2-COVERABLE SYMMETRIC AND ALTERNATING GROUPS
ON GALOIS REALIZATIONS OF THE 2-COVERABLE SYMMETRIC AND ALTERNATING GROUPS DANIEL RABAYEV AND JACK SONN Abstract. Let f(x) be a monic polynomial in Z[x] with no rational roots but with roots in Q p for
Discrete Mathematics, Chapter 4: Number Theory and Cryptography
Discrete Mathematics, Chapter 4: Number Theory and Cryptography Richard Mayr University of Edinburgh, UK Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 4 1 / 35 Outline 1 Divisibility
Zeros of a Polynomial Function
Zeros of a Polynomial Function An important consequence of the Factor Theorem is that finding the zeros of a polynomial is really the same thing as factoring it into linear factors. In this section we
POLYNOMIAL FUNCTIONS
POLYNOMIAL FUNCTIONS Polynomial Division.. 314 The Rational Zero Test.....317 Descarte s Rule of Signs... 319 The Remainder Theorem.....31 Finding all Zeros of a Polynomial Function.......33 Writing a
Recent Breakthrough in Primality Testing
Nonlinear Analysis: Modelling and Control, 2004, Vol. 9, No. 2, 171 184 Recent Breakthrough in Primality Testing R. Šleževičienė, J. Steuding, S. Turskienė Department of Computer Science, Faculty of Physics
Factoring of Prime Ideals in Extensions
Chapter 4 Factoring of Prime Ideals in Extensions 4. Lifting of Prime Ideals Recall the basic AKLB setup: A is a Dedekind domain with fraction field K, L is a finite, separable extension of K of degree
10 Splitting Fields. 2. The splitting field for x 3 2 over Q is Q( 3 2,ω), where ω is a primitive third root of 1 in C. Thus, since ω = 1+ 3
10 Splitting Fields We have seen how to construct a field K F such that K contains a root α of a given (irreducible) polynomial p(x) F [x], namely K = F [x]/(p(x)). We can extendthe procedure to build
A simple and fast algorithm for computing exponentials of power series
A simple and fast algorithm for computing exponentials of power series Alin Bostan Algorithms Project, INRIA Paris-Rocquencourt 7815 Le Chesnay Cedex France and Éric Schost ORCCA and Computer Science Department,
Study of algorithms for factoring integers and computing discrete logarithms
Study of algorithms for factoring integers and computing discrete logarithms First Indo-French Workshop on Cryptography and Related Topics (IFW 2007) June 11 13, 2007 Paris, France Dr. Abhijit Das Department
11 Multivariate Polynomials
CS 487: Intro. to Symbolic Computation Winter 2009: M. Giesbrecht Script 11 Page 1 (These lecture notes were prepared and presented by Dan Roche.) 11 Multivariate Polynomials References: MC: Section 16.6
A number field is a field of finite degree over Q. By the Primitive Element Theorem, any number
Number Fields Introduction A number field is a field of finite degree over Q. By the Primitive Element Theorem, any number field K = Q(α) for some α K. The minimal polynomial Let K be a number field and
RSA and Primality Testing
and Primality Testing Joan Boyar, IMADA, University of Southern Denmark Studieretningsprojekter 2010 1 / 81 Correctness of cryptography cryptography Introduction to number theory Correctness of with 2
This unit will lay the groundwork for later units where the students will extend this knowledge to quadratic and exponential functions.
Algebra I Overview View unit yearlong overview here Many of the concepts presented in Algebra I are progressions of concepts that were introduced in grades 6 through 8. The content presented in this course
Vector and Matrix Norms
Chapter 1 Vector and Matrix Norms 11 Vector Spaces Let F be a field (such as the real numbers, R, or complex numbers, C) with elements called scalars A Vector Space, V, over the field F is a non-empty
