Quadratic Sieve and Extensions 1 Quadratic Sieve

Total Page:16

File Type:pdf, Size:1020Kb

Load more

CS 6550 Design and Analysis of Algorithms Section A, Lecture #8 Quadratic Sieve and Extensions Instructor: Richard Peng Feb 15, 2021 DISCLAIMER: These notes are not necessarily an accurate representation of what I said during the class. They are mostly what I intend to say, and have not been carefully edited. These notes are directly adapted from Eric Bach's course notes on arith- metic algorithms http://pages.cs.wisc.edu/~cs812-1/, specifically Lectures 21- 23. Recall that given some n = pq, we want to find x 6= ±y (mod n) such that x2 ≡ y2 (mod n): We will further develop the strategy from Dixon's algorithm [Dix81]. 1. GENERATE: 2 e11 e1s a1 ≡ p1 ∗ ::: ∗ ps (1) 2 e21 e2s a2 ≡ p1 ∗ ::: ∗ ps (2) ··· (3) 2 er1 ers ar ≡ p1 ∗ ::: ∗ ps (4) 2. COMBINE: Select a product of the ais that makes all the exponents of the pis in the resulting right hand side even. Call these numbers a and b, so that a2 ≡ b2 (mod n). 3. SPLIT: Compute gcd(a ± b; n), and show (via backwards) analysis from the random source of a and b that this is a nontrivial divisor of n. 1 Quadratic Sieve ∗ Dixon's algorithm chooses the ai to be random elements of Zn. The quadratic sieve [Pom84] uses a different GENERATE step that both makes the generated numbers easier to fac- torize, and also keeps them smaller (compared to n) Let p m n (5) f (x) = (x + m)2 − n: (6) 1 This seems more or less like generating the entire list of random numbers via some random hash function, and then use sieve-like methods to speed up the factorization process for them. By expanding out the square, we get f(x) ≤ x2 + 2xm (7) = O (x (x + 2m)) (8) for any x > 0. Such an algorithm has two major advantages: 1. the residues are smaller, hence more likely to be smooth. We will ensure x = no(1), which means f (x) ≤ n1=2+o(1): 2. the residues are values of a polynomial which we can factor using a sieve. Observe that for any prime p, pjf(x) implies either pjx or pj(x + 2m). So we can generate all such divisors by `walking around' 2m and 0, in the same way we do a sieve. A fully rigorous analysis of the complexity of quadratic sieve is not known. The heuristic justification for the bound is that the values of f(x) factor like randomly chosen numbers of the same size. Suppose we check all x 2 [1;U], and we only keep the ones that are y-smooth, the cost of the sieve is then about X U ≈ U · log log y i 2≤p≤y Then recall from last time that the probability of a number up to m being m1/λ-smooth is: P r[x ≤ m is m1/λ-smooth] ≈ λ−λ: In this case, subbing in m n1=2 gives: λ = log n=(2 log B): So to get y factored quadratic residues we should take M yλλ. Since y = n2/λ, we get a total cost for the factoring algorithm of T = n2/λB + n3/λ; after taking the time for Gaussian elimination into account. We get a "good" value for lambda by setting these terms equal and solving for lambda. The analysis proceeds similarly to the Dixon algorithm, and we get T = exp(p9=8(L log L) + o(1)) The constant p9=8 = 1:060660::: in the exponent is significantly smaller than Dixon's algo. Note that this is constant in exponent: it more or less square roots the runtime... 2 2 Improvements and Sanity Checks The quadratic sieve is a practical factoring algorithm, and was the workhorse for large number factorization during the 80's and early 90's. To make it run even faster: 1. Instead of factoring the f(x), put log f(x) into the array and subtract log p instead of dividing by p. This replaces division (an expensive step) by a single-precision operation. 2. Use multiple polynomials [Sil87]. 3. Use sparse matrix techniques on the linear equations, instead of Gaussian elimina- tion [Mon95]. 4. Parallelize. If you have many processors, give each one the task of sieveing a block of values of f(x). Alternatively, give each processor its own polynomial to work on. The master processor does the combining step at the end, which (in practice) is faster than sieveing. 5. Use higher degree polynomials: this will be the focus of the rest of our discussion. Here we largely follow the presentation from [Pom96]. On the other hand, note that the theoretical assumption of f(x) behaving like random numbers is a very major one. It's mapping a rather narrow band of numbers,p x = 1 ::: exp(L1=2) onto another rather narrow band of numbers around m ≈ n. What we need is that when we multiply these numbers further (using the computed exponent vector), and take their residue modulo n, the roots don't collide with good probability. The only high level intuition I have for this is that square roots are essentially random: for any `low description' sets A, B, the probability of a number in A squaring to a number in B is roughly jAjjBj=n, at least once the wrap around effect kicks in. There seems to be a lot of recent progress in math on how such sets interact, but I'm not aware of work in theoretical algorithms on this topic this century. Any pointers would be helpful: this issue is going to show up again in the next part as well, when we go to fancier f(x) functions. 3 Using Higher Degree Polynomials We now work back in asymptotics, and ignore constants in the exponent. The QS can be viewed as generating square roots via the mapping f (x) = x2 + 2mx + m2 − n: As long as this number is larger than n, we are able to `randomize' the pre-image of the square. 3 To use higher degree polynomials, the idea is to go to a degree d polynomial, and obtain these large values through the product of a number of smaller polynomials. That is, we treat m as a special symbol, and piece together the higher degree poly via a product Y (ai + bim) : i The issue is we still need to do a modulo n. For that, it's useful to define fields/rings augmented with algebraic integers. That is, we pick a polynomial f(θ) such that n = f (m) ; or equivalently, let θ denote a root of the polynomial obtained from the base m represen- tation of n. 1=3 2=3 For n with L digits, we will pick parameters so that d = L , and thus logm ≈ L . We will also pick the smoothness threshold y to be exp(L1=3). The main issue is how to ensure that Y (ai + biθ) i is a square over Z[θ]. In this lecture, we make a special assumption, which leads to the special number field sieve. That is Z[θ] is a unique factorization domain. In this case, we can factor each ai + biθ into products of primes polynomials. Let the min-poly of θ be d d−1 x + cd−1x + : : : c0 the norm of a + bθ is defined as def d d−1 d−2 2 d d N (a + bθ) = a − cd−1a b + cd−2a b + ::: (−1) c0b : It can be shown that norms are multiplicative. Furthermore, the key property over the (assumed) unique factorization domains is: Lemma 3.1. If Z[θ] is a unique factorization domain, then N(a + bθ) factors into the primes whose norms equal to the prime factorization of N(a + bθ). 1=3 2=3 Note that if ai, bi are picked to have L digits, the norm has at most L digits. 1=3 So by the `sqrt' rule, both a + bm and N(a + bθ) are y-smooth (for logy ≈ L ) with probability exp(−L1=3). So as long as one tries more than exp(2L1=3) pairs, we get more than 10y ones where both are y-smooth. Solving equations on exponents modulo 2, we are able to get a subset S such that Y Y (a + bm) (a + bθ) i2S i2S 4 are squares in Z and Z[θ] respectively. Evaluating the latter with the mapping θ m then gives two different numbers whose square match. This is roughly how an exp(L1=3) type runtime. The general issue is that Z[θ] cannot be expected to be a unique factorization domain in general. We will also discuss how to interpret these norms next time. 4 More on Norms The formal definition norms is based on embeddings of Q[θ] into C. Such embeddings are defined by what θ gets mapped to. Let the embedding be σ : Q[θ] ! C, then requirement of f (σ (θ)) = 0 means σ(θ) must be mapped to a root of f. As polynomials factorize completely over complex numbers, we can factor f into its roots d Y f (x) = (x − θi) i=1 and define the embeddings σ1 : : : σd via σi(θ) = θi. Note that implies that for some α, Pd i which is really α(θ) = i=0 αiθ , we have σi (α) = α (θi) Then formally, the norm of some α 2 Q[θ] is defined as def Y N (α) = σi (α) 1≤i≤d For the discussion above, we needed: 1. Norm is multiplicative, N(a) · N(b) = N(ab).
Recommended publications
  • The Quadratic Sieve - Introduction to Theory with Regard to Implementation Issues

    The Quadratic Sieve - Introduction to Theory with Regard to Implementation Issues

    The Quadratic Sieve - introduction to theory with regard to implementation issues RNDr. Marian Kechlibar, Ph.D. April 15, 2005 Contents I The Quadratic Sieve 3 1 Introduction 4 1.1 The Quadratic Sieve - short description . 5 1.1.1 Polynomials and relations . 5 1.1.2 Smooth and partial relations . 7 1.1.3 The Double Large Prime Variation . 8 1.1.4 Problems to solve . 10 2 Quadratic Sieve Implementation 12 2.1 The Factor Base . 12 2.2 The sieving process . 15 2.2.1 Interval sieving and solution of polynomials . 16 2.2.2 Practical implementation . 16 2.3 Generation of polynomials . 17 2.3.1 Desirable properties of polynomials . 17 2.3.2 Assessment of magnitude of coecients . 18 2.3.3 MPQS - The Silverman Method . 20 2.3.4 SIQS principle . 21 2.3.5 Desirable properties of b . 22 2.3.6 SIQS - Generation of the Bi's . 23 2.3.7 Generation of b with Gray code formulas . 24 2.3.8 SIQS - General remarks on a determination . 26 2.3.9 SIQS - The bit method for a coecient . 27 2.3.10 SIQS - The Carrier-Wagsta method for a coecient . 28 2.4 Combination of the relations, partial relations and linear algebra 30 2.5 Linear algebra step . 31 2.6 The Singleton Gap . 32 1 3 Experimental Results 36 3.1 Sieving speed - dependence on FB size . 36 3.2 Sieving speed - dependence on usage of 1-partials . 38 3.3 Singletons - dependence on log(N) and FB size . 39 3.4 Properties of the sieving matrices .
  • The Quadratic Sieve Factoring Algorithm

    The Quadratic Sieve Factoring Algorithm

    The Quadratic Sieve Factoring Algorithm Eric Landquist MATH 488: Cryptographic Algorithms December 14, 2001 1 1 Introduction Mathematicians have been attempting to find better and faster ways to fac- tor composite numbers since the beginning of time. Initially this involved dividing a number by larger and larger primes until you had the factoriza- tion. This trial division was not improved upon until Fermat applied the factorization of the difference of two squares: a2 b2 = (a b)(a + b). In his method, we begin with the number to be factored:− n. We− find the smallest square larger than n, and test to see if the difference is square. If so, then we can apply the trick of factoring the difference of two squares to find the factors of n. If the difference is not a perfect square, then we find the next largest square, and repeat the process. While Fermat's method is much faster than trial division, when it comes to the real world of factoring, for example factoring an RSA modulus several hundred digits long, the purely iterative method of Fermat is too slow. Sev- eral other methods have been presented, such as the Elliptic Curve Method discovered by H. Lenstra in 1987 and a pair of probabilistic methods by Pollard in the mid 70's, the p 1 method and the ρ method. The fastest algorithms, however, utilize the− same trick as Fermat, examples of which are the Continued Fraction Method, the Quadratic Sieve (and it variants), and the Number Field Sieve (and its variants). The exception to this is the El- liptic Curve Method, which runs almost as fast as the Quadratic Sieve.
  • Sieve Algorithms for the Discrete Logarithm in Medium Characteristic Finite Fields Laurent Grémy

    Sieve Algorithms for the Discrete Logarithm in Medium Characteristic Finite Fields Laurent Grémy

    Sieve algorithms for the discrete logarithm in medium characteristic finite fields Laurent Grémy To cite this version: Laurent Grémy. Sieve algorithms for the discrete logarithm in medium characteristic finite fields. Cryptography and Security [cs.CR]. Université de Lorraine, 2017. English. NNT : 2017LORR0141. tel-01647623 HAL Id: tel-01647623 https://tel.archives-ouvertes.fr/tel-01647623 Submitted on 24 Nov 2017 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. AVERTISSEMENT Ce document est le fruit d'un long travail approuvé par le jury de soutenance et mis à disposition de l'ensemble de la communauté universitaire élargie. Il est soumis à la propriété intellectuelle de l'auteur. Ceci implique une obligation de citation et de référencement lors de l’utilisation de ce document. D'autre part, toute contrefaçon, plagiat, reproduction illicite encourt une poursuite pénale. Contact : [email protected] LIENS Code de la Propriété Intellectuelle. articles L 122. 4 Code de la Propriété Intellectuelle. articles L 335.2- L 335.10 http://www.cfcopies.com/V2/leg/leg_droi.php
  • The RSA Algorithm Clifton Paul Robinson

    The RSA Algorithm Clifton Paul Robinson

    Bridgewater State University Virtual Commons - Bridgewater State University Honors Program Theses and Projects Undergraduate Honors Program 5-1-2018 The Key to Cryptography: The RSA Algorithm Clifton Paul Robinson Follow this and additional works at: http://vc.bridgew.edu/honors_proj Part of the Computer Sciences Commons Recommended Citation Robinson, Clifton Paul. (2018). The Key ot Cryptography: The RSA Algorithm. In BSU Honors Program Theses and Projects. Item 268. Available at: http://vc.bridgew.edu/honors_proj/268 Copyright © 2018 Clifton Paul Robinson This item is available as part of Virtual Commons, the open-access institutional repository of Bridgewater State University, Bridgewater, Massachusetts. The Key to Cryptography: The RSA Algorithm Clifton Paul Robinson Submitted in Partial Completion of the Requirements for Commonwealth Interdisciplinary Honors in Computer Science and Mathematics Bridgewater State University May 1, 2018 Dr. Jacqueline Anderson Thesis Co-Advisor Dr. Michael Black, Thesis Co-Advisor Dr. Ward Heilman, Committee Member Dr. Haleh Khojasteh, Committee Member BRIDGEWATER STATE UNIVERSITY UNDERGRADUATE THESIS The Key To Cryptography: The RSA Algorithm Author: Advisors: Clifton Paul ROBINSON Dr. Jackie ANDERSON Dr. Michael BLACK Submitted in Partial Completion of the Requirements for Commonwealth Honors in Computer Science and Mathematics Dr. Ward Heilman, Reading Committee Dr. Haleh Khojasteh, Reading Committee ii Dedicated to Mom, Dad, James, and Mimi iii Contents Abstractv 1 Introduction1 1.1 The Project Overview........................1 2 Theorems and Definitions2 2.1 Definitions..............................2 2.2 Theorems...............................5 3 The History of Cryptography6 3.1 Origins................................6 3.2 A Transition.............................6 3.3 Cryptography at War........................7 3.4 The Creation and Uses of RSA...................7 4 The Mathematics9 4.1 What is a Prime Number?.....................9 4.2 Factoring Numbers........................
  • Integer Factorization and Computing Discrete Logarithms in Maple

    Integer Factorization and Computing Discrete Logarithms in Maple

    Integer Factorization and Computing Discrete Logarithms in Maple Aaron Bradford∗, Michael Monagan∗, Colin Percival∗ [email protected], [email protected], [email protected] Department of Mathematics, Simon Fraser University, Burnaby, B.C., V5A 1S6, Canada. 1 Introduction As part of our MITACS research project at Simon Fraser University, we have investigated algorithms for integer factorization and computing discrete logarithms. We have implemented a quadratic sieve algorithm for integer factorization in Maple to replace Maple's implementation of the Morrison- Brillhart continued fraction algorithm which was done by Gaston Gonnet in the early 1980's. We have also implemented an indexed calculus algorithm for discrete logarithms in GF(q) to replace Maple's implementation of Shanks' baby-step giant-step algorithm, also done by Gaston Gonnet in the early 1980's. In this paper we describe the algorithms and our optimizations made to them. We give some details of our Maple implementations and present some initial timings. Since Maple is an interpreted language, see [7], there is room for improvement of both implementations by coding critical parts of the algorithms in C. For example, one of the bottle-necks of the indexed calculus algorithm is finding and integers which are B-smooth. Let B be a set of primes. A positive integer y is said to be B-smooth if its prime divisors are all in B. Typically B might be the first 200 primes and y might be a 50 bit integer. ∗This work was supported by the MITACS NCE of Canada. 1 2 Integer Factorization Starting from some very simple instructions | \make integer factorization faster in Maple" | we have implemented the Quadratic Sieve factoring al- gorithm in a combination of Maple and C (which is accessed via Maple's capabilities for external linking).
  • Factoring and Discrete Log

    Factoring and Discrete Log

    Factoring and Discrete Log Nadia Heninger University of Pennsylvania June 1, 2015 Textbook RSA [Rivest Shamir Adleman 1977] Public Key Private Key N = pq modulus p; q primes e encryption exponent d decryption exponent (d = e−1 mod (p − 1)(q − 1)) Encryption public key = (N; e) ciphertext = messagee mod N message = ciphertextd mod N Textbook RSA [Rivest Shamir Adleman 1977] Public Key Private Key N = pq modulus p; q primes e encryption exponent d decryption exponent (d = e−1 mod (p − 1)(q − 1)) Signing public key = (N; e) signature = messaged mod N message = signaturee mod N Computational problems Factoring Problem: Given N, compute its prime factors. I Computationally equivalent to computing private key d. I Factoring is in NP and coNP ! not NP-complete (unless P=NP or similar). Computational problems eth roots mod N Problem: Given N, e, and c, compute x such that xe ≡ c mod N. I Equivalent to decrypting an RSA-encrypted ciphertext. I Equivalent to selective forgery of RSA signatures. I Conflicting results about whether it reduces to factoring: I \Breaking RSA may not be equivalent to factoring" [Boneh Venkatesan 1998] \an algebraic reduction from factoring to breaking low-exponent RSA can be converted into an efficient factoring algorithm" I \Breaking RSA generically is equivalent to factoring" [Aggarwal Maurer 2009] \a generic ring algorithm for breaking RSA in ZN can be converted into an algorithm for factoring" I \RSA assumption": This problem is hard. A garden of attacks on textbook RSA Unpadded RSA encryption is homomorphic under multiplication. Let's have some fun! Attack: Malleability Given a ciphertext c = Enc(m) = me mod N, attacker can forge ciphertext Enc(ma) = cae mod N for any a.
  • Factoring Integers with a Brain-Inspired Computer John V

    Factoring Integers with a Brain-Inspired Computer John V

    IEEE TRANSACTIONS ON CIRCUITS AND SYSTEMS—I: REGULAR PAPERS 1 Factoring Integers with a Brain-Inspired Computer John V. Monaco and Manuel M. Vindiola Abstract—The bound to factor large integers is dominated • Constant-time synaptic integration: a single neuron in the by the computational effort to discover numbers that are B- brain may receive electrical potential inputs along synap- smooth, i.e., integers whose largest prime factor does not exceed tic connections from thousands of other neurons. The B. Smooth numbers are traditionally discovered by sieving a polynomial sequence, whereby the logarithmic sum of prime incoming potentials are continuously and instantaneously factors of each polynomial value is compared to a threshold. integrated to compute the neuron’s membrane potential. On a von Neumann architecture, this requires a large block of Like the brain, neuromorphic architectures aim to per- memory for the sieving interval and frequent memory updates, form synaptic integration in constant time, typically by resulting in O(ln ln B) amortized time complexity to check each leveraging physical properties of the underlying device. value for smoothness. This work presents a neuromorphic sieve that achieves a constant-time check for smoothness by reversing Unlike the traditional CPU-based sieve, the factor base is rep- the roles of space and time from the von Neumann architecture resented in space (as spiking neurons) and the sieving interval and exploiting two characteristic properties of brain-inspired in time (as successive time steps). Sieving is performed by computation: massive parallelism and constant time synaptic integration. The effects on sieving performance of two common a population of leaky integrate-and-fire (LIF) neurons whose neuromorphic architectural constraints are examined: limited dynamics are simple enough to be implemented on a range synaptic weight resolution, which forces the factor base to be of current and future architectures.
  • Note to Users

    Note to Users

    NOTE TO USERS This reproduction is the best copy available. UMI A SURVEY OF RESULTS ON GIUGA'S CONJECTURE AND RELATED CONJECTURES by Joseph R. Hobart BSc., University of Northern British Columbia, 2004 THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF SCIENCE in MATHEMATICAL, COMPUTER AND PHYSICAL SCIENCES (MATHEMATICS) THE UNIVERSITY OF NORTHERN BRITISH COLUMBIA July 2005 © Joseph R. Hobart, 2005 Library and Bibliothèque et 1 ^ 1 Archives Canada Archives Canada Published Heritage Direction du Branch Patrimoine de l'édition 395 Wellington Street 395, rue Wellington Ottawa ON K1A0N4 Ottawa ON K1A0N4 Canada Canada Your file Votre référence ISBN: 978-0-494-28392-9 Our file Notre référence ISBN: 978-0-494-28392-9 NOTICE: AVIS: The author has granted a non­ L'auteur a accordé une licence non exclusive exclusive license allowing Library permettant à la Bibliothèque et Archives and Archives Canada to reproduce,Canada de reproduire, publier, archiver, publish, archive, preserve, conserve,sauvegarder, conserver, transmettre au public communicate to the public by par télécommunication ou par l'Internet, prêter, telecommunication or on the Internet,distribuer et vendre des thèses partout dans loan, distribute and sell theses le monde, à des fins commerciales ou autres, worldwide, for commercial or non­ sur support microforme, papier, électronique commercial purposes, in microform,et/ou autres formats. paper, electronic and/or any other formats. The author retains copyright L'auteur conserve la propriété du droit d'auteur ownership and moral rights in et des droits moraux qui protège cette thèse. this thesis. Neither the thesis Ni la thèse ni des extraits substantiels de nor substantial extracts from it celle-ci ne doivent être imprimés ou autrement may be printed or otherwise reproduits sans son autorisation.
  • Dixon's Factorization Method

    Dixon's Factorization Method

    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 congru- ence 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 x2modN is a perfect square. Dixon's algorithm tries to find x and y efficiently by computing x; yZn such 2 2 1 that x ≡ y (modN) : Then with probability ≥ 2 , x 6≡ ±y (modN), hence gcd 1 (x − y; n) produces a factor of n with probability ≥ 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.
  • Implementing and Comparing Integer Factorization Algorithms

    Implementing and Comparing Integer Factorization Algorithms

    Implementing and Comparing Integer Factorization Algorithms Jacqueline Speiser jspeiser p Abstract by choosing B = exp( logN loglogN)) and let the factor base be the set of all primes smaller than B. Next, Integer factorization is an important problem in modern search for positive integers x such that x2 mod N is B- cryptography as it is the basis of RSA encryption. I have smooth, meaning that all the factors of x2 are in the factor implemented two integer factorization algorithms: Pol- 2 e1 e2 ek base. For all B-smooth numbers xi = p p ::: p , lard’s rho algorithm and Dixon’s factorization method. 2 record (xi ;~ei). After we have enough of these relations, While the results are not revolutionary, they illustrate we can solve a system of linear equations to find some the software design difficulties inherent to integer fac- subset of the relations such that ∑~ei =~0 mod 2. (See the torization. The code for this project is available at Implementation section for details on how this is done.) https://github.com/jspeiser/factoring. Note that if k is the size of our factor base, then we only need k + 1 relations to guarantee that such a solution 1 Introduction exists. We have now found a congruence of squares, 2 2 2 ∑i ei1 ∑i eik a = xi and b = p1 ::: pk . This implies that The integer factorization problem is defined as follows: (a + b)(a − b) = 0 mod N, which means that there is a given a composite number N, find two integers x and y 50% chance that gcd(a−b;N) factorspN.
  • RSA, Integer Factorization, Diffie–Hellman, Discrete Logarithm

    RSA, Integer Factorization, Diffie–Hellman, Discrete Logarithm

    RSA, integer factorization, Diffie–Hellman, discrete logarithm computation Aurore Guillevic Inria Nancy, France November 12, 2020 1/71 Aurore Guillevic [email protected] • L1-L2 at Université de Bretagne Sud, Lorient (2005–2007) • L3 Vannes (2007–2008) • M1-M2 maths and cryptography at Université de Rennes 1 (2008–2010) • internship and PhD at Thales Communication, Gennevilliers (92) • post-doc at Inria Saclay (2 years) and Calgary (Canada, 1 year) • researcher in cryptography at Inria Nancy since November 2016 • adjunct assistant professor at Polytechnique (2017–2020) 2/71 Outline Preliminaries RSA, and integer factorization problem Naive methods Quadratic sieve Number Field Sieve Bad randomness: gcd, Coppersmith attacks Diffie-Hellman, and the discrete logarithm problem Generic algorithms of square root complexity Pairings 3/71 Introduction: public-key cryptography Introduced in 1976 (Diffie–Hellman, DH) and 1977 (Rivert–Shamir–Adleman, RSA) Asymmetric means distinct public and private keys • encryption with a public key • decryption with a private key • deducing the private key from the public key is a very hard problem Two hard problems: • Integer factorization (for RSA) • Discrete logarithm computation in a finite group (for Diffie–Hellman) 4/71 Textbooks Alfred Menezes, Paul C. van Oorschot, and Scott A. Vanstone. Handbook of Applied Cryptography. CRC Press, 1996. Christof Paar and Jan Pelzl. Understanding Cryptography, a Textbook for Students and Practitioners. Springer, 2010. (Two texbooks [PP10] (Paar and Pelzl) are available at the library at Lorient, code 005.8 PAA). Relvant chapters: 6, 7, 8, and 10. During lockdown, the library is opened: see La BU sur rendez-vous https://www-actus.univ-ubs.fr/fr/index/actualites/scd/ covid-19-la-bu-sur-rdv.html Lecture notes: https://gitlab.inria.fr/guillevi/enseignement/ (Lorient → Master-CSSE.md) 5/71 Textbooks The Handbook is available in PDF for free.
  • Algorithms for Factoring Integers of the Form N = P * Q

    Algorithms for Factoring Integers of the Form N = P * Q

    Algorithms for Factoring Integers of the Form n = p * q Robert Johnson Math 414 Final Project 12 March 2010 1 Table of Contents 1. Introduction 3 2. Trial Division Algorithm 3 3. Pollard (p – 1) Algorithm 5 4. Lenstra Elliptic Curve Method 9 5. Continued Fraction Factorization Method 13 6. Conclusion 15 2 Introduction This paper is a brief overview of four methods used to factor integers. The premise is that the integers are of the form n = p * q, i.e. similar to RSA numbers. The four methods presented are Trial Division, the Pollard (p -1) algorithm, the Lenstra Elliptic Curve Method, and the Continued Fraction Factorization Method. In each of the sections, we delve into how the algorithm came about, some background on the machinery that is implemented in the algorithm, the algorithm itself, as well as a few eXamples. This paper assumes the reader has a little eXperience with group theory and ring theory and an understanding of algebraic functions. This paper also assumes the reader has eXperience with programming so that they might be able to read and understand the code for the algorithms. The math introduced in this paper is oriented in such a way that people with a little eXperience in number theory may still be able to read and understand the algorithms and their implementation. The goal of this paper is to have those readers with a little eXperience in number theory be able to understand and use the algorithms presented in this paper after they are finished reading. Trial Division Algorithm Trial division is the simplest of all the factoring algorithms as well as the easiest to understand.