Is n a prime number? Nitin Saxena. Turku, May Centrum voor Wiskunde en Informatica Amsterdam

Size: px
Start display at page:

Download "Is n a prime number? Nitin Saxena. Turku, May Centrum voor Wiskunde en Informatica Amsterdam"

Transcription

1 Is n a prime number? Nitin Saxena Centrum voor Wiskunde en Informatica Amsterdam Turku, May 2007 Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

2 Outline 1 The Problem 2 The High School Method 3 Advanced Methods 4 Studying Integers modulo n 5 Studying quadratic extensions mod n 6 Studying Elliptic Curves mod n 7 Studying Cyclotomic Extensions mod n 8 Questions Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

3 Outline The Problem 1 The Problem 2 The High School Method 3 Advanced Methods 4 Studying Integers modulo n 5 Studying quadratic extensions mod n 6 Studying Elliptic Curves mod n 7 Studying Cyclotomic Extensions mod n 8 Questions Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

4 The Problem The Problem Given an integer n, test whether it is prime. Easy Solution: Divide n by all numbers between 2 and (n 1). What is the hoo-ha about primality testing then?? Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

5 The Problem The Problem Given an integer n, test whether it is prime. Easy Solution: Divide n by all numbers between 2 and (n 1). What is the hoo-ha about primality testing then?? Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

6 The Problem The Problem Given an integer n, test whether it is prime. Easy Solution: Divide n by all numbers between 2 and (n 1). What is the hoo-ha about primality testing then?? Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

7 The Problem Efficiently Solving a Problem Given n we want a polynomial time primality test, one that runs in atmost (log n) c steps. Note that practically (log n) log log log n steps is efficient enough for the prime numbers we encounter in real life! Nevertheless, the notion of polynomial time elegantly captures the theoretical complexity of a problem. Notation: log is logarithm base 2. O (log c n) denotes log c n log log O(1) n. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

8 The Problem Efficiently Solving a Problem Given n we want a polynomial time primality test, one that runs in atmost (log n) c steps. Note that practically (log n) log log log n steps is efficient enough for the prime numbers we encounter in real life! Nevertheless, the notion of polynomial time elegantly captures the theoretical complexity of a problem. Notation: log is logarithm base 2. O (log c n) denotes log c n log log O(1) n. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

9 The Problem Efficiently Solving a Problem Given n we want a polynomial time primality test, one that runs in atmost (log n) c steps. Note that practically (log n) log log log n steps is efficient enough for the prime numbers we encounter in real life! Nevertheless, the notion of polynomial time elegantly captures the theoretical complexity of a problem. Notation: log is logarithm base 2. O (log c n) denotes log c n log log O(1) n. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

10 The Problem Efficiently Solving a Problem Given n we want a polynomial time primality test, one that runs in atmost (log n) c steps. Note that practically (log n) log log log n steps is efficient enough for the prime numbers we encounter in real life! Nevertheless, the notion of polynomial time elegantly captures the theoretical complexity of a problem. Notation: log is logarithm base 2. O (log c n) denotes log c n log log O(1) n. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

11 The Problem Efficiently Solving a Problem Given n we want a polynomial time primality test, one that runs in atmost (log n) c steps. Note that practically (log n) log log log n steps is efficient enough for the prime numbers we encounter in real life! Nevertheless, the notion of polynomial time elegantly captures the theoretical complexity of a problem. Notation: log is logarithm base 2. O (log c n) denotes log c n log log O(1) n. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

12 Outline The High School Method 1 The Problem 2 The High School Method 3 Advanced Methods 4 Studying Integers modulo n 5 Studying quadratic extensions mod n 6 Studying Elliptic Curves mod n 7 Studying Cyclotomic Extensions mod n 8 Questions Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

13 The High School Method Eratosthenes Sieve Proposed by Eratosthenes (ca. 300 BC). 1 List all numbers from 2 to n in a sequence. 2 Take the smallest uncrossed number and cross out all its multiples (except itself). 3 At the end all the uncrossed numbers are primes. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

14 The High School Method Eratosthenes Sieve Proposed by Eratosthenes (ca. 300 BC). 1 List all numbers from 2 to n in a sequence. 2 Take the smallest uncrossed number and cross out all its multiples (except itself). 3 At the end all the uncrossed numbers are primes. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

15 The High School Method Eratosthenes Sieve Proposed by Eratosthenes (ca. 300 BC). 1 List all numbers from 2 to n in a sequence. 2 Take the smallest uncrossed number and cross out all its multiples (except itself). 3 At the end all the uncrossed numbers are primes. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

16 The High School Method Eratosthenes Sieve Proposed by Eratosthenes (ca. 300 BC). 1 List all numbers from 2 to n in a sequence. 2 Take the smallest uncrossed number and cross out all its multiples (except itself). 3 At the end all the uncrossed numbers are primes. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

17 The High School Method Time Complexity To test primality n many steps would be enough. Not efficient by our standards! Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

18 The High School Method Time Complexity To test primality n many steps would be enough. Not efficient by our standards! Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

19 Outline Advanced Methods 1 The Problem 2 The High School Method 3 Advanced Methods 4 Studying Integers modulo n 5 Studying quadratic extensions mod n 6 Studying Elliptic Curves mod n 7 Studying Cyclotomic Extensions mod n 8 Questions Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

20 Rings Advanced Methods All the advanced methods associate a ring R to n and study its properties. The favorite rings are: 1 Z n Integers modulo n. 2 Z n [ 3] Quadratic extensions. 3 Z n [x, y]/(y 2 x 3 ax b) Elliptic curves. 4 Z n [x]/(x r 1) Cyclotomic rings. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

21 Rings Advanced Methods All the advanced methods associate a ring R to n and study its properties. The favorite rings are: 1 Z n Integers modulo n. 2 Z n [ 3] Quadratic extensions. 3 Z n [x, y]/(y 2 x 3 ax b) Elliptic curves. 4 Z n [x]/(x r 1) Cyclotomic rings. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

22 Rings Advanced Methods All the advanced methods associate a ring R to n and study its properties. The favorite rings are: 1 Z n Integers modulo n. 2 Z n [ 3] Quadratic extensions. 3 Z n [x, y]/(y 2 x 3 ax b) Elliptic curves. 4 Z n [x]/(x r 1) Cyclotomic rings. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

23 Rings Advanced Methods All the advanced methods associate a ring R to n and study its properties. The favorite rings are: 1 Z n Integers modulo n. 2 Z n [ 3] Quadratic extensions. 3 Z n [x, y]/(y 2 x 3 ax b) Elliptic curves. 4 Z n [x]/(x r 1) Cyclotomic rings. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

24 Rings Advanced Methods All the advanced methods associate a ring R to n and study its properties. The favorite rings are: 1 Z n Integers modulo n. 2 Z n [ 3] Quadratic extensions. 3 Z n [x, y]/(y 2 x 3 ax b) Elliptic curves. 4 Z n [x]/(x r 1) Cyclotomic rings. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

25 Rings Advanced Methods All the advanced methods associate a ring R to n and study its properties. The favorite rings are: 1 Z n Integers modulo n. 2 Z n [ 3] Quadratic extensions. 3 Z n [x, y]/(y 2 x 3 ax b) Elliptic curves. 4 Z n [x]/(x r 1) Cyclotomic rings. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

26 Outline Studying Integers modulo n 1 The Problem 2 The High School Method 3 Advanced Methods 4 Studying Integers modulo n 5 Studying quadratic extensions mod n 6 Studying Elliptic Curves mod n 7 Studying Cyclotomic Extensions mod n 8 Questions Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

27 Studying Integers modulo n Fermat s Little Theorem (FLT) Theorem (Fermat, 1660s) If n is prime then for every a, a n = a (mod n). Basically, for all a Z n, a n 1 = 1. This property is not sufficient for primality (Carmichael, 1910). But it is the starting point! Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

28 Studying Integers modulo n Fermat s Little Theorem (FLT) Theorem (Fermat, 1660s) If n is prime then for every a, a n = a (mod n). Basically, for all a Z n, a n 1 = 1. This property is not sufficient for primality (Carmichael, 1910). But it is the starting point! Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

29 Studying Integers modulo n Fermat s Little Theorem (FLT) Theorem (Fermat, 1660s) If n is prime then for every a, a n = a (mod n). Basically, for all a Z n, a n 1 = 1. This property is not sufficient for primality (Carmichael, 1910). But it is the starting point! Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

30 Studying Integers modulo n Fermat s Little Theorem (FLT) Theorem (Fermat, 1660s) If n is prime then for every a, a n = a (mod n). Basically, for all a Z n, a n 1 = 1. This property is not sufficient for primality (Carmichael, 1910). But it is the starting point! Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

31 Lucas Test Studying Integers modulo n Theorem (Lucas, 1876) n is prime iff a Z n such that a n 1 = 1 and a n 1 p p (n 1). 1 for all primes Suppose (n 1) is smooth and we know its prime factors. Do the above test for a random a. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

32 Lucas Test Studying Integers modulo n Theorem (Lucas, 1876) n is prime iff a Z n such that a n 1 = 1 and a n 1 p p (n 1). 1 for all primes Suppose (n 1) is smooth and we know its prime factors. Do the above test for a random a. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

33 Lucas Test Studying Integers modulo n Theorem (Lucas, 1876) n is prime iff a Z n such that a n 1 = 1 and a n 1 p p (n 1). 1 for all primes Suppose (n 1) is smooth and we know its prime factors. Do the above test for a random a. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

34 Lucas Test Studying Integers modulo n Theorem (Lucas, 1876) n is prime iff a Z n such that a n 1 = 1 and a n 1 p p (n 1). 1 for all primes Suppose (n 1) is smooth and we know its prime factors. Do the above test for a random a. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

35 Lucas Test Studying Integers modulo n Theorem (Lucas, 1876) n is prime iff a Z n such that a n 1 = 1 and a n 1 p p (n 1). 1 for all primes Suppose (n 1) is smooth and we know its prime factors. Do the above test for a random a. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

36 Studying Integers modulo n Pocklington-Lehmer Test Theorem (Pocklington, 1914) If a Z n such that a n 1 = 1 and gcd(a n 1 p i 1, n) = 1 for any distinct primes p 1,..., p t (n 1). Then any divisor of n is of the form 1 + kp 1 p t. Suppose t i=1 p t n and we have them. The above test is done for a random a. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

37 Studying Integers modulo n Pocklington-Lehmer Test Theorem (Pocklington, 1914) If a Z n such that a n 1 = 1 and gcd(a n 1 p i 1, n) = 1 for any distinct primes p 1,..., p t (n 1). Then any divisor of n is of the form 1 + kp 1 p t. Suppose t i=1 p t n and we have them. The above test is done for a random a. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

38 Studying Integers modulo n Pocklington-Lehmer Test Theorem (Pocklington, 1914) If a Z n such that a n 1 = 1 and gcd(a n 1 p i 1, n) = 1 for any distinct primes p 1,..., p t (n 1). Then any divisor of n is of the form 1 + kp 1 p t. Suppose t i=1 p t n and we have them. The above test is done for a random a. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

39 Studying Integers modulo n Pocklington-Lehmer Test Theorem (Pocklington, 1914) If a Z n such that a n 1 = 1 and gcd(a n 1 p i 1, n) = 1 for any distinct primes p 1,..., p t (n 1). Then any divisor of n is of the form 1 + kp 1 p t. Suppose t i=1 p t n and we have them. The above test is done for a random a. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

40 Studying Integers modulo n Pocklington-Lehmer Test Theorem (Pocklington, 1914) If a Z n such that a n 1 = 1 and gcd(a n 1 p i 1, n) = 1 for any distinct primes p 1,..., p t (n 1). Then any divisor of n is of the form 1 + kp 1 p t. Suppose t i=1 p t n and we have them. The above test is done for a random a. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

41 Studying Integers modulo n Pocklington-Lehmer Test Theorem (Pocklington, 1914) If a Z n such that a n 1 = 1 and gcd(a n 1 p i 1, n) = 1 for any distinct primes p 1,..., p t (n 1). Then any divisor of n is of the form 1 + kp 1 p t. Suppose t i=1 p t n and we have them. The above test is done for a random a. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

42 Studying Integers modulo n Solovay-Strassen Test Theorem (Strengthening FLT) An odd number n is prime iff for all a Z n, a n 1 2 = ( a n). Jacobi symbol ( a n) is computable in time O (log 2 n). Solovay-Strassen (1977) check the above equation for a random a. This gives a randomized test that takes time O (log 2 n). It errs with probability atmost 1 2. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

43 Studying Integers modulo n Solovay-Strassen Test Theorem (Strengthening FLT) An odd number n is prime iff for all a Z n, a n 1 2 = ( a n). Jacobi symbol ( a n) is computable in time O (log 2 n). Solovay-Strassen (1977) check the above equation for a random a. This gives a randomized test that takes time O (log 2 n). It errs with probability atmost 1 2. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

44 Studying Integers modulo n Solovay-Strassen Test Theorem (Strengthening FLT) An odd number n is prime iff for all a Z n, a n 1 2 = ( a n). Jacobi symbol ( a n) is computable in time O (log 2 n). Solovay-Strassen (1977) check the above equation for a random a. This gives a randomized test that takes time O (log 2 n). It errs with probability atmost 1 2. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

45 Studying Integers modulo n Solovay-Strassen Test Theorem (Strengthening FLT) An odd number n is prime iff for all a Z n, a n 1 2 = ( a n). Jacobi symbol ( a n) is computable in time O (log 2 n). Solovay-Strassen (1977) check the above equation for a random a. This gives a randomized test that takes time O (log 2 n). It errs with probability atmost 1 2. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

46 Studying Integers modulo n Solovay-Strassen Test Theorem (Strengthening FLT) An odd number n is prime iff for all a Z n, a n 1 2 = ( a n). Jacobi symbol ( a n) is computable in time O (log 2 n). Solovay-Strassen (1977) check the above equation for a random a. This gives a randomized test that takes time O (log 2 n). It errs with probability atmost 1 2. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

47 Studying Integers modulo n Pépin s Test This is a test specialized for Fermat numbers F k = 2 2k + 1. Theorem (Pépin, 1877) F k is prime iff 3 F k 1 2 = 1 (mod F k ). This yields a deterministic polynomial time primality test for Fermat numbers. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

48 Studying Integers modulo n Pépin s Test This is a test specialized for Fermat numbers F k = 2 2k + 1. Theorem (Pépin, 1877) F k is prime iff 3 F k 1 2 = 1 (mod F k ). This yields a deterministic polynomial time primality test for Fermat numbers. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

49 Studying Integers modulo n Pépin s Test This is a test specialized for Fermat numbers F k = 2 2k + 1. Theorem (Pépin, 1877) F k is prime iff 3 F k 1 2 = 1 (mod F k ). This yields a deterministic polynomial time primality test for Fermat numbers. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

50 Studying Integers modulo n Miller-Rabin Test Strengthening FLT further [Miller, 1975] An odd number n = s t (odd t) is prime iff for all a Z n, the sequence a 2s 1 t, a 2s 2 t,..., a t has either a 1 or all 1 s. We check the above equation for a random a. This gives a randomized test that takes time O (log 2 n). It errs with probability atmost 1 4. The most popular primality test! Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

51 Studying Integers modulo n Miller-Rabin Test Strengthening FLT further [Miller, 1975] An odd number n = s t (odd t) is prime iff for all a Z n, the sequence a 2s 1 t, a 2s 2 t,..., a t has either a 1 or all 1 s. We check the above equation for a random a. This gives a randomized test that takes time O (log 2 n). It errs with probability atmost 1 4. The most popular primality test! Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

52 Studying Integers modulo n Miller-Rabin Test Strengthening FLT further [Miller, 1975] An odd number n = s t (odd t) is prime iff for all a Z n, the sequence a 2s 1 t, a 2s 2 t,..., a t has either a 1 or all 1 s. We check the above equation for a random a. This gives a randomized test that takes time O (log 2 n). It errs with probability atmost 1 4. The most popular primality test! Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

53 Studying Integers modulo n Miller-Rabin Test Strengthening FLT further [Miller, 1975] An odd number n = s t (odd t) is prime iff for all a Z n, the sequence a 2s 1 t, a 2s 2 t,..., a t has either a 1 or all 1 s. We check the above equation for a random a. This gives a randomized test that takes time O (log 2 n). It errs with probability atmost 1 4. The most popular primality test! Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

54 Studying Integers modulo n Miller-Rabin Test Strengthening FLT further [Miller, 1975] An odd number n = s t (odd t) is prime iff for all a Z n, the sequence a 2s 1 t, a 2s 2 t,..., a t has either a 1 or all 1 s. We check the above equation for a random a. This gives a randomized test that takes time O (log 2 n). It errs with probability atmost 1 4. The most popular primality test! Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

55 Studying Integers modulo n Riemann Hypothesis and Primality Generalized Riemann Hypothesis [Piltz, 1884] Let Dirichlet L-function be the analytic continuation of L(χ, s) = χ(n) n=1 n. For every Dirichlet character χ and every complex s number s with L(χ, s) = 0: if Re(s) (0, 1] then Re(s) = 1 2. By taking χ to be the character modulo n it can be shown: the GRH implies that there exists an a 2 log 2 n such that ( a n) 1 (Ankeny 1952; Miller 1975; Bach 1980s). This magical small a would be a witness of the compositeness of n. Thus, GRH derandomizes both Solovay-Strassen and Miller-Rabin primality tests. This a also factors Carmichael numbers! Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

56 Studying Integers modulo n Riemann Hypothesis and Primality Generalized Riemann Hypothesis [Piltz, 1884] Let Dirichlet L-function be the analytic continuation of L(χ, s) = χ(n) n=1 n. For every Dirichlet character χ and every complex s number s with L(χ, s) = 0: if Re(s) (0, 1] then Re(s) = 1 2. By taking χ to be the character modulo n it can be shown: the GRH implies that there exists an a 2 log 2 n such that ( a n) 1 (Ankeny 1952; Miller 1975; Bach 1980s). This magical small a would be a witness of the compositeness of n. Thus, GRH derandomizes both Solovay-Strassen and Miller-Rabin primality tests. This a also factors Carmichael numbers! Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

57 Studying Integers modulo n Riemann Hypothesis and Primality Generalized Riemann Hypothesis [Piltz, 1884] Let Dirichlet L-function be the analytic continuation of L(χ, s) = χ(n) n=1 n. For every Dirichlet character χ and every complex s number s with L(χ, s) = 0: if Re(s) (0, 1] then Re(s) = 1 2. By taking χ to be the character modulo n it can be shown: the GRH implies that there exists an a 2 log 2 n such that ( a n) 1 (Ankeny 1952; Miller 1975; Bach 1980s). This magical small a would be a witness of the compositeness of n. Thus, GRH derandomizes both Solovay-Strassen and Miller-Rabin primality tests. This a also factors Carmichael numbers! Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

58 Studying Integers modulo n Riemann Hypothesis and Primality Generalized Riemann Hypothesis [Piltz, 1884] Let Dirichlet L-function be the analytic continuation of L(χ, s) = χ(n) n=1 n. For every Dirichlet character χ and every complex s number s with L(χ, s) = 0: if Re(s) (0, 1] then Re(s) = 1 2. By taking χ to be the character modulo n it can be shown: the GRH implies that there exists an a 2 log 2 n such that ( a n) 1 (Ankeny 1952; Miller 1975; Bach 1980s). This magical small a would be a witness of the compositeness of n. Thus, GRH derandomizes both Solovay-Strassen and Miller-Rabin primality tests. This a also factors Carmichael numbers! Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

59 Studying Integers modulo n Riemann Hypothesis and Primality Generalized Riemann Hypothesis [Piltz, 1884] Let Dirichlet L-function be the analytic continuation of L(χ, s) = χ(n) n=1 n. For every Dirichlet character χ and every complex s number s with L(χ, s) = 0: if Re(s) (0, 1] then Re(s) = 1 2. By taking χ to be the character modulo n it can be shown: the GRH implies that there exists an a 2 log 2 n such that ( a n) 1 (Ankeny 1952; Miller 1975; Bach 1980s). This magical small a would be a witness of the compositeness of n. Thus, GRH derandomizes both Solovay-Strassen and Miller-Rabin primality tests. This a also factors Carmichael numbers! Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

60 Studying Integers modulo n Riemann Hypothesis and Primality Generalized Riemann Hypothesis [Piltz, 1884] Let Dirichlet L-function be the analytic continuation of L(χ, s) = χ(n) n=1 n. For every Dirichlet character χ and every complex s number s with L(χ, s) = 0: if Re(s) (0, 1] then Re(s) = 1 2. By taking χ to be the character modulo n it can be shown: the GRH implies that there exists an a 2 log 2 n such that ( a n) 1 (Ankeny 1952; Miller 1975; Bach 1980s). This magical small a would be a witness of the compositeness of n. Thus, GRH derandomizes both Solovay-Strassen and Miller-Rabin primality tests. This a also factors Carmichael numbers! Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

61 Outline Studying quadratic extensions mod n 1 The Problem 2 The High School Method 3 Advanced Methods 4 Studying Integers modulo n 5 Studying quadratic extensions mod n 6 Studying Elliptic Curves mod n 7 Studying Cyclotomic Extensions mod n 8 Questions Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

62 Studying quadratic extensions mod n Lucas-Lehmer Test This is a test specialized for Mersenne primes M k = 2 k 1. Theorem (Lucas-Lehmer, 1930) M k is prime iff (2 + 3) M k +1 2 = 1 in Z n [ 3]. This yields a deterministic polynomial time primality test for Mersenne primes. Generalization: Whenever (n + 1) has small prime factors one can test n for primality by working in Z n [ D] where ( D n ) = 1. More generalization: Whenever (n 2 ± n + 1) has small prime factors one can test n for primality. But then we have to go to cubic extensions (Williams 1978). Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

63 Studying quadratic extensions mod n Lucas-Lehmer Test This is a test specialized for Mersenne primes M k = 2 k 1. Theorem (Lucas-Lehmer, 1930) M k is prime iff (2 + 3) M k +1 2 = 1 in Z n [ 3]. This yields a deterministic polynomial time primality test for Mersenne primes. Generalization: Whenever (n + 1) has small prime factors one can test n for primality by working in Z n [ D] where ( D n ) = 1. More generalization: Whenever (n 2 ± n + 1) has small prime factors one can test n for primality. But then we have to go to cubic extensions (Williams 1978). Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

64 Studying quadratic extensions mod n Lucas-Lehmer Test This is a test specialized for Mersenne primes M k = 2 k 1. Theorem (Lucas-Lehmer, 1930) M k is prime iff (2 + 3) M k +1 2 = 1 in Z n [ 3]. This yields a deterministic polynomial time primality test for Mersenne primes. Generalization: Whenever (n + 1) has small prime factors one can test n for primality by working in Z n [ D] where ( D n ) = 1. More generalization: Whenever (n 2 ± n + 1) has small prime factors one can test n for primality. But then we have to go to cubic extensions (Williams 1978). Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

65 Studying quadratic extensions mod n Lucas-Lehmer Test This is a test specialized for Mersenne primes M k = 2 k 1. Theorem (Lucas-Lehmer, 1930) M k is prime iff (2 + 3) M k +1 2 = 1 in Z n [ 3]. This yields a deterministic polynomial time primality test for Mersenne primes. Generalization: Whenever (n + 1) has small prime factors one can test n for primality by working in Z n [ D] where ( D n ) = 1. More generalization: Whenever (n 2 ± n + 1) has small prime factors one can test n for primality. But then we have to go to cubic extensions (Williams 1978). Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

66 Studying quadratic extensions mod n Lucas-Lehmer Test This is a test specialized for Mersenne primes M k = 2 k 1. Theorem (Lucas-Lehmer, 1930) M k is prime iff (2 + 3) M k +1 2 = 1 in Z n [ 3]. This yields a deterministic polynomial time primality test for Mersenne primes. Generalization: Whenever (n + 1) has small prime factors one can test n for primality by working in Z n [ D] where ( D n ) = 1. More generalization: Whenever (n 2 ± n + 1) has small prime factors one can test n for primality. But then we have to go to cubic extensions (Williams 1978). Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

67 Outline Studying Elliptic Curves mod n 1 The Problem 2 The High School Method 3 Advanced Methods 4 Studying Integers modulo n 5 Studying quadratic extensions mod n 6 Studying Elliptic Curves mod n 7 Studying Cyclotomic Extensions mod n 8 Questions Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

68 Studying Elliptic Curves mod n Elliptic Curve Based Tests An elliptic curve over Z n is the set of points: E a,b (Z n ) = { (x, y) Z 2 n y 2 = x 3 + ax + b } When n is prime: E a,b (Z n ) is an abelian group. #E a,b (Z n ) can be computed in deterministic polynomial time (Schoof 1985). When n is prime: number of points on a random elliptic curve is uniformly distributed in the interval [( n 1) 2, ( n + 1) 2 ] (Lenstra 1987). Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

69 Studying Elliptic Curves mod n Elliptic Curve Based Tests An elliptic curve over Z n is the set of points: E a,b (Z n ) = { (x, y) Z 2 n y 2 = x 3 + ax + b } When n is prime: E a,b (Z n ) is an abelian group. #E a,b (Z n ) can be computed in deterministic polynomial time (Schoof 1985). When n is prime: number of points on a random elliptic curve is uniformly distributed in the interval [( n 1) 2, ( n + 1) 2 ] (Lenstra 1987). Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

70 Studying Elliptic Curves mod n Elliptic Curve Based Tests An elliptic curve over Z n is the set of points: E a,b (Z n ) = { (x, y) Z 2 n y 2 = x 3 + ax + b } When n is prime: E a,b (Z n ) is an abelian group. #E a,b (Z n ) can be computed in deterministic polynomial time (Schoof 1985). When n is prime: number of points on a random elliptic curve is uniformly distributed in the interval [( n 1) 2, ( n + 1) 2 ] (Lenstra 1987). Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

71 Studying Elliptic Curves mod n Elliptic Curve Based Tests An elliptic curve over Z n is the set of points: E a,b (Z n ) = { (x, y) Z 2 n y 2 = x 3 + ax + b } When n is prime: E a,b (Z n ) is an abelian group. #E a,b (Z n ) can be computed in deterministic polynomial time (Schoof 1985). When n is prime: number of points on a random elliptic curve is uniformly distributed in the interval [( n 1) 2, ( n + 1) 2 ] (Lenstra 1987). Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

72 Studying Elliptic Curves mod n Goldwasser-Kilian Test 1 Pick a random elliptic curve E over Z n and a random point A E. 2 Compute #E(Z n ). If #E(Z n ) is odd then output COMPOSITE. 3 Let #E(Z n ) =: 2q. Prove the primality of q recursively. 4 If q is prime and q A = O then output PRIME else output COMPOSITE. Proof of Correctness: Firstly, note that conjecturally there are many numbers between [( n 1) 2, ( n + 1) 2 ] that are twice a prime and for a random E, #E(Z n ) will hit such numbers whp when n is prime. Suppose n is composite with a prime factor p n but the Step 4 condition holds. Since #E(Z p ) (p p) < n+1 2 n 2 q we get that: q is prime and q A = O A = O in E(Z p ) Thus, A will factor n. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

73 Studying Elliptic Curves mod n Goldwasser-Kilian Test 1 Pick a random elliptic curve E over Z n and a random point A E. 2 Compute #E(Z n ). If #E(Z n ) is odd then output COMPOSITE. 3 Let #E(Z n ) =: 2q. Prove the primality of q recursively. 4 If q is prime and q A = O then output PRIME else output COMPOSITE. Proof of Correctness: Firstly, note that conjecturally there are many numbers between [( n 1) 2, ( n + 1) 2 ] that are twice a prime and for a random E, #E(Z n ) will hit such numbers whp when n is prime. Suppose n is composite with a prime factor p n but the Step 4 condition holds. Since #E(Z p ) (p p) < n+1 2 n 2 q we get that: q is prime and q A = O A = O in E(Z p ) Thus, A will factor n. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

74 Studying Elliptic Curves mod n Goldwasser-Kilian Test 1 Pick a random elliptic curve E over Z n and a random point A E. 2 Compute #E(Z n ). If #E(Z n ) is odd then output COMPOSITE. 3 Let #E(Z n ) =: 2q. Prove the primality of q recursively. 4 If q is prime and q A = O then output PRIME else output COMPOSITE. Proof of Correctness: Firstly, note that conjecturally there are many numbers between [( n 1) 2, ( n + 1) 2 ] that are twice a prime and for a random E, #E(Z n ) will hit such numbers whp when n is prime. Suppose n is composite with a prime factor p n but the Step 4 condition holds. Since #E(Z p ) (p p) < n+1 2 n 2 q we get that: q is prime and q A = O A = O in E(Z p ) Thus, A will factor n. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

75 Studying Elliptic Curves mod n Goldwasser-Kilian Test 1 Pick a random elliptic curve E over Z n and a random point A E. 2 Compute #E(Z n ). If #E(Z n ) is odd then output COMPOSITE. 3 Let #E(Z n ) =: 2q. Prove the primality of q recursively. 4 If q is prime and q A = O then output PRIME else output COMPOSITE. Proof of Correctness: Firstly, note that conjecturally there are many numbers between [( n 1) 2, ( n + 1) 2 ] that are twice a prime and for a random E, #E(Z n ) will hit such numbers whp when n is prime. Suppose n is composite with a prime factor p n but the Step 4 condition holds. Since #E(Z p ) (p p) < n+1 2 n 2 q we get that: q is prime and q A = O A = O in E(Z p ) Thus, A will factor n. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

76 Studying Elliptic Curves mod n Goldwasser-Kilian Test 1 Pick a random elliptic curve E over Z n and a random point A E. 2 Compute #E(Z n ). If #E(Z n ) is odd then output COMPOSITE. 3 Let #E(Z n ) =: 2q. Prove the primality of q recursively. 4 If q is prime and q A = O then output PRIME else output COMPOSITE. Proof of Correctness: Firstly, note that conjecturally there are many numbers between [( n 1) 2, ( n + 1) 2 ] that are twice a prime and for a random E, #E(Z n ) will hit such numbers whp when n is prime. Suppose n is composite with a prime factor p n but the Step 4 condition holds. Since #E(Z p ) (p p) < n+1 2 n 2 q we get that: q is prime and q A = O A = O in E(Z p ) Thus, A will factor n. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

77 Studying Elliptic Curves mod n Goldwasser-Kilian Test 1 Pick a random elliptic curve E over Z n and a random point A E. 2 Compute #E(Z n ). If #E(Z n ) is odd then output COMPOSITE. 3 Let #E(Z n ) =: 2q. Prove the primality of q recursively. 4 If q is prime and q A = O then output PRIME else output COMPOSITE. Proof of Correctness: Firstly, note that conjecturally there are many numbers between [( n 1) 2, ( n + 1) 2 ] that are twice a prime and for a random E, #E(Z n ) will hit such numbers whp when n is prime. Suppose n is composite with a prime factor p n but the Step 4 condition holds. Since #E(Z p ) (p p) < n+1 2 n 2 q we get that: q is prime and q A = O A = O in E(Z p ) Thus, A will factor n. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

78 Studying Elliptic Curves mod n Goldwasser-Kilian Test 1 Pick a random elliptic curve E over Z n and a random point A E. 2 Compute #E(Z n ). If #E(Z n ) is odd then output COMPOSITE. 3 Let #E(Z n ) =: 2q. Prove the primality of q recursively. 4 If q is prime and q A = O then output PRIME else output COMPOSITE. Proof of Correctness: Firstly, note that conjecturally there are many numbers between [( n 1) 2, ( n + 1) 2 ] that are twice a prime and for a random E, #E(Z n ) will hit such numbers whp when n is prime. Suppose n is composite with a prime factor p n but the Step 4 condition holds. Since #E(Z p ) (p p) < n+1 2 n 2 q we get that: q is prime and q A = O A = O in E(Z p ) Thus, A will factor n. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

79 Studying Elliptic Curves mod n Goldwasser-Kilian Test 1 Pick a random elliptic curve E over Z n and a random point A E. 2 Compute #E(Z n ). If #E(Z n ) is odd then output COMPOSITE. 3 Let #E(Z n ) =: 2q. Prove the primality of q recursively. 4 If q is prime and q A = O then output PRIME else output COMPOSITE. Proof of Correctness: Firstly, note that conjecturally there are many numbers between [( n 1) 2, ( n + 1) 2 ] that are twice a prime and for a random E, #E(Z n ) will hit such numbers whp when n is prime. Suppose n is composite with a prime factor p n but the Step 4 condition holds. Since #E(Z p ) (p p) < n+1 2 n 2 q we get that: q is prime and q A = O A = O in E(Z p ) Thus, A will factor n. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

80 Studying Elliptic Curves mod n Goldwasser-Kilian Test 1 Pick a random elliptic curve E over Z n and a random point A E. 2 Compute #E(Z n ). If #E(Z n ) is odd then output COMPOSITE. 3 Let #E(Z n ) =: 2q. Prove the primality of q recursively. 4 If q is prime and q A = O then output PRIME else output COMPOSITE. Proof of Correctness: Firstly, note that conjecturally there are many numbers between [( n 1) 2, ( n + 1) 2 ] that are twice a prime and for a random E, #E(Z n ) will hit such numbers whp when n is prime. Suppose n is composite with a prime factor p n but the Step 4 condition holds. Since #E(Z p ) (p p) < n+1 2 n 2 q we get that: q is prime and q A = O A = O in E(Z p ) Thus, A will factor n. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

81 Studying Elliptic Curves mod n Goldwasser-Kilian Test 1 Pick a random elliptic curve E over Z n and a random point A E. 2 Compute #E(Z n ). If #E(Z n ) is odd then output COMPOSITE. 3 Let #E(Z n ) =: 2q. Prove the primality of q recursively. 4 If q is prime and q A = O then output PRIME else output COMPOSITE. Proof of Correctness: Firstly, note that conjecturally there are many numbers between [( n 1) 2, ( n + 1) 2 ] that are twice a prime and for a random E, #E(Z n ) will hit such numbers whp when n is prime. Suppose n is composite with a prime factor p n but the Step 4 condition holds. Since #E(Z p ) (p p) < n+1 2 n 2 q we get that: q is prime and q A = O A = O in E(Z p ) Thus, A will factor n. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

82 Studying Elliptic Curves mod n Goldwasser-Kilian Test This is the first randomized test that never errs when n is composite (1986). Time complexity (Atkin-Morain 1993): O (log 4 n). But its proof [ assumed a conjecture about the density of primes in the ] interval n+1 2 n 2, n+1+2 n 2. Currently, it is not even known if there is always a prime between m 2 and (m + 1) 2 (Legendre s conjecture). Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

83 Studying Elliptic Curves mod n Goldwasser-Kilian Test This is the first randomized test that never errs when n is composite (1986). Time complexity (Atkin-Morain 1993): O (log 4 n). But its proof [ assumed a conjecture about the density of primes in the ] interval n+1 2 n 2, n+1+2 n 2. Currently, it is not even known if there is always a prime between m 2 and (m + 1) 2 (Legendre s conjecture). Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

84 Studying Elliptic Curves mod n Goldwasser-Kilian Test This is the first randomized test that never errs when n is composite (1986). Time complexity (Atkin-Morain 1993): O (log 4 n). But its proof [ assumed a conjecture about the density of primes in the ] interval n+1 2 n 2, n+1+2 n 2. Currently, it is not even known if there is always a prime between m 2 and (m + 1) 2 (Legendre s conjecture). Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

85 Studying Elliptic Curves mod n Goldwasser-Kilian Test This is the first randomized test that never errs when n is composite (1986). Time complexity (Atkin-Morain 1993): O (log 4 n). But its proof [ assumed a conjecture about the density of primes in the ] interval n+1 2 n 2, n+1+2 n 2. Currently, it is not even known if there is always a prime between m 2 and (m + 1) 2 (Legendre s conjecture). Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

86 Studying Elliptic Curves mod n Adleman-Huang Test Using hyperelliptic curves they made Goldwasser-Kilian test unconditional (1992). Time complexity: O(log c n) where c > 30! Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

87 Studying Elliptic Curves mod n Adleman-Huang Test Using hyperelliptic curves they made Goldwasser-Kilian test unconditional (1992). Time complexity: O(log c n) where c > 30! Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

88 Outline Studying Cyclotomic Extensions mod n 1 The Problem 2 The High School Method 3 Advanced Methods 4 Studying Integers modulo n 5 Studying quadratic extensions mod n 6 Studying Elliptic Curves mod n 7 Studying Cyclotomic Extensions mod n 8 Questions Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

89 Studying Cyclotomic Extensions mod n Adleman-Pomerance-Rumeli Test Recall how Lucas-Lehmer-Williams tested n for primality when (n 1), (n + 1), (n 2 n + 1) or (n 2 + n + 1) was smooth. What can we do when (n m 1) is smooth? Maybe go to some m-th extension of Z n? This question inspired the APR test (1980). Speeded up by Cohen and Lenstra (1981). Deterministic algorithm with time complexity log O(log log log n) n. Is conceptually the most complex algorithm of all. Attempts to find a prime factor of n using higher reciprocity laws in cyclotomic extensions of Z n. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

90 Studying Cyclotomic Extensions mod n Adleman-Pomerance-Rumeli Test Recall how Lucas-Lehmer-Williams tested n for primality when (n 1), (n + 1), (n 2 n + 1) or (n 2 + n + 1) was smooth. What can we do when (n m 1) is smooth? Maybe go to some m-th extension of Z n? This question inspired the APR test (1980). Speeded up by Cohen and Lenstra (1981). Deterministic algorithm with time complexity log O(log log log n) n. Is conceptually the most complex algorithm of all. Attempts to find a prime factor of n using higher reciprocity laws in cyclotomic extensions of Z n. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

91 Studying Cyclotomic Extensions mod n Adleman-Pomerance-Rumeli Test Recall how Lucas-Lehmer-Williams tested n for primality when (n 1), (n + 1), (n 2 n + 1) or (n 2 + n + 1) was smooth. What can we do when (n m 1) is smooth? Maybe go to some m-th extension of Z n? This question inspired the APR test (1980). Speeded up by Cohen and Lenstra (1981). Deterministic algorithm with time complexity log O(log log log n) n. Is conceptually the most complex algorithm of all. Attempts to find a prime factor of n using higher reciprocity laws in cyclotomic extensions of Z n. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

92 Studying Cyclotomic Extensions mod n Adleman-Pomerance-Rumeli Test Recall how Lucas-Lehmer-Williams tested n for primality when (n 1), (n + 1), (n 2 n + 1) or (n 2 + n + 1) was smooth. What can we do when (n m 1) is smooth? Maybe go to some m-th extension of Z n? This question inspired the APR test (1980). Speeded up by Cohen and Lenstra (1981). Deterministic algorithm with time complexity log O(log log log n) n. Is conceptually the most complex algorithm of all. Attempts to find a prime factor of n using higher reciprocity laws in cyclotomic extensions of Z n. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

93 Studying Cyclotomic Extensions mod n Adleman-Pomerance-Rumeli Test Recall how Lucas-Lehmer-Williams tested n for primality when (n 1), (n + 1), (n 2 n + 1) or (n 2 + n + 1) was smooth. What can we do when (n m 1) is smooth? Maybe go to some m-th extension of Z n? This question inspired the APR test (1980). Speeded up by Cohen and Lenstra (1981). Deterministic algorithm with time complexity log O(log log log n) n. Is conceptually the most complex algorithm of all. Attempts to find a prime factor of n using higher reciprocity laws in cyclotomic extensions of Z n. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

94 Studying Cyclotomic Extensions mod n Adleman-Pomerance-Rumeli Test Recall how Lucas-Lehmer-Williams tested n for primality when (n 1), (n + 1), (n 2 n + 1) or (n 2 + n + 1) was smooth. What can we do when (n m 1) is smooth? Maybe go to some m-th extension of Z n? This question inspired the APR test (1980). Speeded up by Cohen and Lenstra (1981). Deterministic algorithm with time complexity log O(log log log n) n. Is conceptually the most complex algorithm of all. Attempts to find a prime factor of n using higher reciprocity laws in cyclotomic extensions of Z n. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

95 Studying Cyclotomic Extensions mod n Agrawal-Kayal-S (AKS) Test Theorem (A Generalization of FLT) If n is a prime then for all a Z n, (x + a) n = (x n + a) (mod n, x r 1). This was the basis of the AKS test proposed in It was the first unconditional, deterministic and polynomial time primality test. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

96 Studying Cyclotomic Extensions mod n Agrawal-Kayal-S (AKS) Test Theorem (A Generalization of FLT) If n is a prime then for all a Z n, (x + a) n = (x n + a) (mod n, x r 1). This was the basis of the AKS test proposed in It was the first unconditional, deterministic and polynomial time primality test. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

97 Studying Cyclotomic Extensions mod n Agrawal-Kayal-S (AKS) Test Theorem (A Generalization of FLT) If n is a prime then for all a Z n, (x + a) n = (x n + a) (mod n, x r 1). This was the basis of the AKS test proposed in It was the first unconditional, deterministic and polynomial time primality test. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

98 Studying Cyclotomic Extensions mod n AKS Test 1 If n is a prime power, it is composite. 2 Select an r such that ord r (n) > 4 log 2 n and work in the ring R := Z n [x]/(x r 1). 3 For each a, 1 a l := 2 r log n, check if (x + a) n = (x n + a). 4 If yes then n is prime else composite. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

99 Studying Cyclotomic Extensions mod n AKS Test 1 If n is a prime power, it is composite. 2 Select an r such that ord r (n) > 4 log 2 n and work in the ring R := Z n [x]/(x r 1). 3 For each a, 1 a l := 2 r log n, check if (x + a) n = (x n + a). 4 If yes then n is prime else composite. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

100 Studying Cyclotomic Extensions mod n AKS Test 1 If n is a prime power, it is composite. 2 Select an r such that ord r (n) > 4 log 2 n and work in the ring R := Z n [x]/(x r 1). 3 For each a, 1 a l := 2 r log n, check if (x + a) n = (x n + a). 4 If yes then n is prime else composite. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

101 Studying Cyclotomic Extensions mod n AKS Test 1 If n is a prime power, it is composite. 2 Select an r such that ord r (n) > 4 log 2 n and work in the ring R := Z n [x]/(x r 1). 3 For each a, 1 a l := 2 r log n, check if (x + a) n = (x n + a). 4 If yes then n is prime else composite. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

102 Studying Cyclotomic Extensions mod n AKS Test: The Proof Suppose all the congruences hold and p is a prime factor of n. The group I := n, p (mod r). t := #I ord r (n) 4 log 2 n. The group J := (x + 1),..., (x + l) (mod p, h(x)) where h(x) is an irreducible factor of xr 1 x 1 modulo p. #J 2 min{t,l} > 2 2 t log n n 2 t. Proof: Let f (x), g(x) be two different products of (x + a) s, having degree < t. Suppose f (x) = g(x) (mod p, h(x)). The test tells us that f (x ni p j ) = g(x ni p j ) (mod p, h(x)). But this means that f (z) g(z) has atleast t roots in the field F p [x]/(h(x)), which is a contradiction. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

103 Studying Cyclotomic Extensions mod n AKS Test: The Proof Suppose all the congruences hold and p is a prime factor of n. The group I := n, p (mod r). t := #I ord r (n) 4 log 2 n. The group J := (x + 1),..., (x + l) (mod p, h(x)) where h(x) is an irreducible factor of xr 1 x 1 modulo p. #J 2 min{t,l} > 2 2 t log n n 2 t. Proof: Let f (x), g(x) be two different products of (x + a) s, having degree < t. Suppose f (x) = g(x) (mod p, h(x)). The test tells us that f (x ni p j ) = g(x ni p j ) (mod p, h(x)). But this means that f (z) g(z) has atleast t roots in the field F p [x]/(h(x)), which is a contradiction. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

104 Studying Cyclotomic Extensions mod n AKS Test: The Proof Suppose all the congruences hold and p is a prime factor of n. The group I := n, p (mod r). t := #I ord r (n) 4 log 2 n. The group J := (x + 1),..., (x + l) (mod p, h(x)) where h(x) is an irreducible factor of xr 1 x 1 modulo p. #J 2 min{t,l} > 2 2 t log n n 2 t. Proof: Let f (x), g(x) be two different products of (x + a) s, having degree < t. Suppose f (x) = g(x) (mod p, h(x)). The test tells us that f (x ni p j ) = g(x ni p j ) (mod p, h(x)). But this means that f (z) g(z) has atleast t roots in the field F p [x]/(h(x)), which is a contradiction. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

105 Studying Cyclotomic Extensions mod n AKS Test: The Proof Suppose all the congruences hold and p is a prime factor of n. The group I := n, p (mod r). t := #I ord r (n) 4 log 2 n. The group J := (x + 1),..., (x + l) (mod p, h(x)) where h(x) is an irreducible factor of xr 1 x 1 modulo p. #J 2 min{t,l} > 2 2 t log n n 2 t. Proof: Let f (x), g(x) be two different products of (x + a) s, having degree < t. Suppose f (x) = g(x) (mod p, h(x)). The test tells us that f (x ni p j ) = g(x ni p j ) (mod p, h(x)). But this means that f (z) g(z) has atleast t roots in the field F p [x]/(h(x)), which is a contradiction. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

106 Studying Cyclotomic Extensions mod n AKS Test: The Proof Suppose all the congruences hold and p is a prime factor of n. The group I := n, p (mod r). t := #I ord r (n) 4 log 2 n. The group J := (x + 1),..., (x + l) (mod p, h(x)) where h(x) is an irreducible factor of xr 1 x 1 modulo p. #J 2 min{t,l} > 2 2 t log n n 2 t. Proof: Let f (x), g(x) be two different products of (x + a) s, having degree < t. Suppose f (x) = g(x) (mod p, h(x)). The test tells us that f (x ni p j ) = g(x ni p j ) (mod p, h(x)). But this means that f (z) g(z) has atleast t roots in the field F p [x]/(h(x)), which is a contradiction. Nitin Saxena (CWI, Amsterdam) Is n a prime number? Turku, May / 36

Is n a Prime Number? Manindra Agrawal. March 27, 2006, Delft. IIT Kanpur

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

More information

Primality - Factorization

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.

More information

On Generalized Fermat Numbers 3 2n +1

On Generalized Fermat Numbers 3 2n +1 Applied Mathematics & Information Sciences 4(3) (010), 307 313 An International Journal c 010 Dixie W Publishing Corporation, U. S. A. On Generalized Fermat Numbers 3 n +1 Amin Witno Department of Basic

More information

PRIMES is in P. Manindra Agrawal Neeraj Kayal Nitin Saxena

PRIMES is in P. Manindra Agrawal Neeraj Kayal Nitin Saxena PRIMES is in P Manindra Agrawal Neeraj Kayal Nitin Saxena Department of Computer Science & Engineering Indian Institute of Technology Kanpur Kanpur-208016, INDIA Email: {manindra,kayaln,nitinsa}@iitk.ac.in

More information

Factoring & Primality

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

More information

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 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

More information

Recent Breakthrough in Primality Testing

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

More information

CHAPTER 5. Number Theory. 1. Integers and Division. Discussion

CHAPTER 5. Number Theory. 1. Integers and Division. Discussion CHAPTER 5 Number Theory 1. Integers and Division 1.1. Divisibility. Definition 1.1.1. Given two integers a and b we say a divides b if there is an integer c such that b = ac. If a divides b, we write a

More information

Faster deterministic integer factorisation

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

More information

An Overview of Integer Factoring Algorithms. The Problem

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

More information

Integer Factorization using the Quadratic Sieve

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 seib0060@morris.umn.edu March 16, 2011 Abstract We give

More information

Integer factoring and modular square roots

Integer factoring and modular square roots Integer factoring and modular square roots Emil Jeřábek Institute of Mathematics of the Academy of Sciences Žitná 25, 115 67 Praha 1, Czech Republic, email: jerabek@math.cas.cz July 28, 2015 Abstract Buresh-Oppenheim

More information

Lecture 13 - Basic Number Theory.

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

More information

Revised Version of Chapter 23. We learned long ago how to solve linear congruences. ax c (mod m)

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.

More information

minimal polyonomial Example

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

More information

Winter Camp 2011 Polynomials Alexander Remorov. Polynomials. Alexander Remorov alexanderrem@gmail.com

Winter Camp 2011 Polynomials Alexander Remorov. Polynomials. Alexander Remorov alexanderrem@gmail.com Polynomials Alexander Remorov alexanderrem@gmail.com 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)).

More information

The Prime Numbers. Definition. A prime number is a positive integer with exactly two positive divisors.

The Prime Numbers. Definition. A prime number is a positive integer with exactly two positive divisors. The Prime Numbers Before starting our study of primes, we record the following important lemma. Recall that integers a, b are said to be relatively prime if gcd(a, b) = 1. Lemma (Euclid s Lemma). If gcd(a,

More information

Factoring integers, Producing primes and the RSA cryptosystem Harish-Chandra Research Institute

Factoring integers, Producing primes and the RSA cryptosystem Harish-Chandra Research Institute RSA cryptosystem HRI, Allahabad, February, 2005 0 Factoring integers, Producing primes and the RSA cryptosystem Harish-Chandra Research Institute Allahabad (UP), INDIA February, 2005 RSA cryptosystem HRI,

More information

2 Primality and Compositeness Tests

2 Primality and Compositeness Tests Int. J. Contemp. Math. Sciences, Vol. 3, 2008, no. 33, 1635-1642 On Factoring R. A. Mollin Department of Mathematics and Statistics University of Calgary, Calgary, Alberta, Canada, T2N 1N4 http://www.math.ucalgary.ca/

More information

8 Primes and Modular Arithmetic

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.

More information

FACTORING SPARSE POLYNOMIALS

FACTORING SPARSE POLYNOMIALS FACTORING SPARSE POLYNOMIALS Theorem 1 (Schinzel): Let r be a positive integer, and fix non-zero integers a 0,..., a r. Let F (x 1,..., x r ) = a r x r + + a 1 x 1 + a 0. Then there exist finite sets S

More information

Module MA3411: Abstract Algebra Galois Theory Appendix Michaelmas Term 2013

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

More information

Applications of Fermat s Little Theorem and Congruences

Applications of Fermat s Little Theorem and Congruences Applications of Fermat s Little Theorem and Congruences Definition: Let m be a positive integer. Then integers a and b are congruent modulo m, denoted by a b mod m, if m (a b). Example: 3 1 mod 2, 6 4

More information

CHAPTER SIX IRREDUCIBILITY AND FACTORIZATION 1. BASIC DIVISIBILITY THEORY

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.

More information

RSA and Primality Testing

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

More information

Today s Topics. Primes & Greatest Common Divisors

Today s Topics. Primes & Greatest Common Divisors Today s Topics Primes & Greatest Common Divisors Prime representations Important theorems about primality Greatest Common Divisors Least Common Multiples Euclid s algorithm Once and for all, what are prime

More information

3. Computational Complexity.

3. Computational Complexity. 3. Computational Complexity. (A) Introduction. As we will see, most cryptographic systems derive their supposed security from the presumed inability of any adversary to crack certain (number theoretic)

More information

Cryptography and Network Security Number Theory

Cryptography and Network Security Number Theory Cryptography and Network Security Number Theory Xiang-Yang Li Introduction to Number Theory Divisors b a if a=mb for an integer m b a and c b then c a b g and b h then b (mg+nh) for any int. m,n Prime

More information

MOP 2007 Black Group Integer Polynomials Yufei Zhao. Integer Polynomials. June 29, 2007 Yufei Zhao yufeiz@mit.edu

MOP 2007 Black Group Integer Polynomials Yufei Zhao. Integer Polynomials. June 29, 2007 Yufei Zhao yufeiz@mit.edu Integer Polynomials June 9, 007 Yufei Zhao yufeiz@mit.edu 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

More information

On the largest prime factor of x 2 1

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

More information

Discrete Mathematics, Chapter 4: Number Theory and Cryptography

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

More information

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 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

More information

2.1 Complexity Classes

2.1 Complexity Classes 15-859(M): Randomized Algorithms Lecturer: Shuchi Chawla Topic: Complexity classes, Identity checking Date: September 15, 2004 Scribe: Andrew Gilpin 2.1 Complexity Classes In this lecture we will look

More information

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 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

More information

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 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

More information

How To Factoring

How To Factoring Factoring integers,..., RSA Erbil, Kurdistan 0 Lecture in Number Theory College of Sciences Department of Mathematics University of Salahaddin Debember 1, 2014 Factoring integers, Producing primes and

More information

Quotient Rings and Field Extensions

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.

More information

a 1 x + a 0 =0. (3) ax 2 + bx + c =0. (4)

a 1 x + a 0 =0. (3) ax 2 + bx + c =0. (4) ROOTS OF POLYNOMIAL EQUATIONS In this unit we discuss polynomial equations. A polynomial in x of degree n, where n 0 is an integer, is an expression of the form P n (x) =a n x n + a n 1 x n 1 + + a 1 x

More information

Cryptography and Network Security Chapter 8

Cryptography and Network Security Chapter 8 Cryptography and Network Security Chapter 8 Fifth Edition by William Stallings Lecture slides by Lawrie Brown (with edits by RHB) Chapter 8 Introduction to Number Theory The Devil said to Daniel Webster:

More information

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES

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

More information

it is easy to see that α = a

it is easy to see that α = a 21. Polynomial rings Let us now turn out attention to determining the prime elements of a polynomial ring, where the coefficient ring is a field. We already know that such a polynomial ring is a UF. Therefore

More information

Computer and Network Security

Computer and Network Security MIT 6.857 Computer and Networ Security Class Notes 1 File: http://theory.lcs.mit.edu/ rivest/notes/notes.pdf Revision: December 2, 2002 Computer and Networ Security MIT 6.857 Class Notes by Ronald L. Rivest

More information

Factoring integers and Producing primes

Factoring integers and Producing primes Factoring integers,..., RSA Erbil, Kurdistan 0 Lecture in Number Theory College of Sciences Department of Mathematics University of Salahaddin Debember 4, 2014 Factoring integers and Producing primes Francesco

More information

ELLIPTIC CURVES AND LENSTRA S FACTORIZATION ALGORITHM

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

More information

Lecture 13: Factoring Integers

Lecture 13: Factoring Integers CS 880: Quantum Information Processing 0/4/0 Lecture 3: Factoring Integers Instructor: Dieter van Melkebeek Scribe: Mark Wellons In this lecture, we review order finding and use this to develop a method

More information

Prime numbers and prime polynomials. Paul Pollack Dartmouth College

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)

More information

Elementary Number Theory

Elementary Number Theory Elementary Number Theory A revision by Jim Hefferon, St Michael s College, 2003-Dec of notes by W. Edwin Clark, University of South Florida, 2002-Dec L A TEX source compiled on January 5, 2004 by Jim Hefferon,

More information

An Introductory Course in Elementary Number Theory. Wissam Raji

An Introductory Course in Elementary Number Theory. Wissam Raji An Introductory Course in Elementary Number Theory Wissam Raji 2 Preface These notes serve as course notes for an undergraduate course in number theory. Most if not all universities worldwide offer introductory

More information

CRC Press has granted the following specific permissions for the electronic version of this book:

CRC Press has granted the following specific permissions for the electronic version of this book: This is a Chapter from the Handbook of Applied Cryptography, by A. Menezes, P. van Oorschot, and S. Vanstone, CRC Press, 1996. For further information, see www.cacr.math.uwaterloo.ca/hac CRC Press has

More information

Notes on Factoring. MA 206 Kurt Bryan

Notes on Factoring. MA 206 Kurt Bryan The General Approach Notes on Factoring MA 26 Kurt Bryan Suppose I hand you n, a 2 digit integer and tell you that n is composite, with smallest prime factor around 5 digits. Finding a nontrivial factor

More information

Introduction to Finite Fields (cont.)

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

More information

H/wk 13, Solutions to selected problems

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.

More information

Homework until Test #2

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

More information

15 Prime and Composite Numbers

15 Prime and Composite Numbers 15 Prime and Composite Numbers Divides, Divisors, Factors, Multiples In section 13, we considered the division algorithm: If a and b are whole numbers with b 0 then there exist unique numbers q and r such

More information

Public Key Cryptography: RSA and Lots of Number Theory

Public Key Cryptography: RSA and Lots of Number Theory Public Key Cryptography: RSA and Lots of Number Theory Public vs. Private-Key Cryptography We have just discussed traditional symmetric cryptography: Uses a single key shared between sender and receiver

More information

The cyclotomic polynomials

The cyclotomic polynomials The cyclotomic polynomials Notes by G.J.O. Jameson 1. The definition and general results We use the notation e(t) = e 2πit. Note that e(n) = 1 for integers n, e(s + t) = e(s)e(t) for all s, t. e( 1 ) =

More information

Number Theory Hungarian Style. Cameron Byerley s interpretation of Csaba Szabó s lectures

Number Theory Hungarian Style. Cameron Byerley s interpretation of Csaba Szabó s lectures Number Theory Hungarian Style Cameron Byerley s interpretation of Csaba Szabó s lectures August 20, 2005 2 0.1 introduction Number theory is a beautiful subject and even cooler when you learn about it

More information

Study of algorithms for factoring integers and computing discrete logarithms

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

More information

3 1. Note that all cubes solve it; therefore, there are no more

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

More information

QUADRATIC RECIPROCITY IN CHARACTERISTIC 2

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

More information

MATH 537 (Number Theory) FALL 2016 TENTATIVE SYLLABUS

MATH 537 (Number Theory) FALL 2016 TENTATIVE SYLLABUS MATH 537 (Number Theory) FALL 2016 TENTATIVE SYLLABUS Class Meetings: MW 2:00-3:15 pm in Physics 144, September 7 to December 14 [Thanksgiving break November 23 27; final exam December 21] Instructor:

More information

Smooth numbers and the quadratic sieve

Smooth numbers and the quadratic sieve Algorithmic Number Theory MSRI Publications Volume 44, 2008 Smooth numbers and the quadratic sieve CARL POMERANCE ABSTRACT. This article gives a gentle introduction to factoring large integers via the

More information

Elements of Applied Cryptography Public key encryption

Elements of Applied Cryptography Public key encryption Network Security Elements of Applied Cryptography Public key encryption Public key cryptosystem RSA and the factorization problem RSA in practice Other asymmetric ciphers Asymmetric Encryption Scheme Let

More information

EMBEDDING DEGREE OF HYPERELLIPTIC CURVES WITH COMPLEX MULTIPLICATION

EMBEDDING DEGREE OF HYPERELLIPTIC CURVES WITH COMPLEX MULTIPLICATION EMBEDDING DEGREE OF HYPERELLIPTIC CURVES WITH COMPLEX MULTIPLICATION CHRISTIAN ROBENHAGEN RAVNSHØJ Abstract. Consider the Jacobian of a genus two curve defined over a finite field and with complex multiplication.

More information

I. Introduction. MPRI Cours 2-12-2. Lecture IV: Integer factorization. What is the factorization of a random number? II. Smoothness testing. F.

I. Introduction. MPRI Cours 2-12-2. Lecture IV: Integer factorization. What is the factorization of a random number? II. Smoothness testing. F. F. Morain École polytechnique MPRI cours 2-12-2 2013-2014 3/22 F. Morain École polytechnique MPRI cours 2-12-2 2013-2014 4/22 MPRI Cours 2-12-2 I. Introduction Input: an integer N; logox F. Morain logocnrs

More information

The last three chapters introduced three major proof techniques: direct,

The last three chapters introduced three major proof techniques: direct, CHAPTER 7 Proving Non-Conditional Statements The last three chapters introduced three major proof techniques: direct, contrapositive and contradiction. These three techniques are used to prove statements

More information

ALGEBRAIC APPROACH TO COMPOSITE INTEGER FACTORIZATION

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,

More information

Chapter 4, Arithmetic in F [x] Polynomial arithmetic and the division algorithm.

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

More information

calculating the result modulo 3, as follows: p(0) = 0 3 + 0 + 1 = 1 0,

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

More information

How To Factor In Prime Numbers

How To Factor In Prime Numbers USING LUCAS SEQUENCES TO FACTOR LARGE INTEGERS NEAR GROUP ORDERS Zhenxiang Zhang* Dept. of Math., Anhui Normal University, 241000 Wuhu, Anhui, P.R. China e-mail: zhangzhx@mail.ahwhptt.net.cn (Submitted

More information

PUTNAM TRAINING POLYNOMIALS. Exercises 1. Find a polynomial with integral coefficients whose zeros include 2 + 5.

PUTNAM TRAINING POLYNOMIALS. Exercises 1. Find a polynomial with integral coefficients whose zeros include 2 + 5. PUTNAM TRAINING POLYNOMIALS (Last updated: November 17, 2015) Remark. This is a list of exercises on polynomials. Miguel A. Lerma Exercises 1. Find a polynomial with integral coefficients whose zeros include

More information

8 Divisibility and prime numbers

8 Divisibility and prime numbers 8 Divisibility and prime numbers 8.1 Divisibility In this short section we extend the concept of a multiple from the natural numbers to the integers. We also summarize several other terms that express

More information

SUBGROUPS OF CYCLIC GROUPS. 1. Introduction In a group G, we denote the (cyclic) group of powers of some g G by

SUBGROUPS OF CYCLIC GROUPS. 1. Introduction In a group G, we denote the (cyclic) group of powers of some g G by SUBGROUPS OF CYCLIC GROUPS KEITH CONRAD 1. Introduction In a group G, we denote the (cyclic) group of powers of some g G by g = {g k : k Z}. If G = g, then G itself is cyclic, with g as a generator. Examples

More information

Factoring Polynomials

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

More information

Math 319 Problem Set #3 Solution 21 February 2002

Math 319 Problem Set #3 Solution 21 February 2002 Math 319 Problem Set #3 Solution 21 February 2002 1. ( 2.1, problem 15) Find integers a 1, a 2, a 3, a 4, a 5 such that every integer x satisfies at least one of the congruences x a 1 (mod 2), x a 2 (mod

More information

Computational Number Theory

Computational Number Theory Computational Number Theory C. Pomerance 1 Introduction Historically, computation has been a driving force in the development of mathematics. To help measure the sizes of their fields, the Egyptians invented

More information

FACTORING. n = 2 25 + 1. fall in the arithmetic sequence

FACTORING. n = 2 25 + 1. fall in the arithmetic sequence FACTORING The claim that factorization is harder than primality testing (or primality certification) is not currently substantiated rigorously. As some sort of backward evidence that factoring is hard,

More information

ABSTRACT EQUATIONS OVER FINITE FIELDS AND SOME RELATED PROBLEMS. Department of Mathematics

ABSTRACT EQUATIONS OVER FINITE FIELDS AND SOME RELATED PROBLEMS. Department of Mathematics 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

More information

11 Ideals. 11.1 Revisiting Z

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(

More information

Modern Algebra Lecture Notes: Rings and fields set 4 (Revision 2)

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)

More information

SOLVING POLYNOMIAL EQUATIONS

SOLVING POLYNOMIAL EQUATIONS C SOLVING POLYNOMIAL EQUATIONS We will assume in this appendix that you know how to divide polynomials using long division and synthetic division. If you need to review those techniques, refer to an algebra

More information

FACTORING POLYNOMIALS IN THE RING OF FORMAL POWER SERIES OVER Z

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

More information

Factoring Algorithms

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

More information

Continued Fractions. Darren C. Collins

Continued Fractions. Darren C. Collins Continued Fractions Darren C Collins Abstract In this paper, we discuss continued fractions First, we discuss the definition and notation Second, we discuss the development of the subject throughout history

More information

Number Theory. Proof. Suppose otherwise. Then there would be a finite number n of primes, which we may

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

More information

Handout NUMBER THEORY

Handout NUMBER THEORY Handout of NUMBER THEORY by Kus Prihantoso Krisnawan MATHEMATICS DEPARTMENT FACULTY OF MATHEMATICS AND NATURAL SCIENCES YOGYAKARTA STATE UNIVERSITY 2012 Contents Contents i 1 Some Preliminary Considerations

More information

7. Some irreducible polynomials

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

More information

Primes in Sequences. Lee 1. By: Jae Young Lee. Project for MA 341 (Number Theory) Boston University Summer Term I 2009 Instructor: Kalin Kostadinov

Primes in Sequences. Lee 1. By: Jae Young Lee. Project for MA 341 (Number Theory) Boston University Summer Term I 2009 Instructor: Kalin Kostadinov Lee 1 Primes in Sequences By: Jae Young Lee Project for MA 341 (Number Theory) Boston University Summer Term I 2009 Instructor: Kalin Kostadinov Lee 2 Jae Young Lee MA341 Number Theory PRIMES IN SEQUENCES

More information

Alex, I will take congruent numbers for one million dollars please

Alex, I will take congruent numbers for one million dollars please Alex, I will take congruent numbers for one million dollars please Jim L. Brown The Ohio State University Columbus, OH 4310 jimlb@math.ohio-state.edu One of the most alluring aspectives of number theory

More information

1 Lecture: Integration of rational functions by decomposition

1 Lecture: Integration of rational functions by decomposition Lecture: Integration of rational functions by decomposition into partial fractions Recognize and integrate basic rational functions, except when the denominator is a power of an irreducible quadratic.

More information

SUM OF TWO SQUARES JAHNAVI BHASKAR

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

More information

Factoring. Factoring 1

Factoring. Factoring 1 Factoring Factoring 1 Factoring Security of RSA algorithm depends on (presumed) difficulty of factoring o Given N = pq, find p or q and RSA is broken o Rabin cipher also based on factoring Factoring like

More information

Die ganzen zahlen hat Gott gemacht

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.

More information

Principles of Public Key Cryptography. Applications of Public Key Cryptography. Security in Public Key Algorithms

Principles of Public Key Cryptography. Applications of Public Key Cryptography. Security in Public Key Algorithms Principles of Public Key Cryptography Chapter : Security Techniques Background Secret Key Cryptography Public Key Cryptography Hash Functions Authentication Chapter : Security on Network and Transport

More information

Doug Ravenel. October 15, 2008

Doug Ravenel. October 15, 2008 Doug Ravenel University of Rochester October 15, 2008 s about Euclid s Some s about primes that every mathematician should know (Euclid, 300 BC) There are infinitely numbers. is very elementary, and we

More information

How To Prove The Dirichlet Unit Theorem

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

More information

Handout #1: Mathematical Reasoning

Handout #1: Mathematical Reasoning Math 101 Rumbos Spring 2010 1 Handout #1: Mathematical Reasoning 1 Propositional Logic A proposition is a mathematical statement that it is either true or false; that is, a statement whose certainty or

More information

The Mean Value Theorem

The Mean Value Theorem The Mean Value Theorem THEOREM (The Extreme Value Theorem): If f is continuous on a closed interval [a, b], then f attains an absolute maximum value f(c) and an absolute minimum value f(d) at some numbers

More information

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? 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

More information

Math 453: Elementary Number Theory Definitions and Theorems

Math 453: Elementary Number Theory Definitions and Theorems Math 453: Elementary Number Theory Definitions and Theorems (Class Notes, Spring 2011 A.J. Hildebrand) Version 5-4-2011 Contents About these notes 3 1 Divisibility and Factorization 4 1.1 Divisibility.......................................

More information