May 29, 2008 GNFS polynomials Peter L. Montgomery Microsoft Research, USA 1 Abstract The Number Field Sieve is asymptotically the fastest known algorithm.

Slides:



Advertisements
Similar presentations
Splash Screen.
Advertisements

Splash Screen.
Factoring of Large Numbers using Number Field Sieve Matrix Step Chandana Anand, Arman Gungor, and Kimberly A. Thomas ECE 646 Fall 2006.
Integer Factorization By: Josh Tuggle & Kyle Johnson.
Rational Root Theorem.
Prime recognition and factorization
Notation Intro. Number Theory Online Cryptography Course Dan Boneh
Copyright © Cengage Learning. All rights reserved. 0 Precalculus Review.
1 Chapter 7– Introduction to Number Theory Instructor: 孫宏民 Room: EECS 6402, Tel: , Fax :
CSE115/ENGR160 Discrete Mathematics 03/15/11
The RSA Cryptosystem and Factoring Integers (II) Rong-Jaye Chen.
Factoring 1 Factoring Factoring 2 Factoring  Security of RSA algorithm depends on (presumed) difficulty of factoring o Given N = pq, find p or q and.
Zeros of Polynomial Functions Section 2.5. Objectives Use the Factor Theorem to show that x-c is a factor a polynomial. Find all real zeros of a polynomial.
Ch 7.3: Systems of Linear Equations, Linear Independence, Eigenvalues
Mathematics of Cryptography Part I: Modular Arithmetic, Congruence,
2.5 Zeros of Polynomial Functions
Zeros of Polynomial Functions
Warm-up Find all the solutions over the complex numbers for this polynomial: f(x) = x4 – 2x3 + 5x2 – 8x + 4.
Mathematics of Cryptography Part I: Modular Arithmetic, Congruence,
Boyce/DiPrima 9th ed, Ch 7.3: Systems of Linear Equations, Linear Independence, Eigenvalues Elementary Differential Equations and Boundary Value Problems,
Polynomials. 2 Content Evaluation Root finding Root Bracketing Interpolation Resultant.
2.1 Graphs of Quadratic Functions

Mathematics of Cryptography Part I: Modular Arithmetic
FINITE FIELDS 7/30 陳柏誠.
Information Security and Management 4. Finite Fields 8
The Polynomial Time Algorithm for Testing Primality George T. Gilbert.
October,2006 Higher- Degree Polynomials Peter L. Montgomery Microsoft Research and CWI 1 Abstract The Number Field Sieve is asymptotically the fastest.
By: Hector L Contreras SSGT / USMC
Copyright, Yogesh Malhotra, PhD, 2013www.yogeshmalhotra.com SPECIAL PURPOSE FACTORING ALGORITHMS Special Purpose Factoring Algorithms For special class.
Selecting Class Polynomials for the Generation of Elliptic Curves Elisavet Konstantinou joint work with Aristides Kontogeorgis Department of Information.
Approximation Algorithms Pages ADVANCED TOPICS IN COMPLEXITY THEORY.
College Algebra Sixth Edition James Stewart Lothar Redlin Saleem Watson.
Copyright © 2014, 2010 Pearson Education, Inc. Chapter 2 Polynomials and Rational Functions Copyright © 2014, 2010 Pearson Education, Inc.
Prabhas Chongstitvatana1 Factorizing large integers Finding the unique decomposition of n into a product of prime factors. Factorize(n) if n is prime done.
PRIMES is in P Manindra Agrawal NUS Singapore / IIT Kanpur.
Precalculus Complex Zeros V. J. Motto. Introduction We have already seen that an nth-degree polynomial can have at most n real zeros. In the complex number.
Chapter 3 Polynomial and Rational Functions Copyright © 2014, 2010, 2007 Pearson Education, Inc Zeros of Polynomial Functions.
Key Concept 1. Example 1 Leading Coefficient Equal to 1 A. List all possible rational zeros of f (x) = x 3 – 3x 2 – 2x + 4. Then determine which, if any,
Section 4.3 Zeros of Polynomials. Approximate the Zeros.
Factorization of a 768-bit RSA modulus Jung Daejin Lee Sangho.
SNFS versus (G)NFS and the feasibility of factoring a 1024-bit number with SNFS Arjen K. Lenstra Citibank, New York Technische Universiteit Eindhoven.
Slide Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.
3.4 Zeros of Polynomial Functions. The Fundamental Theorem of Algebra If f(x) is a polynomial of degree n, where n>0, then f has at least one zero in.
6.4 Factoring.
Zeros of Polynomials 2.5.
Information Security Lab. Dept. of Computer Engineering 87/121 PART I Symmetric Ciphers CHAPTER 4 Finite Fields 4.1 Groups, Rings, and Fields 4.2 Modular.
Objectives: 1. Use the factor theorem. 2. Factor a polynomial completely.
UNIT 2, LESSON 1 POLYNOMIAL FUNCTIONS. WHAT IS A POLYNOMIAL FUNCTION? Coefficients must be real numbers. Exponents must be whole numbers.
Asymptotics and Recurrence Equations Prepared by John Reif, Ph.D. Analysis of Algorithms.
Fundamental Concepts of Algebra
1 © 2010 Pearson Education, Inc. All rights reserved © 2010 Pearson Education, Inc. All rights reserved Chapter 3 Polynomial and Rational Functions.
CSE 2813 Discrete Structures Solving Recurrence Relations Section 6.2.
1 Chapter 4 Interpolation and Approximation Lagrange Interpolation The basic interpolation problem can be posed in one of two ways: The basic interpolation.
Real Zeros of Polynomial Functions
Chapter 4 With Question/Answer Animations 1. Chapter Summary Divisibility and Modular Arithmetic - Sec 4.1 – Lecture 16 Integer Representations and Algorithms.
3.3 Dividing Polynomials.
Please log on to your computers.
Splash Screen.
The Fundamental Theorem of Algebra and Complete Factorization
Copyright © Cengage Learning. All rights reserved.
Zeros of Polynomial Functions
3.3 Dividing Polynomials.
Splash Screen.
Find all solutions of the polynomial equation by factoring and using the quadratic formula. x = 0 {image}
Splash Screen.
Rational Root Theorem.
Factoring RSA Moduli: Current State of the Art J
Find (x3 + 2x2 – 5x – 6) ÷ (x – 2) using synthetic division.
Copyright © Cengage Learning. All rights reserved.
Presentation transcript:

May 29, 2008 GNFS polynomials Peter L. Montgomery Microsoft Research, USA 1 Abstract The Number Field Sieve is asymptotically the fastest known algorithm for factoring a large integer N with no small prime factors, such as an RSA modulus. An early step in the algorithm selects two polynomials with a common root modulo N. This talk will present some techniques for choosing the polynomials when N has no nice algebraic form.

Polynomial Selection for the General Number Field Sieve Peter L. Montgomery Microsoft Research, USA May 29, 2008

May 29, 2008 GNFS polynomials Peter L. Montgomery Microsoft Research, USA 3 Number Field Sieve (NFS) Asymptotically best known algorithm for factoring large integers with no small prime factors. Also best known algorithm for discrete logarithms modulo large primes.

May 29, 2008 GNFS polynomials Peter L. Montgomery Microsoft Research, USA 4 SNFS and GNFS Special Number Field Sieve (SNFS) –Number being factored has nice algebraic form. –Record ( − 1)/ (307 digits, 2007). General Number Field Sieve (GNFS) –No known nice algebraic form. –Record RSA200 (200 digits, 2005).

May 29, 2008 GNFS polynomials Peter L. Montgomery Microsoft Research, USA 5 NFS Stages – Part I Input: Composite integer N, no small factors. Polynomial selection –Find f 1, f 2  Z[X] with common root m modulo N. –Homogeneous form: F k (a, b) = b deg(fk) f k (a/b). Sieving –Find many integer pairs (a i, b i ) where both homogeneous polynomial values |F k (a i, b i )| are smooth (k = 1, 2). Normalized so gcd(a i, b i ) = 1 and b i > 0. Called relations. –Need one relation per prime in your factor bases.

May 29, 2008 GNFS polynomials Peter L. Montgomery Microsoft Research, USA 6 NFS Stages – Part II Matrix construction and linear algebra –Let  k be a (complex) root of f k. –Find nonempty set S of indices such that π j  S (a j – b j  k ) is a square in Q(  k ), for each k. Each a j – b j  k has smooth norm. –Find square roots in Q(  k ). –Apply homomorphisms mapping each  k to m mod N. –Get integer congruence A 2 ≡ B 2 (mod N). Hope GCD(A + B, N) is nontrivial factor of N.

May 29, 2008 GNFS polynomials Peter L. Montgomery Microsoft Research, USA 7 Finding Two Polynomials for NFS Given N, which we want to factor. Also input desired degrees d 1, d 2. Find irreducible polynomials f 1, f 2 of degrees d 1, d 2 with common root m modulo N (but not in C). resultant(f 1, f 2 ) will be a nonzero multiple of N, preferably a small multiple. Determinant formula for resultant gives lower bound on coefficient sizes in f 1, f 2.

May 29, 2008 GNFS polynomials Peter L. Montgomery Microsoft Research, USA 8 Sample SNFS Polynomial Selection N = ( )/ (148 digits). 9th Fermat number made SNFS famous (1990). Guess to use degrees 5 and 1. Common root m = f 1 (X) = X − m and f 2 (X) = X Resultant = ± (m 5 + 8) or 19e6 N. Homogeneous F 1 (a, b) = a − mb, and F 2 (a, b) = a b 5.

May 29, 2008 GNFS polynomials Peter L. Montgomery Microsoft Research, USA 9 Norm Sizes Assume we sieve 2e12 points, in rectangle |a|  1e6 and 0 < b  1e6. Approximate homogeneous sizes a − 1e31 b and a 5 + 8b 5. Norm bounds approx 1e37 and 9e30. Smaller norms more likely to be smooth. –Both norms must be smooth.

May 29, 2008 GNFS polynomials Peter L. Montgomery Microsoft Research, USA 10 Alternate Choices for Degree 4, m = ≈ 3e38. f 2 (X) = X –a − mb and a 4 + b 4. –Bounds 3e44 and 2e24. Degree 6, m = 2 85 ≈ 4e25. f 2 (X) = 4X –a − mb and 4a 6 + b 6. –Bounds 4e31 and 5e36. Degree 5 bounds were 1e37 and 9e30. Close call between degrees 5 and 6. –1990 technology needed monic polynomials.

May 29, 2008 GNFS polynomials Peter L. Montgomery Microsoft Research, USA 11 Roots Modulo Small Primes X –One root modulo 2, four modulo 17. X –One root modulo each of 2, 3, 5, 7, 13, 17, 19, 23. 4X –Projective root modulo 2. –Two roots modulo each of 5, 17. This quintic norm has more prime divisors < 25 than the other norms, on average.

May 29, 2008 GNFS polynomials Peter L. Montgomery Microsoft Research, USA 12 Lower Bounds on Sizes Assume f k has degree d k, coefficient bound B k (k = 1, 2). Determinant formula for resultant(f 1, f 2 ) has d 2 rows with coefficients of f 1 and d 1 rows with coefficients of f 2. Need B 1 d2 B 2 d1  N (approx). If rectangular sieving region is 2A × A, want both B k A dk small, about same size.

May 29, 2008 GNFS polynomials Peter L. Montgomery Microsoft Research, USA 13 Base-m Method for GNFS Set m ≈ N 1/(d+1) if degrees d and 1 wanted. Write N = a 0 + a 1 m a d m d in base m. Each a i is O(m), possibly negative. –f 1 (X) = X − m. –f 2 (X) = a 0 + a 1 X a d X d. –Let rectangular sieving region be 2A × A. |a|  A and 0 < b  A. Norm bounds mA and (d+1)mA d. Norms too far apart.

May 29, 2008 GNFS polynomials Peter L. Montgomery Microsoft Research, USA 14 Rating Polynomials Heuristics to increase density of smooth norms: –Try to make norm small on average. Prefer real roots, so norm is near zero on parts of sieving region. –Try to have many roots modulo small primes and prime powers. For example, X is divisible by 8 whenever it is even. Brian Murphy (ANTS, 1998) confirmed that these properties improve yield when using two quadratic polynomials.

May 29, 2008 GNFS polynomials Peter L. Montgomery Microsoft Research, USA 15 Improved Base-m Assume degree d  4 and linear wanted. Looking for f(m) = N where (if d = 5) f(X) = a 5 X 5 + a 4 X 4 + a 3 X 3 + a 2 X 2 + a 1 X + a 0. Pick leading coefficient a d. –Prefer many small prime divisors. Set m = round(N/a d ) 1/d. Fill in initial a d−1 to a 0. Usually |a d−1 |  da d /2. Reject unless |a d−2 | << m.

May 29, 2008 GNFS polynomials Peter L. Montgomery Microsoft Research, USA 16 Skewed Sieving Region Let f 0 be the initial f, with small a d to a d−2 and f 0 (m) = N. Suppose the rectangular sieving region of area 2A 2 is |a|  Ar and 0 < b  A/r. –If r = 1, norm bound is about a 0 A d or m A d. –If r >> 1, big terms are a d−3 (Ar) d−3 (A/r) 3 and a d−2 (Ar) d−2 (A/r) 2 and a d (Ar) d. –Assuming first and last dominate, equate them r = (a d−3 / a d ) 1/6 or (m/a d ) 1/6. –New norm bound a d−3 (Ar) d−3 (A/r) 3 is about m A d r d−6. –When d = 5, this is factor of r improvement over r = 1. Linear X − m norm improves slightly too.

May 29, 2008 GNFS polynomials Peter L. Montgomery Microsoft Research, USA 17 Improved Modular Properties Try f(X) = f 0 (X) + C(X) (X − m). –C(X) of degree d−4 to be determined –a d to a d−2 not affected. –a d−3 to a 0 grow, but little effect on norm bound if C has small coefficients. f(m) = f 0 (m) = N. Sieve to find C(X) for which f has good modular properties. Used for RSA140 and RSA155 (1999).

May 29, 2008 GNFS polynomials Peter L. Montgomery Microsoft Research, USA 18 Non-monic Linear Polynomial Start with N, d, a d. Instead of finding f 0 with f 0 (m) = N, find a P for which the congruence a d m d ≡ N (mod P) has many solutions m. –P product of primes ≡ 1 (mod d). with N /a d a d-th residue. For each such m, find f 0 (X) with N = P d f 0 (m/P). As earlier, reject unless coefficient of X d−2 is small. –Can perform this step quickly when same P is reused. f 2 (X) = f 0 (X) + C(X)(PX − m) for some C(X). f 2 (X) and f 1 (X) = PX − m share root m / P mod N. Due to Thorsten Kleinjung. –Used for RSA576 (2003) and RSA200 (2005).

May 29, 2008 GNFS polynomials Peter L. Montgomery Microsoft Research, USA 19 Two Quadratic Polynomials Suppose m is common root (mod N) of f k = a k X 2 + b k X + c k (k = 1, 2). –Assume O(N 1/4 ) coefficients, coprime over Q. –[m 2, m, 1] orthogonal to both [a k,b k,c k ] (mod N). Let v = cross product of [a k,b k,c k ] over Z. –Coefficients of v are O(N 1/2 ), not all zero. –v is multiple of [m 2, m, 1] (mod N). –v is a geometric progression mod N. –Not a GP over Z if f k are irreducible (m not a root). Polynomials → Geometric progression mod N.

May 29, 2008 GNFS polynomials Peter L. Montgomery Microsoft Research, USA 20 GP to Quadratic Polynomials Let R = [r 2, r 1, r 0 ] = O(N 1/2 ) be geometric progression mod N, but not over Z. Look at 2-D lattice in Z 3 where R. v = 0. –Smallest basis vectors [a k, b k, c k ] have typical size O(|R| 1/2 ) = O(|N| 1/4 ). –Resulting polynomials have common root r 2 / r 1 ≡ r 1 / r 0 mod N.

May 29, 2008 GNFS polynomials Peter L. Montgomery Microsoft Research, USA 21 Constructing 3-term GP modulo N Choose prime q slightly below N 1/2 for which N is a quadratic residue. Find x 0 near N 1/2 with x 0 2 ≡ N (mod q). Return [q, x 0, (x 0 2 – N)/q]. Different q lead to different GP and different pairs of quadratics. Used for 3,367− c105 in 1993−94.

May 29, 2008 GNFS polynomials Peter L. Montgomery Microsoft Research, USA 22 More than two Polynomials If f and g are same-size quadratics with a common root, merge them with f ± g. Use four (say) polynomials. –Changes to rest of NFS straightforward. –Need to produce twice as many relations. –Six chances per (a, b) for two norms to be smooth. –Sieve 2/6 as many points (hence smaller norms). –Sieving takes twice as long per (a, b). –Estimated time 2/3 as long as two quadratics. Hard to find four quadratics which meet the smoothness heuristics, so the 6 above is unrealistic.

May 29, 2008 GNFS polynomials Peter L. Montgomery Microsoft Research, USA 23 Two Cubics → Five-term GP Suppose m is common root (mod N) of f k = a k X 3 + b k X 2 + c k X + d k (k = 1, 2). –By resultant bound, O(N 1/6 ) coefficients is best we can get. Find vector v orthogonal over Z to both [a k, b k, c k, d k, 0] and both [0, a k, b k, c k, d k ]. –Simple determinant formula for v. –Components of v will be O(N 2/3 ). –Multiple of [m 4, m 3, m 2, m, 1] mod N.

May 29, 2008 GNFS polynomials Peter L. Montgomery Microsoft Research, USA 24 Five-term GP →Two Cubics Let R = [r 4, r 3, r 2, r 1, r 0 ] = O(N 2/3 ) be 5-term GP mod N, but not over Z. Ratio s = r 1 /r 0 mod N. Also must avoid 2 nd -order linear recurrence. Look at 2-D lattice in Z 4 orthogonal to R ′ = [r 3, r 2, r 1, r 0 ] and ( [r 4, r 3, r 2, r 1 ] −s R ′ ) / N. –Smallest basis vectors [a k, b k, c k, d k ] have typical size O((|R| 2 /N) 1/2 ) = O(|N| 1/6 ). –Resulting polynomials have common root s mod N. For two degree-d, polynomials, with O(N 1/2d ) coefficients, need 2d−1 terms of size O(N 1−1/d ).

May 29, 2008 GNFS polynomials Peter L. Montgomery Microsoft Research, USA 25 Need a five-term GP mod N Exhaustive search finds many O(N 2/3 ) solutions when N ≈ 1e8. Example: –[109, 151, 154, 11, 144] ratio 14 = 154/11 mod 2005 –Largest entry 154 vs /3 ≈ –X 3 − 4X 2 + 3X + 3 and 3X 3 − X 2 − X − 2 share root 14 mod Avoid (1 st or) 2 nd order linear recurrence. –Example: [39, 22, −39, −22, 39] mod 2005 = –X 3 + X and X share a quadratic factor. Don’t know how to find quickly when N is large.

May 29, 2008 GNFS polynomials Peter L. Montgomery Microsoft Research, USA 26 A Construction for Prime N Choose irreducible cubic f 1 to have known linear factor X−  and O(1) coefficients. –One of X 3 − (2, 3, 6, 12) will work. Find quadratic f 2 with O(N 1/3 ) coefficients and root  modulo N. Follow construction of GP from two O(N 1/6 ) cubics (one with a leading zero). N is prime in discrete logarithm problem.

May 29, 2008 GNFS polynomials Peter L. Montgomery Microsoft Research, USA 27 Can we use Matrix Inverse? Matrix inverse scaled to have integer entries. ( ) (− ) ( ) ( 10 4 −11) = 2005 I 3 ( ) ( 11 −11 3) Entries in second are bilinear forms evaluated at coefficients of f 1 and f 2, hence O(N 1/3 ). –(a 1 b 2 −b 1 a 2 a 1 c 2 −c 1 a 2 a 1 d 2 −d 1 a 2 ) –(a 1 c 2 −c 1 a 2 a 1 d 2 +b 1 c 2 −c 1 b 2 −d 1 a 2 b 1 d 2 −d 1 b 2 ) –(a 1 d 2 −d 1 a 2 b 1 d 2 −d 1 b 2 c 1 d 2 −d 1 c 2 ) Second matrix symmetric, determinant ±N. First has constant backwards diagonals.

May 29, 2008 GNFS polynomials Peter L. Montgomery Microsoft Research, USA 28 Sizes when Factoring a c200 Assume 2e20 points sieved. Two quadratics. –Coefficients 1e50. Norms 1e70. Two cubics. –Coefficients 2e33. Norms 2e63. Two degree 4. –Coefficients 1e25. Norms 2e65. Degree 3 or 4 appears best.

May 29, 2008 GNFS polynomials Peter L. Montgomery Microsoft Research, USA 29 c200 Sizes for Original Base-m Assume degree d = 5. Sieving area 2e20. m = (c200) 1/6 = 2e33. Coefficients (except leading) 1e33. Norms (d+2)(1e33)(1e10) d =7e83 and m(1e10) = 2e43. Norms too far apart, compared to equal degrees.

May 29, 2008 GNFS polynomials Peter L. Montgomery Microsoft Research, USA 30 c200 Sizes for Modified Base-m Assume degree d = 5. Sieving area 2e20. Assume a 5 ≈ 1e10 and m = (1e200/a 5 ) 1/5 ≈ 1e38. Assume we can find a 3 small enough. r ≈ (m/a 5 ) 1/6 ≈ 5e4 (skewness). Bounds 5e14 on a and 2e5 on b. a 5 (5e14) 5 and m(5e14) 2 (2e4) 3 both 2e83. –Norm bound around 1e84 (six summands). Linear bound (2e5)(1e38) = 2e43. Little different than original base-m. –But improved modular properties.

May 29, 2008 GNFS polynomials Peter L. Montgomery Microsoft Research, USA 31 Norm sizes for RSA200 Quintic chosen by Kleinjung’s program. P = Linear PX − m ≈ 1e22 X − 4e37. a 5 = ≈ 4e11. r ≈ On region of area 2e20, norm bounds about 1e79 (quintic) and 2e44 (linear).