Dixon s Factorization method

Similar documents
Algorithms. Shanks square forms algorithm Williams p+1 Quadratic Sieve Dixon s Random Squares Algorithm

Factoring Algorithms Pollard s p 1 Method. This method discovers a prime factor p of an integer n whenever p 1 has only small prime factors.

Integer factorization, part 1: the Q sieve. D. J. Bernstein

Factoring. there exists some 1 i < j l such that x i x j (mod p). (1) p gcd(x i x j, n).

What is The Continued Fraction Factoring Method

Number Theory. CSS322: Security and Cryptography. Sirindhorn International Institute of Technology Thammasat University CSS322. Number Theory.

Factorization & Primality Testing

This is a recursive algorithm. The procedure is guaranteed to terminate, since the second argument decreases each time.

Lecture 6: Cryptanalysis of public-key algorithms.,

The RSA Cryptosystem: Factoring the public modulus. Debdeep Mukhopadhyay

Chapter 9 Mathematics of Cryptography Part III: Primes and Related Congruence Equations

8 Primes and Modular Arithmetic

[Part 2] Asymmetric-Key Encipherment. Chapter 9. Mathematics of Cryptography. Objectives. Contents. Objectives

a the relation arb is defined if and only if = 2 k, k

Sieve-based factoring algorithms

ANALYZING THE QUADRATIC SIEVE ALGORITHM

Correctness, Security and Efficiency of RSA

Integers and Division

SMOOTH NUMBERS AND THE QUADRATIC SIEVE. Carl Pomerance

RSA Cryptosystem and Factorization

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer?

Discrete Math, Fourteenth Problem Set (July 18)

1 The Fundamental Theorem of Arithmetic. A positive integer N has a unique prime power decomposition. Primality Testing. and. Integer Factorisation

Kim Bowman and Zach Cochran Clemson University and University of Georgia

CHAPTER 3. Congruences. Congruence: definitions and properties

Fermat s Little Theorem. Fermat s little theorem is a statement about primes that nearly characterizes them.

OBTAINING SQUARES FROM THE PRODUCTS OF NON-SQUARE INTEGERS

Number Theory Math 420 Silverman Exam #1 February 27, 2018

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer?

ENHANCING THE PERFORMANCE OF FACTORING ALGORITHMS

Chuck Garner, Ph.D. May 25, 2009 / Georgia ARML Practice

Congruence Classes. Number Theory Essentials. Modular Arithmetic Systems

NUMBER THEORY AND CODES. Álvaro Pelayo WUSTL

Lecture 11 - Basic Number Theory.

22. The Quadratic Sieve and Elliptic Curves. 22.a The Quadratic Sieve

Industrial Strength Factorization. Lawren Smithline Cornell University

Experience in Factoring Large Integers Using Quadratic Sieve

Integer factorization, part 1: the Q sieve. part 2: detecting smoothness. D. J. Bernstein

Applied Cryptography and Computer Security CSE 664 Spring 2018

CPSC 467: Cryptography and Computer Security

CPSC 467b: Cryptography and Computer Security

part 2: detecting smoothness part 3: the number-field sieve

Discrete Logarithm Problem

An integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p.

Number Theory. Modular Arithmetic

Finding small factors of integers. Speed of the number-field sieve. D. J. Bernstein University of Illinois at Chicago

Numbers. Çetin Kaya Koç Winter / 18

Theoretical Cryptography, Lecture 13

Basic elements of number theory

Basic elements of number theory

Security Level of Cryptography Integer Factoring Problem (Factoring N = p 2 q) December Summary 2

Primality Testing- Is Randomization worth Practicing?

cse 311: foundations of computing Fall 2015 Lecture 12: Primes, GCD, applications

Polynomial Selection for Number Field Sieve in Geometric View

KTH, NADA , and D1449 Kryptografins grunder. Lecture 6: RSA. Johan Håstad, transcribed by Martin Lindkvist

cse 311: foundations of computing Spring 2015 Lecture 12: Primes, GCD, applications

Lecture 1: Introduction to Public key cryptography

A field F is a set of numbers that includes the two numbers 0 and 1 and satisfies the properties:

In fact, 3 2. It is not known whether 3 1. All three problems seem hard, although Shor showed that one can solve 3 quickly on a quantum computer.

4 Number Theory and Cryptography

Analyzing the Quadratic Sieve: An Undergraduate Research Case-history

Lecture Notes. Advanced Discrete Structures COT S

CSE 521: Design and Analysis of Algorithms I

Chapter 4 Finite Fields

CPSC 467b: Cryptography and Computer Security

3 The fundamentals: Algorithms, the integers, and matrices

Chinese Remainder Algorithms. Çetin Kaya Koç Spring / 22

Primality Proofs. Geoffrey Exoo Department of Mathematics and Computer Science Indiana State University Terre Haute, IN

COMP4109 : Applied Cryptography

1. Algebra 1.7. Prime numbers

Mathematics of Cryptography

Introduction to Cryptology. Lecture 20

Algorithms (II) Yu Yu. Shanghai Jiaotong University

Computing Discrete Logarithms. Many cryptosystems could be broken if we could compute discrete logarithms quickly.

MATH 310: Homework 7

Introduction to Cryptology. Lecture 19

Outline. Number Theory and Modular Arithmetic. p-1. Definition: Modular equivalence a b [mod n] (a mod n) = (b mod n) n (a-b)

Cosc 412: Cryptography and complexity Lecture 7 (22/8/2018) Knapsacks and attacks

Mathematical Foundations of Public-Key Cryptography

Math 299 Supplement: Modular Arithmetic Nov 8, 2013

MATH 4400 SOLUTIONS TO SOME EXERCISES. 1. Chapter 1

1 Recommended Reading 1. 2 Public Key/Private Key Cryptography Overview RSA Algorithm... 2

Chinese Remainder Theorem

10 Public Key Cryptography : RSA

The factorization of RSA D. J. Bernstein University of Illinois at Chicago

CS March 17, 2009

With Question/Answer Animations. Chapter 4

Modular Arithmetic and Elementary Algebra

Elliptic Curves Spring 2013 Lecture #12 03/19/2013

Lecture 5: Arithmetic Modulo m, Primes and Greatest Common Divisors Lecturer: Lale Özkahya

Basic Algorithms in Number Theory

LECTURE 5: APPLICATIONS TO CRYPTOGRAPHY AND COMPUTATIONS

Solutions to Practice Final

9 Modular Exponentiation and Square-Roots

EXPONENTIAL SUMS EQUIDISTRIBUTION

Definition 6.1 (p.277) A positive integer n is prime when n > 1 and the only positive divisors are 1 and n. Alternatively

CS 4770: Cryptography. CS 6750: Cryptography and Communication Security. Alina Oprea Associate Professor, CCIS Northeastern University

PUTNAM TRAINING NUMBER THEORY. Exercises 1. Show that the sum of two consecutive primes is never twice a prime.

Introduction to Elliptic Curve Cryptography. Anupam Datta

Fast Fraction-Integer Method for Computing Multiplicative Inverse

Transcription:

Dixon s Factorization method Nikithkumarreddy yellu December 2015 1

Contents 1 Introduction 3 2 History 3 3 Method 4 3.1 Factor-base.............................. 4 3.2 B-smooth............................... 4 4 Examples 5 4.1 Example1............................... 5 4.2 Example2............................... 5 5 Algorithm 6 6 Optimizations 6 7 Conclusion 7 2

1 Introduction Dixon s Factorization method is an integer factorization algorithm. It is the prototypical factor method. The only factor base method for which a run-time bound not dependent on conjectures about the smoothness properties of values of a polynomial is known. Dixon s technology depends on discovering a congruence of squares modulo the integer.[2] Using Fermat s factorization algorithm we can find a congruence by selecting a pseudo-random x values and hoping that x 2 modn is a perfect square. Dixon s algorithm tries to find x and y efficiently by computing x, yɛzn such that x 2 y 2 (modn). Then with probability 1 2, x ±y (modn), hence gcd (x y, n) produces a factor of n with probability 1 2. 2 History In 1981, John D. Dixon, a mathematician at Carleton University,[3] developed the integer factorization method that bears his name. Dixon s algorithm is not used in practice, because it is quite slow, but it is important in the realm of number theory because it is the only sub-exponential factoring algorithm with a deterministic (not conjectured) run time, and it is the precursor to the quadratic sieve factorization algorithm, which is eminently practical. This approach was discovered by Micheal Morrison and John Brillhart and published in 1975. Figure 1: John D. Dixon Dixon didn t know the whole history when he published his 1981 paper, but 3

he included it in a later paper. In what seems to be a theme with important work in cryptology from the last 38 years. Dixon s 1981 paper was rejected by the first journal to which he submitted it. Dixon didn t suggest that the randomized version which he described would be competitive in practice with algorithms which were currently in use. 3 Method Suppose we are trying to factor the composite number N. We choose a bound B, and identify the factor base (which we will call P), the set of all primes less than or equal to B. Next, we search for positive integers z such that z 2 modn is B-smooth. We can therefore write, for suitable exponents ak, z 2 p iɛp pai i (modn) When we have generated enough of these relations (it s generally sufficient that the number of relations be a few more than the size of P), we can use the methods of linear algebra (for example, Gaussian elimination) to multiply together these various relations in such a way that the exponents of the primes on the right-hand side are all even z 2 1z 2 2...z 2 k = p iɛp pai,1+ai,2+...+a i,k i (modn) This gives us a congruence of squares of the form a2 b2(modn), which can be turned into a factorization of N, N = gcd(a + b, N)(N/gcd(a + b, N)). This factorization might turn out to be trivial (i.e. N = N 1), which can only happen if a b(modn), in which case we have to try again with a different combination of relations; but with luck we will get a nontrivial pair of factors of N, and the algorithm will terminate. 3.1 Factor-base Factor base is a small set of prime numbers commonly used as a mathematical tool in algorithms involving extensive sieving for potential factors of a given integer. If we want to factorize an integer N. We need to generate a large number of integer pairs (x,y) for which x ±y, x 2 y 2 (modn) and x 2 (modn) and y 2 (modn) can be completely factorized over the chosen factor base that is, all their prime factors are in P. 3.2 B-smooth A positive integer is called B-smooth if none of its prime factors is greater than B. For example, 720 has prime factorization 2 4 3 2 5 1 : therefore 720 is 5-smooth because none of its prime factors are greater than 5.[1] 4

4 Examples 4.1 Example1 We will try to factor N = 84923 using bound B = 7. Our factor base is then P = 2, 3, 5, 7. We then search randomly for integers between 4 84923 = 292 and N whose squares are B-smooth. Suppose that two of the numbers we find are 513 and 537: 513 2 mod84923 = 8400 = 2 4.3.5 2.7 So 537 2 mod84923 = 33600 = 2 6 3 5 2 7 (513 537) 2 84923 = 2 10 3 2 5 4 7 2 For the below calculations we apply some rules of modular arithmetic and division of integers. (513 537) 2 mod84923 = (275481) 2 mod84923 = (84923. 3 + 20712) 2 mod84923(weusetheeuclideanalgorithm275481 = q 84923 + rwithqand0 r < 84923(q = 3andremainderr = 20712) =(84923. 3) 2 + 2.(84923.3.20712) + 20712 2 mod84923 = 0 + 0 + 20712 2 mod84923 (we use a n modb = (amodb) n (ab)modc=(a mod c).(bmodc) With the fact that integer multiples of the modulus 8492384923 are zero That is, 20712 2 mod84923 = (2 5.3.5 2.7) 2 mod84923 = 16800 2 mod84923. The resulting factorization is 84923 = gcd(20712-16800, 84923) * gcd(20712 + 16800, 84923) = 163 * 521 4.2 Example2 Say we want to factor n=23449 over s = 2,3,5,7. x = [ n] = 154. Starting here, the first related squares we get are: 970 2 mod(23449) = 2940 = 2 2 3 5 7 2 8621 2 mod(23449) = 11760 = 2 4 3 5 7 2 5

So, (970* 8621) 2 (2 3 3 5 7 2 ) 2 (mod23449) That is, 14526 2 5880 2 (mod23449) Now, we find: gcd(14526-5880,23449) = 131 gcd(14526+5880,23449) = 179 Factors are n = 131 * 179 5 Algorithm Here are the steps of the algorithm. 1. Randomly select a ɛ Zn. 2. Let b = a 2 (modn) 3. Check if b is k-smooth [ k to be defined later ] 4. If YES, let b = t i=1 p i αi where{p1,..., pt} is the set of primes k. 5. Collect t + 1 such pairs (a1, b1),(a2, b2),,(at+1, bt+1). 6. Let bj= t i=1 p i αi j 7. Find βj ssuchthat t+1 j=1 βj αij is even for each i 8. x = ( t+1 j=1 a t+1 j βj and y = j=1 b βj) 1/2 j 6 Optimizations The quadratic sieve is an optimization of Dixon s method. Dixon s elegant factorization method was improved upon the very year it was published. Carl Pomerence published his method, the Quadratic Sieve, in 1981 while at the University of Georgia. It selects values of x close to the square root of N such that x 2 modulo N is small, thereby largely increasing the chance of obtaining a smooth number. Where Dixon s method blindly tries to factor each f(x) over the prime base S, the 7 Quadratic Sieve only considers primes in S that have a quadratic residue of n, that is: 6

n t 2 (modp) For some integer t, and where n is the number we are attempting to factor. This way, it is easy to see when a given prime will divide f(x) = x 2, since if the residue of p is t, p f(x)ifx = t, (t + 7), (t + 27), (t + 37),... This extension of Dixon s Method is much faster, and is actually the fastest algorithm for factoring numbers with less than 115 decimal digits[5]. Other ways to optimize Dixon s method include using a better algorithm to solve the matrix equation, taking advantage of the sparsity of the matrix: a number z cannot have more than log2z factors, so each row of the matrix is almost all zeros. In practice, the block Lanczos algorithm is often used. Also, the size of the factor base must be chosen carefully: if it is too small, it will be difficult to find numbers that factorize completely over it, and if it is too large, more relations will have to be collected. The optimal complexity of Dixon s method is In big-o notation: O ( exp ( 2 2 lognloglogn )) In L-notation: L n [ 1 2, 2 2 ] 7 Conclusion In this paper we explained how to implement Dixon s factorization method for prime factorization. In addition to the improvement in efficincy, this algorithm can be run in parallel by many machines, making this a great method for factoring very large numbers. This type of parallel attack was used to factor RSA-129 in 1994 over a time period of 8 months. References [1] https://en.wikipedia.org/wiki/smoothnumber. [2] Thorsten: et al. Kleinjung. Factorization of a 768-bit RSA modulus. 2010. [3] Craig P.Bauer. Secret history : The story of Cryptology. 2013. 7