On the Amount of Sieving in Factorization Methods

Total Page:16

File Type:pdf, Size:1020Kb

On the Amount of Sieving in Factorization Methods View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by CWI's Institutional Repository On the Amount of Sieving in Factorization Methods Proefschrift ter verkrijging van de graad van Doctor aan de Universiteit Leiden, op gezag van Rector Magnificus prof.mr. P.F. van der Heijden, volgens besluit van het College voor Promoties te verdedigen op woensdag 20 januari 2010 klokke 13.45 uur door Willemina Hendrika Ekkelkamp geboren te Almelo in 1978 Samenstelling van de promotiecommissie: promotor: Prof.dr. R. Tijdeman Prof.dr. A.K. Lenstra (EPFL, Lausanne, Zwitserland) copromotor: Dr. ir. H.J.J te Riele (CWI) overige leden: Prof.dr. R.J.F. Cramer (CWI / Universiteit Leiden) Prof.dr. H.W. Lenstra Prof.dr. P.Stevenhagen Dr. P. Zimmermann (INRIA, Nancy, Frankrijk) The research in this thesis has been carried out at the national research center for Mathematics and Computer Science in The Netherlands (CWI) and at the Univer- siteit Leiden. It has been financially supported by the Netherlands Organisation for Scientific Research (NWO), project 613.000.314. On the Amount of Sieving in Factorization Methods Ekkelkamp, W.H., 1978 – On the Amount of Sieving in Factorization Methods ISBN: THOMAS STIELTJES INSTITUTE FOR MATHEMATICS c W.H. Ekkelkamp, Den Ham 2009 The° illustration on the cover is a free interpretation of line and lattice sieving in combination with the amount of relations found. Contents 1 Introduction 1 1.1 Factoringlargenumbers .......................... 1 1.2 Multiple polynomial quadratic sieve . 2 1.3 Number field sieve . 4 1.4 Smoothandsemismoothnumbers. 6 1.5 Simulating the sieving . 7 1.6 Conclusion ................................. 7 2 Smooth and Semismooth Numbers 9 2.1 Introduction................................. 9 2.2 Basictools.................................. 11 2.3 Type1expansions ............................. 11 2.3.1 Smoothnumbers .......................... 12 2.3.2 1-semismoothnumbers. 12 2.3.3 2-semismoothnumbers. 13 2.3.4 k-semismoothnumbers....................... 14 2.4 Type2expansions ............................. 15 2.4.1 Smoothnumbers .......................... 15 2.4.2 k-semismoothnumbers....................... 16 2.5 ProofofTheorem6............................. 18 2.6 ProofofTheorem7............................. 22 3 From Theory to Practice 29 3.1 Introduction................................. 29 3.2 Computing the approximating Ψ-function of Corollary5 ................................. 30 β1 β2 α 3.2.1 Main term of Ψ2(x,x ,x ,x ) ................. 31 β1 β2 α 3.2.2 Second order term of Ψ2(x,x ,x ,x )............. 36 3.3 ExperimentingwithMPQS ........................ 40 3.3.1 Equal upper bounds . 42 3.3.2 Different upper bounds . 48 3.3.3 Optimal bounds . 50 iv CONTENTS 3.4 ExperimentingwithNFS ......................... 52 4 Predicting the Sieving Effort for the Number Field Sieve 61 4.1 Introduction................................. 61 4.2 Simulatingrelations ............................ 63 4.2.1 CaseI................................ 64 4.2.2 CaseII ............................... 68 4.2.3 Special primes . 70 4.3 Thestopcriterion ............................. 71 4.3.1 Duplicates.............................. 72 4.4 Experiments................................. 72 4.4.1 CaseI,linesieving ......................... 73 4.4.2 Case I, lattice sieving . 76 4.4.3 CaseII,linesieving ........................ 77 4.4.4 Case II, lattice sieving . 79 4.4.5 Comparing line and lattice sieving . 79 4.5 Whichcasetochoose............................ 82 4.6 Additional experiments . 85 4.6.1 Size of the sample sieve test . 85 4.6.2 Expected sieving area and sieving time . 89 4.6.3 Growth behavior of useful relations . 92 4.6.4 Oversquareness and matrix size . 95 5 Conclusions and Suggestions for Future Research 99 5.1 Smoothandsemismoothnumbers. 99 5.2 Simulating the sieving . 100 Bibliography 103 Samenvatting 107 Acknowledgements 109 Curriculum Vitae 111 Chapter 1 Introduction 1.1 Factoring large numbers In 1977 Rivest, Shamir, and Adleman introduced the RSA public-key cryptosystem [44]. The safety of this cryptosystem is closely related to the difficulty of factoring large integers. It has not been proved that breaking RSA is equivalent with factor- ing, but it is getting close: see, for instance, the work of Aggarwal and Maurer [1]. Nowadays RSA is widely used, so factoring large integers is not merely an academic exercise, but has important practical implications. The searches for large primes and for the prime factors of composite numbers have a long history. Euclid ( 300 B.C.) was one of the first persons to write about compositeness of numbers, followed± by Eratosthenes (276–194 B.C.), who came up with an algorithm that finds all primes up to a certain bound, the so-called Sieve of Eratosthenes. For an excellent overview of the history of factorization methods, we refer to the thesis of Elkenbracht-Huizing ([18], Ch. 2). Over the years, people came up with faster factorization methods, when the fac- tors to be found are large. Based on ideas of Kraitchik, and Morrison and Brillhart, Schroeppel introduced the linear sieve (1976/1977). With a small modification by Pomerance this became the quadratic sieve; albeit a very basic version. Improvements are due to Davis and Holdridge, and Montgomery (cf. [15], [39], [45]). Factoring al- gorithms based on sieving are much faster than earlier algorithms, as the expensive divisions are replaced by additions. The expected running time of the quadratic sieve, based on heuristic assumptions, is L(N) = exp((1 + o(1))(log N)1/2(log log N)1/2), as N , → ∞ where N is the number to be factored and the logarithms are natural [14]. An improvement of the quadratic sieve is the multiple polynomial quadratic sieve. The same idea of sieving is used in the number field sieve, based on ideas of Pollard (pp. 4–10 of [27]) and further developed by H.W. Lenstra, among others. 2 Introduction The heuristic expected running time of the number field sieve is given by (cf. [27]) L(N) = exp(((64/9)1/3 + o(1))(log N)1/3(log log N)2/3), as N . → ∞ Asymptotically, the number field sieve is the fastest known general method for factor- ing large integers, and in practice for numbers of about 90 and more decimal digits. We will go into the details of the multiple polynomial quadratic sieve and the number field sieve in the next two sections, as we use them for experiments in this thesis. Sections 1.4, 1.5, and 1.6 contain an overview of the thesis. 1.2 Multiple polynomial quadratic sieve The multiple polynomial quadratic sieve (MPQS) is based on the quadratic sieve, so we start with a short description of the basic quadratic sieve (QS). Take N as the (odd) composite number (not a perfect power) to be factored. Then QS searches for integers x and y that satisfy the equation x2 y2 mod N. ≡ If this holds, and x y mod N and x y mod N, then gcd(x y, N) is a proper factor of N. 6≡ 6≡ − − The algorithm starts with the polynomial f(t) = t2 N, t Z. For every prime factor p of f(t) the congruence t2 N mod p must hold.− For odd∈ primes p this can N ≡ be expressed as the condition ( p ) = 1 (Legendre symbol). A number is called F -smooth if all its prime factors are below some given bound F . These numbers are collected in the sieving step of the algorithm. The factorbase FB is defined as the set of 1 (for practical reasons), 2, and all the odd primes p −N up to a bound F for which ( p ) = 1. Now we evaluate f(t) for all integer values t [√N M, √N + M], where M is subexponential in N, and keep only those for which∈ f(−t) is F -smooth. We can write this as | | t2 pep(t) mod N, (1.1) ≡ p FB ∈Y where ep(t) 0 and we call expression (1.1) a relation. The left-hand≥ side is a square. Hence the product of such expressions is also a square. If we generate relations until we have more distinct relations than primes in the factorbase, there is a non-empty subset of this set of relations such that multipli- cation of the relations in this subset gives a square on the right-hand side. To find a correct combination of relations, we use linear algebra to find dependencies in a matrix with the exponents ep(t) mod 2 (one relation per row). Possible algorithms for finding such a dependency include Gaussian elimination, block Lanczos, and block Wiedemann; the running time of Gaussian elimination is O(n3) and the running time of block Lanczos and block Wiedemann is O(nW ), where n is the dimension of the matrix and W the weight of the matrix ([12], [13], [33], [49]). 1.2 Multiple polynomial quadratic sieve 3 Once we have a dependency of k relations for t = t1,t2,...,tk, we set x = t1t2 ...tk mod N and ··· ep(t1)+ +ep(tk) y = p 2 mod N. p FB ∈Y Then x2 y2 (mod N). Now we compute gcd(x y, N) and hopefully we have found a proper≡ factor. If not, we continue with the next− dependency. As the probability of finding a factor is at least 1/2 for each dependency (as N has at least two distinct prime factors), we are in practice almost certain to have found the prime factors after having computed a small number of gcd’s as above. To make clear where the term ‘sieving’ from the title comes from, we take a closer look at the polynomial f(t). If we know that 2 is a divisor of f(3), then 2 is a di- visor of f(3 + 2k), for all k Z; more generally, once we have located a t-value for which a given prime p divides∈ f(t), we know a residue class modulo p of t-values for which p divides f(t).
Recommended publications
  • Selecting Cryptographic Key Sizes
    J. Cryptology (2001) 14: 255–293 DOI: 10.1007/s00145-001-0009-4 © 2001 International Association for Cryptologic Research Selecting Cryptographic Key Sizes Arjen K. Lenstra Citibank, N.A., 1 North Gate Road, Mendham, NJ 07945-3104, U.S.A. [email protected] and Technische Universiteit Eindhoven Eric R. Verheul PricewaterhouseCoopers, GRMS Crypto Group, Goudsbloemstraat 14, 5644 KE Eindhoven, The Netherlands eric.verheul@[nl.pwcglobal.com, pobox.com] Communicated by Andrew Odlyzko Received September 1999 and revised February 2001 Online publication 14 August 2001 Abstract. In this article we offer guidelines for the determination of key sizes for symmetric cryptosystems, RSA, and discrete logarithm-based cryptosystems both over finite fields and over groups of elliptic curves over prime fields. Our recommendations are based on a set of explicitly formulated parameter settings, combined with existing data points about the cryptosystems. Key words. Symmetric key length, Public key length, RSA, ElGamal, Elliptic curve cryptography, Moore’s law. 1. Introduction 1.1. The Purpose of This Paper Cryptography is one of the most important tools that enable e-commerce because cryp- tography makes it possible to protect electronic information. The effectiveness of this protection depends on a variety of mostly unrelated issues such as cryptographic key size, protocol design, and password selection. Each of these issues is equally important: if a key is too small, or if a protocol is badly designed or incorrectly used, or if a pass- word is poorly selected or protected, then the protection fails and improper access can be gained. In this article we give some guidelines for the determination of cryptographic key sizes.
    [Show full text]
  • Congress on Privacy & Surveillance
    Ecole polytechnique fédérale de Lausanne School of Computer and Communication Sciences Congress on Privacy & Surveillance September 30th, 2013 • 8:45am - 6:30pm • EPFL Rolex Learning Center Forum A one-day event triggered by recent announcements about secret Internet mass surveillance A number of prominent international speakers will discuss your right to information self- determination, the politics of privacy, how to deal with the secret cosmopolitan state within a state, and how to go forward. It is a congress of individuals to represent what is not (yet?) represented by institutions. We are looking forward to welcoming you at this unique event! It is free and open to those who have registered (registration had to be closed on Thursday Sept 19). Guest Speakers Jacob Appelbaum Nikolaus Forgó Axel Arnbak Richard Hill Bill Binney Bruce Schneier Caspar Bowden Organized and chaired by Prof. Arjen K. Lenstra From ic.epfl.ch/privacy-surveillance 1 14 October 2013 Slides Axel_Arnbak - slides Bill_Binney - slides Caspar_Bowden - slides Nikolaus_Forgo - slides Richard_Hill_- slides Richard_Hill - summaries From ic.epfl.ch/privacy-surveillance 2 14 October 2013 Speaker Biographies Editor’s note: to provide background of the speakers, the following is excerpts from the links provided in the conference program. Jacob Appelbaum From Wikipedia Jacob Appelbaum is an independent computer security researcher and hacker. He was employed by the University of Washington,[1] and is a core member of the Tor project. Appelbaum is known for representing Wikileaks at the 2010 HOPE conference.[5] He has subsequently been repeatedly targeted by US law enforcement agencies, who obtained a court order for his Twitter account data, detained him 12[6] times at the US border after trips abroad, and seized a laptop and several mobile phones.
    [Show full text]
  • Four Integer Factorization Algorithms NA Carella, September, 2010 Abstract
    Four Integer Factorization Algorithms N. A. Carella, September, 2010 Abstract: The theoretical aspects of four integer factorization algorithms are discussed in detail in this note. The focus is on the performances of these algorithms on the subset of difficult to factor balanced integers N = pq , p < q < 2 p. The running time complexity of these algorithms ranges from deterministic exponential time complexity O(N1/2 ) to heuristic and unconditional logarithmic time complexity O(log( N)c), c > 0 constant. 1. INTRODUCTION Let p and q be a pair of primes. As far as time complexity is concerned, the subset of balanced integers N = pq , where p < q < ap , and a > 0 is a fixed parameter, is the most important subset of integers. The subset of balanced integers B(x) = { N = pq ≤ x : p < q < ap } of cardinality B(x) = O(x / log 2 x) has zero density in the set of all nonnegative integers, see Proposition 4. Accordingly, the factorization of a random integer is unlikely to be as difficult as a balanced integer of the same size. This article discusses the theoretical aspects of four integer factorization algorithms acting on the subset of balanced integers in details. These algorithms are described in Theorems 2, 3, 5, 13 and 14, respectively. The emphasis is on the performances of these algorithms on the subset of difficult to factor balanced integers. The running time complexity of these algorithms ranges from deterministic exponential time complexity O(N1/2 ) to heuristic and unconditional deterministic logarithmic time complexity O(log( N)c), c > 0 constant.
    [Show full text]
  • Integer Factoring
    Designs, Codes and Cryptography, 19, 101–128 (2000) c 2000 Kluwer Academic Publishers, Boston. Manufactured in The Netherlands. Integer Factoring ARJEN K. LENSTRA [email protected] Citibank, N.A., 1 North Gate Road, Mendham, NJ 07945-3104, USA Abstract. Using simple examples and informal discussions this article surveys the key ideas and major advances of the last quarter century in integer factorization. Keywords: Integer factorization, quadratic sieve, number field sieve, elliptic curve method, Morrison–Brillhart Approach 1. Introduction Factoring a positive integer n means finding positive integers u and v such that the product of u and v equals n, and such that both u and v are greater than 1. Such u and v are called factors (or divisors)ofn, and n = u v is called a factorization of n. Positive integers that can be factored are called composites. Positive integers greater than 1 that cannot be factored are called primes. For example, n = 15 can be factored as the product of the primes u = 3 and v = 5, and n = 105 can be factored as the product of the prime u = 7 and the composite v = 15. A factorization of a composite number is not necessarily unique: n = 105 can also be factored as the product of the prime u = 5 and the composite v = 21. But the prime factorization of a number—writing it as a product of prime numbers—is unique, up to the order of the factors: n = 3 5 7isthe prime factorization of n = 105, and n = 5 is the prime factorization of n = 5.
    [Show full text]
  • Factorization of a 512–Bit RSA Modulus?
    Factorization of a 512{Bit RSA Modulus? Stefania Cavallar3,BruceDodson8,ArjenK.Lenstra1,WalterLioen3, Peter L. Montgomery10, Brian Murphy2, Herman te Riele3, Karen Aardal13, 4 11 9 5 View metadata, citation and similar papersJeff at core.ac.uk Gilchrist ,G´erard Guillerm ,PaulLeyland ,Jo¨el Marchand , brought to you by CORE 6 12 14 Fran¸cois Morain , Alec Muffett , Chris and Craig Putnamprovided,and by Infoscience - École polytechnique fédérale de Lausanne Paul Zimmermann7 1 Citibank, 1 North Gate Road, Mendham, NJ 07945–3104, USA [email protected] 2 Computer Sciences Laboratory, ANU, Canberra ACT 0200, Australia [email protected] 3 CWI, P.O. Box 94079, 1090 GB Amsterdam, The Netherlands {cavallar,walter,herman}@cwi.nl 4 Entrust Technologies Ltd., 750 Heron Road, Suite E08, Ottawa, ON, K1V 1A7, Canada [email protected] 5 Laboratoire Gage, Ecole´ Polytechnique/CNRS, Palaiseau, France [email protected] 6 Laboratoire d’Informatique, Ecole´ Polytechnique, Palaiseau, France [email protected] 7 Inria Lorraine and Loria, Nancy, France [email protected] 8 Lehigh University, Bethlehem, PA, USA [email protected] 9 Microsoft Research Ltd, Cambridge, UK [email protected] 10 780 Las Colindas Road, San Rafael, CA 94903–2346 USA Microsoft Research and CWI [email protected] 11 SITX (Centre of IT resources), Ecole´ Polytechnique, Palaiseau, France [email protected] 12 Sun Microsystems, Riverside Way, Watchmoor Park, Camberley, UK [email protected] 13 Dept. of Computer Science,
    [Show full text]
  • Selecting Cryptographic Key Sizes
    Selecting Cryptographic Key Sizes Arjen K. Lenstra [email protected] Eric R. Verheul [email protected] November 24, 1999 Abstract. In this article we offer guidelines for the determination of key sizes for symmetric cryptosystems, RSA, and discrete logarithm based cryptosystems both over finite fields and over groups of elliptic curves over prime fields. Our recommendations are based on a set of explicitly formulated hypotheses, combined with existing data points about the cryptosystems. 1. Introduction 1.1. Introduction Cryptography is one of the most important tools that enable e-commerce because cryptography makes it possible to protect electronic information. The effectiveness of this protection depends on a variety of mostly unrelated issues such as cryptographic key size, protocol design, and password selection. Each of these issues is equally important: if a key is too small, or if a protocol is badly designed or incorrectly used, or if a password is poorly selected or protected, then the protection fails and improper access can be gained. In this article we give some guidelines for the determination of cryptographic key sizes. Other protocol- or password-related issues are not discussed. We do not aim to predict the future, but if current trends persist, then following our guidelines will result in acceptable security for commercial applications of cryptography. Key size recommendations are scattered throughout the cryptographic literature or may, for a particular cryptosystem, be found in vendor documentation. Unfortunately it is often hard to tell on what premises (other than marketability) the recommendations are based. As far as we know this article is the first uniform, clearly defined, and properly documented treatment of this subject for the most important generally accepted cryptosystems.
    [Show full text]
  • Selecting Cryptographic Key Sizes Extended Abstract
    Selecting Cryptographic Key Sizes Extended Abstract Arjen K. Lenstra1, Eric R. Verheul2 1 Citibank, N.A., 1 North Gate Road, Mendham, NJ 07945-3104, U.S.A, [email protected] 2 PricewaterhouseCoopers, GRMS Crypto Group, P.O. Box 85096, 3508 AB Utrecht, The Netherlands, Eric.Verheul@[nl.pwcglobal.com, pobox.com] Abstract. In this article we give guidelines for the determination of cryptographic key sizes. Our recommendations are based on a set of explicitly formulated hypotheses, combined with existing data points about the cryptosystems. This article is an abbreviated version of [15]. 1 Introduction 1.1. Introduction. In this article we offer guidelines for the determination of key sizes for symmetric cryptosystems, RSA, and discrete logarithm based cryptosystems both over finite fields and over groups of elliptic curves over prime fields. Key size recommendations are scattered throughout the cryptographic literature or may be found in vendor documentation. Unfortunately it is often hard to tell on what premises (other than marketability) the recommendations are based. As far as we know [15], of which this is an extended abstract, is the first uniform, clearly defined, and properly documented treatment of this subject for the most important generally accepted cryptosystems. We formulate a set of explicit hypotheses about future developments and apply these uniformly to existing data about the cryptosystems. The resulting key size recommendations are thus obtained in a uniform mechanical way independent of further assumptions or non-scientific considerations. Despite our attempt to be objective we do not expect that our model is to everyone’s taste. The underlying model can, however, easily be changed without affecting the overall approach, thereby making this article useful also for those who object to our results.
    [Show full text]
  • Factorization of a 512–Bit RSA Modulus *
    Factorization of a 512{bit RSA Modulus ? Stefania Cavallar3, Bruce Dodson8, Arjen K. Lenstra1, Walter Lioen3, Peter L. Montgomery10, Brian Murphy2, Herman te Riele3, Karen Aardal13, Je® Gilchrist4, G¶erard Guillerm11, Paul Leyland9, JoÄel Marchand5, Fran»cois Morain6, Alec Mu®ett12, Chris and Craig Putnam14, and Paul Zimmermann7 1 Citibank, 1 North Gate Road, Mendham, NJ 07945{3104, USA [email protected] 2 Computer Sciences Laboratory, ANU, Canberra ACT 0200, Australia [email protected] 3 CWI, P.O. Box 94079, 1090 GB Amsterdam, The Netherlands fcavallar,walter,[email protected] 4 Entrust Technologies Ltd., 750 Heron Road, Suite E08, Ottawa, ON, K1V 1A7, Canada [email protected] 5 Laboratoire Gage, Ecole¶ Polytechnique/CNRS, Palaiseau, France [email protected] 6 Laboratoire d'Informatique, Ecole¶ Polytechnique, Palaiseau, France [email protected] 7 Inria Lorraine and Loria, Nancy, France [email protected] 8 Lehigh University, Bethlehem, PA, USA [email protected] 9 Microsoft Research Ltd, Cambridge, UK [email protected] 10 780 Las Colindas Road, San Rafael, CA 94903{2346 USA Microsoft Research and CWI [email protected] 11 SITX (Centre of IT resources), Ecole¶ Polytechnique, Palaiseau, France [email protected] 12 Sun Microsystems, Riverside Way, Watchmoor Park, Camberley, UK [email protected] 13 Dept. of Computer Science, Utrecht University, P.O. Box 80089, 3508 TB Utrecht, The Netherlands [email protected] 14 59 Rangers Dr., Hudson, NH 03051, USA [email protected]
    [Show full text]
  • 09 Special-Purpose Hardware for Attacking Cryptographic Systems 9
    SHARCS '09 Special-purpose Hardware for Attacking Cryptographic Systems 9{10 September 2009 Lausanne, Switzerland Organized by within ECRYPT II European Network of Excellence in Cryptography Program committee: Daniel J. Bernstein, University of Illinois at Chicago, USA Roger Golliver, Intel Corporation, USA Tim G¨uneysu,Horst G¨ortzInstitute for IT Security, Ruhr-Universit¨at Bochum, Germany Marcelo E. Kaihara, Ecole´ Polytechnique F´ed´eralede Lausanne, Switzerland Tanja Lange, Technische Universiteit Eindhoven, The Netherlands Arjen Lenstra, Ecole´ Polytechnique F´ed´eralede Lausanne, Switzerland Christof Paar, Horst G¨ortzInstitute for IT Security, Ruhr-Universit¨at Bochum, Germany Jean-Jacques Quisquater, Universit´eCatholique de Louvain, Belgium Eran Tromer, Massachusetts Institute of Technology, USA Michael J. Wiener, Cryptographic Clarity, Canada Subreviewers: Frederik Armknecht Maxime Augier Joppe Bos Behnaz Bostanipour Jorge Guajardo Timo Kasper Thorsten Kleinjung Dag Arne Osvik Onur Ozen¨ Christine Priplata Juraj Sarinayˇ Colin Stahlke Robert Szerwinski Local organization: Martijn Stam, Ecole´ Polytechnique F´ed´eralede Lausanne, Switzerland Invited speakers: Peter Alfke, Xilinx, USA Shay Gueron, University of Haifa and Intel Corporation, Israel Contributors: Jean-Philippe Aumasson, FHNW, Switzerland Daniel V. Bailey, RSA, USA Brian Baldwin, University College Cork, Ireland Lejla Batina, Katholieke Universiteit Leuven, Belgium Daniel J. Bernstein, University of Illinois at Chicago, USA Peter Birkner, Technische Universiteit
    [Show full text]
  • Design and Analysis of Hash Functions
    Cryptographic Hash Functions Part II Cryptography 1 Andreas Hülsing, TU/e Most slides by Sebastiaan de Hoogh, TU/e hash function design - iterated compression 1 Merkle-Damgård construction • assume that message m can be split up into blocks m1, …, ms of equal block length r – most popular block length is r = 512 • compression function: CF : {0,1}n x {0,1}r {0,1}n • intermediate hash values (length n) as CF input and output • message blocks as second input of CF • start with fixed initial IHV0 (a.k.a. IV = initialization vector) • iterate CF : IHV1 = CF(IHV0,m1), IHV2 = CF(IHV1,m2), …, IHVs = CF(IHVs-1,ms), • take h(m) = IHVs as hash value • advantages: – this design makes streaming possible – hash function analysis becomes compression function analysis – analysis easier because domain of CF is finite 2 padding • padding: add dummy bits to satisfy block length requirement • non-ambiguous padding: add one 1-bit and as many 0-bits as necessary to fill the final block – when original message length is a multiple of the block length, apply padding anyway, adding an extra dummy block – any other non-ambiguous padding will work as well 3 Merkle-Damgård strengthening • let padding leave final 64 bits open • encode in those 64 bits the original message length – that’s why messages of length ≥ 264 are not supported • reasons: – needed in the proof of the Merkle-Damgård theorem – prevents some attacks such as • trivial collisions for random IV – now h(IHV0,m1||m2) = h(IHV1,m2) • see next slide for more 4 continued • fixpoint attack fixpoint: IHV, m such that CF(IHV,m) = IHV • long message attack 5 compression function collisions • collision for a compression function: m1, m2, IHV such that CF(IHV,m1) = CF(IHV,m2) • pseudo-collision for a compression function: m1, m2, IHV1, IHV2 such that CF(IHV1,m1) = CF(IHV2,m2) • Theorem (Merkle-Damgård): If the compression function CF is pseudo-collision resistant, then a hash function h derived by Merkle-Damgård iterated compression is collision resistant.
    [Show full text]
  • RSA, Integer Factorization, Record Computations
    RSA, integer factorization, record computations Aurore Guillevic Inria Nancy, France MIT, April 28, 2021 Course 6.857: Computer and Network Security http://courses.csail.mit.edu/6.857/2021/ These slides at https://members.loria.fr/AGuillevic/files/teaching/21-MIT-RSA240.pdf 1/52 Outline Introduction on RSA Integer Factorization Naive methods Quadratic sieve Sieving Number Field Sieve Record computations: RSA-240, RSA-250 Attacks on the RSA cryptosystem Two French episodes 2/52 Outline Introduction on RSA Integer Factorization Sieving Number Field Sieve Record computations: RSA-240, RSA-250 Attacks on the RSA cryptosystem 3/52 Introduction: public-key cryptography Introduced in 1976 (Diffie–Hellman, DH) and 1977 (Rivest–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/52 Public-key encryption: 1977, Rivest, Shamir, Adleman (RSA) Public parameters: • modulus N = p · q • encryption key e = 3 or 216 + 1 Private data: • p, q distinct large safe primes • private decryption key d = e−1 mod ϕ(N) = (p − 1)(q − 1) Ciphertext c = me mod N for a message m encoded as integer in [0, N − 1] Decryption: m = cd = med mod N It works because ed = 1 mod (p − 1)(q − 1) Hard tasks without knowing p, q if N is large enough: • computing ϕ(N) = (p − 1)(q − 1), √ • computing a square root x = x 1/2 mod N, • computing an e-th root x 1/e mod N.
    [Show full text]
  • On the Possibility of Constructing Meaningful Hash Collisions for Public Keys
    On the Possibility of Constructing Meaningful Hash Collisions for Public Keys Arjen Lenstra1,2 and Benne de Weger2 1 Lucent Technologies, Bell Laboratories, Room 2T-504 600 Mountain Avenue, P.O.Box 636, Murray Hill, NJ 07974-0636, USA 2 Technische Universiteit Eindhoven P.O.Box 513, 5600 MB Eindhoven, The Netherlands Abstract. It is sometimes argued that finding meaningful hash colli- sions might prove difficult. We show that for several common public key systems it is easy to construct pairs of meaningful and secure public key data that either collide or share other characteristics with the hash col- lisions as quickly constructed by Wang et al. We present some simple results, investigate what we can and cannot (yet) achieve, and formulate some open problems of independent interest. We are not yet aware of truly interesting practical implications. Nevertheless, our results may be relevant for the practical assessment of the recent hash collision results. For instance, we show how to construct two different X.509 certificates that contain identical signatures. 1 Introduction Based on the birthday paradox a random collision for any n-bit hash function can be constructed after an effort proportional to 2n/2 hash applications, no matter how good the hash function is. From the results presented at the Crypto 2004 rump session (cf. [14]), and since then described in more detail in [15], [16], [17], and [18], it follows that for many well known hash functions the effort required to find random collisions is considerably lower. Indeed, in some cases the ease with which collisions can be found is disconcerting.
    [Show full text]