Integer Factorization with the General Number Field Sieve

Integer Factorization with the General Number Field Sieve

Viet Pham Hoang INTEGER FACTORIZATION WITH THE GENERAL NUMBER FIELD SIEVE Rovaniemen ammattikorkeakoulun julkaisusarja B 12 Rovaniemi University of Applied Sciences School of Technology Degree Programme in Information Technology Thesis INTEGER FACTORIZATION WITH THE GENERAL NUMBER FIELD SIEVE Pham Hoang Viet 2008 Rovaniemi University of Applied Sciences Publications Jokiv¨ayl¨a11C 96300 Rovaniemi Finland tel. +358 20 798 4000 www.ramk.fi/julkaisutoiminta julkaisut@ramk.fi ISSN: 1239-7733 ISBN: 978-952-5153-77-4 (vol) ISBN: 978-952-5153-78-1 (PDF) Rovaniemi University of Applied Sciences Publication Serie B no. 12 c RAMK University of Applied Sciences Rovaniemi 2008 Tornion kirjapaino Abstract Since Fermat’s work on integer factorization, the mathematical commu- nity has experienced substantial research and improvements following his method of decomposing integers. This mathematical aspect has nowadays been utilized in a number of applications, such as in testing the security level of several encryption methods like the RSA algorithm. As the latest achieve- ment, the General Number Fields Sieve (GNFS) has recently been recognized as the fastest algorithm of this kind that is being used for factoring integers of size up to 800 bits in length. Considering the topic of this thesis, it concentrates on explaining the most significant details necessary for understanding and implementing the GNFS. In particular, it exploits the fact that this algorithm is a sieve-like process which factors general form integers using a variety of results from the number field theory. In this aspect, the thesis firstly addresses the underlying principle as well as many other important concepts used for constructing the GNFS. Then, as the implementation note moves on, several computing techniques will be plugged in that support the transition of this algorithm from theory into practice. In addition, the study also presents an extended setup for the Condor distributed computing system that can be used for parallel executions of this factorization technique. Ultimately, an extended example given in the last chapter generally illustrates how the algorithm works in practice by showing the data produced at every step, starting from the input modulus and ending with the output factors. Keywords: number field sieve, factorization, rsa, distributed computing Contents Foreword ................................. 9 1 Introduction to integer factorization .............. 11 1.1ThePublicKeyInfrastructure(PKI).............. 12 1.2RSAcryptographicalgorithm.................. 13 1.3SpecialpurposeattackstotheRSA............... 14 1.4Theideaofintegerfactorization................. 16 2 Sieving in the General Number Field Sieve .......... 21 2.1Constructingthecongruenceofsquares............. 22 2.2 A possibility for squares in Q(θ)................. 24 2.3Sievingforrationalsmoothvalues................ 26 2.4Sievingforalgebraicsmoothvalues............... 28 2.5Justifyingthealgebraicfactorbase............... 35 3 Computing perfect squares with matrix equations ..... 39 3.1 The shortcomings of Z[θ]..................... 40 3.2Theuseofquadraticcharacters................. 42 3.3Findingtheperfectsquare.................... 43 3.4TheGaussianeliminationmethod................ 46 3.5StandardLanczos’salgorithm.................. 48 3.6TheBlockLanczos’salgorithm.................. 53 3.7ConstraintsofBlockLanczos’salgorithm............ 58 4 Extracting square roots in Z ................... 63 4.1Amodificationtothealgebraiccontext............. 64 4.2Squarerootalgorithm...................... 67 4.3 Computing the integral basis of O ................ 68 4.4 Selecting good approximations for γ ............... 74 4.5LatticereductionwiththeLLLalgorithm........... 78 4.6 Finding square root of approximation α ............. 84 5 Completing the sieving part ................... 91 5.1Generalizationsofpolynomialselection............. 92 5.2Definingpolynomialyield.................... 93 5.3Selectingthebestpolynomial.................. 96 5.4Improvementtopolynomialselection..............100 5.5Constructingthefactorbase...................104 5.6Thelatticesievingtechnique...................107 6 The GRID environment ......................113 6.1AnoverviewofCondor’soperation...............114 6.2Aprojectsschedulingmechanism................117 6.3Optimizingdatatransmission..................120 7 An empirical conclusion ......................125 7.1Initializationofthealgorithm..................126 7.2Sievingandformingthematrixequation............128 7.3Findingpossiblesquareroots..................133 7.4Thedevelopmentofintegerfactorization............136 List of Tables 7.1 Polynomials resulted from base-m method...........126 7.2Finallistofoptimizedpolynomials...............127 7.3 Algebraic factor base A .....................127 7.4 Rational factor base F ......................128 7.5 List of log points for algebraic sieve with b =2.........129 7.6 Found pairs smooth over A and F ................130 7.7Algebraicprimesinthequadraticcharacterbase........131 7.8Listofexceptionalprimeideals.................131 7.9Primestobeomittedfromthematrixequation........132 7.10 Sample vector representative of pairs (a, b)...........132 7.11 28th dependency D in the nullspace of B ............133 7.12 Table of approximations δl needed................134 7.13 Inert primes with residues of α .................134 List of Figures 1.1AvisualdemonstrationofgeneralPKI............. 12 6.1AsampleofCondornetworkoperation.............114 6.2AnetworkdiagramfortheWebenvironment .........119 6.3Asamplesetofjobfiles.....................121 6.4Asamplesetofprojectfiles...................122 6.5Modifiedprojectlifecycle....................123 Foreword Originally this study is a thesis work at the Rovaniemi University of Applied Sciences (RAMK). The publication has many exceptional features. The author, Viet Pham Hoang, came from a special school for mathematically oriented students in Vietnam to Rovaniemi somewhat by accident, having seen the announcement of our Degree Programme in Information Technology in 2004. In the thesis, Viet shows his mathematical talent in an outstanding way. He masters abstract algebra and number theory far beyond the level we re- quire in our courses. He has reconstructed many of the propositions and their proofs by himself. This did not come as a surprise, because that is what Viet has been doing all the time during his studies. The thesis is not only theoretical. The problem of integer factorization is central for the safety of the public key cryptography we use every day. The fastest method in effective use today for factorization of large integers (e.g. RSA modulus) is the General Number Field Sieve (GNFS). In Viet’s thesis, the history and mathematical foundation of this method are explained. Furthermore, Viet has written a large amount of code for demonstrat- ing the GNFS method and for distributing the computations to a computer network (GRID). Viet not only constructed this distributed computing en- vironment but was also responsible for the production runs that led to the discovery of a remarkable structure of words in the field of theoretical com- puter science. For us it has been a great pleasure to follow the development of this outstanding thesis. Jouko T eeriaho Senior Lecturer, Thesis Supervisor V eikko Keranen¨ Principal Lecturer of Mathematics Chapter 1 Introduction to integer factorization With the exception of Shor’s algorithm [29, p. 14], the General Number Field Sieve (GNFS) is known as the fastest method for factoring large inte- gers, as long as quantum computers are yet to be rigorously invented. Like other modern sieving techniques such as the Quadratic Sieve and Dixon’s algorithm, the GNFS exploits the same idea of quadratic residues to form two independent squares, for which the Euclidean algorithm is then applied to construct the prime factors [4, p. 10]. In addition, due to the large amount of computation required, the GNFS was designed to support parallel computing, which further speeds up the actual computation by the number of processors involved. As a result, vari- ous achievements have been recorded in efforts of integer factorization, such as the 193-digit challenge number RSA-640 in 2005 [34]. This sequence of breakthroughs has urgently raised a question about the security level of the RSA algorithm, a public key encryption method being used in almost every major information system nowadays. Before diving deeper into the complexity of the GNFS, it is important to understand how integer factorization could be used in the cryptanalysis of the RSA encryption method. Thus, this chapter begins by giving a brief introduction to the operation of the RSA algorithm, after which it points out the principle which strongly depends on the difficulty of factoring an integer. In the end of the chapter, the Quadratic Sieve algorithm is presented as a proof that the RSA algorithm is being seriously considered for its security issues. 11 12 Chapter 1. Introduction to integer factorization 1.1 The Public Key Infrastructure (PKI) The main cryptographic concern of the GNFS is in asymmetric encryption, a methodology of securing transmission of data over the public. The cryp- tographic idea was first initiated in 1976 which introduced the concept of public-private key pairs [28, Chapter 2, p. 31]. In the latter stage of devel- opment, with the burst of the World Wide Web internationally, the PKI was designed as a solution for the security of Internet communications, especially in the aspect of object authentication,

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    144 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us