Factoring of Large Numbers using Number Field Sieve Matrix Step Chandana Anand, Arman Gungor, and Kimberly A. Thomas ECE 646 Fall 2006.

Slides:



Advertisements
Similar presentations
Enhanced matrix multiplication algorithm for FPGA Tamás Herendi, S. Roland Major UDT2012.
Advertisements

Origins  clear a replacement for DES was needed Key size is too small Key size is too small The variants are just patches The variants are just patches.
Lecture 19: Parallel Algorithms
Block LU Factorization Lecture 24 MA471 Fall 2003.
Seeking prime numbers quickly through parallel-computing Daniel J. Wright.
Integer Factorization By: Josh Tuggle & Kyle Johnson.
Lecture 6  Calculating P n – how do we raise a matrix to the n th power?  Ergodicity in Markov Chains.  When does a chain have equilibrium probabilities?
Cryptography and Network Security Chapter 5 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Notation Intro. Number Theory Online Cryptography Course Dan Boneh
Face detection Many slides adapted from P. Viola.
RSA & F ACTORING I NTEGERS BY: MIKE NEUMILLER & BRIAN YARBROUGH.
A Creative Way of Breaking RSA Azeem Jiva. Overview ● What is RSA? – Public Key Algorithm – Is it secure? ● Ways to break RSA – Discover the Public Key.
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.
Introduction to Modern Cryptography Homework assignments.
Matrices. Outline What is a matrix? Size of matrices Addition of matrices Scalar multiplication Matrices multiplication.
1 Factoring Large Numbers with the TWIRL Device Adi Shamir, Eran Tromer.
1 Hardware-Based Implementations of Factoring Algorithms Factoring Large Numbers with the TWIRL Device Adi Shamir, Eran Tromer Analysis of Bernstein’s.
Monica Garika Chandana Guduru. METHODS TO SOLVE LINEAR SYSTEMS Direct methods Gaussian elimination method LU method for factorization Simplex method of.
Lecture 23 Symmetric Encryption
Linear Algebra – Linear Equations
1 Hardware-Based Implementations of Factoring Algorithms Factoring Estimates for a 1024-Bit RSA Modulus A. Lenstra, E. Tromer, A. Shamir, W. Kortsmit,
Foundations of Network and Computer Security J J ohn Black Lecture #14 Oct 1 st 2007 CSCI 6268/TLEN 5831, Fall 2007.
Mathematics of Cryptography Part I: Modular Arithmetic, Congruence,
May 29, 2008 GNFS polynomials Peter L. Montgomery Microsoft Research, USA 1 Abstract The Number Field Sieve is asymptotically the fastest known algorithm.
Chapter 2 The Fundamentals: Algorithms, the Integers, and Matrices
Exercise problems for students taking the Programming Parallel Computers course. Janusz Kowalik Piotr Arlukowicz Tadeusz Puzniakowski Informatics Institute.
MA/CSSE 473 Day 03 Asymptotics A Closer Look at Arithmetic With another student, try to write a precise, formal definition of “t(n) is in O(g(n))”
MATH 224 – Discrete Mathematics
Matrices King Saud University. If m and n are positive integers, then an m  n matrix is a rectangular array in which each entry a ij of the matrix is.
October,2006 Higher- Degree Polynomials Peter L. Montgomery Microsoft Research and CWI 1 Abstract The Number Field Sieve is asymptotically the fastest.
Parallel Algorithms Sorting and more. Keep hardware in mind When considering ‘parallel’ algorithms, – We have to have an understanding of the hardware.
Copyright, Yogesh Malhotra, PhD, 2013www.yogeshmalhotra.com SPECIAL PURPOSE FACTORING ALGORITHMS Special Purpose Factoring Algorithms For special class.
9/17/15UB Fall 2015 CSE565: S. Upadhyaya Lec 6.1 CSE565: Computer Security Lecture 6 Advanced Encryption Standard Shambhu Upadhyaya Computer Science &
Prabhas Chongstitvatana1 Factorizing large integers Finding the unique decomposition of n into a product of prime factors. Factorize(n) if n is prime done.
CS 627 Project RSA Encryption/Decryption supporting Big Integer Arithmetic …Sagar Chivate.
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.
Strength of Cryptographic Systems Dr. C F Chong, Dr. K P Chow Department of Computer Science and Information Systems The University of Hong Kong.
Public key ciphers 2 Session 6.
Background Gaussian Elimination Fault Tolerance Single or multiple core failures: Single or multiple core additions: Simultaneous core failures and additions:
Parallel Algorithms Patrick Cozzi University of Pennsylvania CIS Spring 2012.
Parallel Algorithms Patrick Cozzi University of Pennsylvania CIS Fall 2013.
Set Containment Joins: The Good, The Bad and The Ugly Karthikeyan Ramasamy Jointly With Jignesh Patel, Jeffrey F. Naughton and Raghav Kaushik.
1 Project Management Example Solving Sudoku 2 What is Sudoku?  Sudoku is a game with 9 columns and 9 rows and 9 “boxes” composed of a 3 x 3 Grid  Numbers.
Scott CH Huang COM 5336 Cryptography Lecture 6 Public Key Cryptography & RSA Scott CH Huang COM 5336 Cryptography Lecture 6.
Lecture 23 Symmetric Encryption
Lecture 09 03/01/2012 Shai Avidan הבהרה: החומר המחייב הוא החומר הנלמד בכיתה ולא זה המופיע / לא מופיע במצגת.
Matrices and Systems of Equations
DATA & COMPUTER SECURITY (CSNB414) MODULE 3 MODERN SYMMETRIC ENCRYPTION.
7. Key Length Public key length Kim Hyoung-Shick.
A Survey on Factoring Large Numbers ~ 巨大数の因数分解に関する調査 ~ Kanada Lab. M Yoshida Hitoshi.
Computer Science CSC 474Dr. Peng Ning1 CSC 474 Information Systems Security Topic 2.3 Hash Functions.
A Parallel Hierarchical Solver for the Poisson Equation Seung Lee Deparment of Mechanical Engineering
Filters– Chapter 6. Filter Difference between a Filter and a Point Operation is that a Filter utilizes a neighborhood of pixels from the input image to.
Progress Report—11/13 宗慶. Problem Statement Find kernels of large and sparse linear systems over GF(2)
Public Key Encryption Major topics The RSA scheme was devised in 1978
Progress Report— 11/06 宗慶.
Chapter 8: Lesson 8.1 Matrices & Systems of Equations
COMP4211 : Advance Computer Architecture
RSA Cryptosystem Bits PCs Memory MB ,000 4GB 1,020
Design and Analysis of Prime Number Sieves
Parallel Quadratic Sieve
Factoring RSA Moduli: Current State of the Art J
Introduction to Modern Cryptography
Memory System Performance Chapter 3
Mathematical Background for Cryptography
Cryptography and Network Security Chapter 5 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Scalable light field coding using weighted binary images
CHAPTER 69 NUMBER SYSTEMS AND CODES
Presentation transcript:

Factoring of Large Numbers using Number Field Sieve Matrix Step Chandana Anand, Arman Gungor, and Kimberly A. Thomas ECE 646 Fall 2006

ECE 646, Fall 2006F-2: Factoring of Large Numbers Using Number Field Sieve INTRODUCTION The ability to conduct secure electronic transactions is becoming more and more important everyday It is computationally difficult to factor a large number into its prime factors What happens if an algorithm that can achieve this in a reasonable amount of time is discovered?

ECE 646, Fall 2006F-2: Factoring of Large Numbers Using Number Field Sieve INTRODUCTION Number Field Sieve (NFS) is the fastest known algorithm to factor numbers larger than 110 digits Its development in the past few years has facilitated factoring of integers that were once considered to be infeasible to factor with today ’ s technology

ECE 646, Fall 2006F-2: Factoring of Large Numbers Using Number Field Sieve INTRODUCTION GNFS was used in factoring a 512-bit number in 1999 as part of the RSA Challenge It was estimated that had the RSA-129 challenge used the GNFS instead of the Multiple Polynomial Quadratic Sieve, it would have taken a quarter of the time

ECE 646, Fall 2006F-2: Factoring of Large Numbers Using Number Field Sieve INTRODUCTION RSA-155 Details (512-bits) Calendar time for the polynomial selection 9 weeks Sieving: 35.7 CPU-years in total, 3.7 months Matrix and Square Root Steps: 1.5 months Total Calendar Time: 7.4 months

ECE 646, Fall 2006F-2: Factoring of Large Numbers Using Number Field Sieve INTRODUCTION MHz SGI and Sun workstations 8250 MHz SGI Origin 2000 processors MHz Pentium II PCs 4500 MHz Digital/Compaq boxes This CPU-effort is estimated to be equivalent to approximately 8000 MIPS years

ECE 646, Fall 2006F-2: Factoring of Large Numbers Using Number Field Sieve GENERAL INFORMATION Number field sieve is a fast factorization method developed by Pollard et al. Number Field Sieve factors an integer n in expected time: exp((c +o (1))(logn ) 1/3 (loglogn ) 2/3 ) with c = 2(2/3) 2/3 ~ Number Field Sieve can be thought of as an extension of the rational sieve where smooth numbers of order n are sought for, rarity of which makes the algorithm impractical

ECE 646, Fall 2006F-2: Factoring of Large Numbers Using Number Field Sieve GENERAL INFORMATION Polynomial selection: Find two Z-irreducible polynomials f(x) and g(x) so that f(m)=0 (mod n) and g(x)=0 (mod n) for some known m Sieving: Here we find pairs of small integers, (a,b) Matrix step: Here we take the (a,b) pairs found in the last step and construct a large matrix Square root: Given the two squares from the previous steps and their prime factorizations, we must compute their square roots to finally factor n

ECE 646, Fall 2006F-2: Factoring of Large Numbers Using Number Field Sieve GNFS Matrix Solving Involves finding the dependencies in a very large, very sparse matrix –EXAMPLE: For the RSA-130 challenge, factoring a 130 digit number, the matrix had 3,516,502 rows and 3,504,823 columns with on average 39.4 non-zero entries per row. Storing the position of all 138,690,744 ones would take “ only ” 600 MB of memory vs over 1500 GB to store the entire matrix. Traditional matrix solving methods (e.g. Gaussian) are infeasible

ECE 646, Fall 2006F-2: Factoring of Large Numbers Using Number Field Sieve Wiedemann Algorithm Intended to make GNFS Matrix step more computationally feasible – allows solving the matrix dependencies without modifying the matrix, leaving the matrix sparse and easier to store and operate on Block Wiedemann –multiplies the sparse matrix by 32 or 64 vectors at once –takes advantage of the 32-bit or 64-bit architecture of modern computers

ECE 646, Fall 2006F-2: Factoring of Large Numbers Using Number Field Sieve WLSS2 Block Wiedemann implementation created in the mid-90s Composed of four steps, two of which may be run in a distributed manner Input: matrix file in an adjacency list format – –1f 2b 53 af c8 d4 f e 13f 15a f 1b9 1ee207 25e 271 2b3 2e1 2f6 2fd 2ff 30c a3 3b3 3bc 3d3 3d7 Output: list of candidate factors

ECE 646, Fall 2006F-2: Factoring of Large Numbers Using Number Field Sieve WLSS2 Program runs on enigma.gmu.edu without problem – did not try running distributed Found several inconsistencies between the program and its documentation Program has now “ disappeared ” from original Internet source

ECE 646, Fall 2006F-2: Factoring of Large Numbers Using Number Field Sieve LiDIA LiDIA is a C++ library for computational number theory Allows operations on vectors and matrices such as: –u = A*v; –v.shift_left(n,1); Also allows operations on vectors of vectors –required for implementation of Block Wiedemann

ECE 646, Fall 2006F-2: Factoring of Large Numbers Using Number Field Sieve LiDIA Implementations Wiedemann Implementation –working on enigma.gmu.edu –needs further debugging –reprogramming of matrix creation –addition of matrix importation functionality Block Wiedemann Implemenation –in progress but needs further work on initialization of the vectors of vectors

ECE 646, Fall 2006F-2: Factoring of Large Numbers Using Number Field Sieve Next Steps Matrix Creation and Input –need to create a program to intelligently create matrices for testing –need a standard matrix format to allow comparisons between WLSS2 and the LiDIA implementations One solution – add a function to LiDIA implementation to read WLSS2 style adjacency list Complete debugging of LiDIA Wiedemann implementation Complete implementation of LiDIA Block Wiedemann algorithm

ECE 646, Fall 2006F-2: Factoring of Large Numbers Using Number Field Sieve Next Steps Continued Testing of WLSS2, Wiedemann implementation, Block Wiedemann implementation –Functionality testing – do all implementations agree on the results of a given input matrix –Timing comparison

ECE 646, Fall 2006F-2: Factoring of Large Numbers Using Number Field Sieve Block Wiedemann Algorithm Input to Block Wiedemann: Matrix A of size DxD, D є [10 7, ] Sparse matrix: Column density << D Most time consuming operations: Matrix-by- vector multiplications A.v i, A 2.v i,....., A k.v i

ECE 646, Fall 2006F-2: Factoring of Large Numbers Using Number Field Sieve Matrix-by-Vector Multiplication Non-zero entries in the columns of A - packets that need to be routed to their destinations m x m mesh, m = √D: row indices of resultant matrix multiplication vector Mesh Cell i value at index i of the vector v packets in column i of the matrix A

ECE 646, Fall 2006F-2: Factoring of Large Numbers Using Number Field Sieve Mesh Routing Architecture Lenstra et al proposed two versions of the routing based circuit simple routing version improved routing version The improved version was implemented by Dr. Gaj et al in reconfigurable hardware We implemented the emulation of this hardware in Java

ECE 646, Fall 2006F-2: Factoring of Large Numbers Using Number Field Sieve Routing in the Mesh Phase 1 – Odd row negotiates with the top even row Phase 2 – Odd column negotiates with right even row Phase 3 – Odd row negotiates with the bottom even row. Phase 4 – Odd column negotiates with left even column.

ECE 646, Fall 2006F-2: Factoring of Large Numbers Using Number Field Sieve Compare-Exchange Both cells determine they will be closer to their destination after a swap The cell that is the farthest from its destination determines it will be closer to its destination after a swap The cell that is farthest will not be closer after the swap, but the cell with the smaller distance will be closer Neither will become closer to its destination

ECE 646, Fall 2006F-2: Factoring of Large Numbers Using Number Field Sieve Implementation Routines Randomly populate the mesh Determine the destination row and column indices of a packet Perform the negotiations (4 times the size of the mesh) Determine exchange cases Update the partial results

ECE 646, Fall 2006F-2: Factoring of Large Numbers Using Number Field Sieve Results The mesh routing architecture was implemented for a mesh size of 4x4. Compare-exchange operations were repeated 4*4 =16 times On an average, routing was completed after all 4 phases of Round 1 and 2 phases of the Round 2 The architecture was then scaled for a mesh size of 12x12 Compare-exchange operations were repeated 4*12 = 48 times Routing was completed at the end of all rounds

ECE 646, Fall 2006F-2: Factoring of Large Numbers Using Number Field Sieve Results (contd..) The code was then modified to perform multiple vector multiplications in the 12x12 mesh Java threads were used to emulate the multiple matrix-by-vector multiplications taking place simultaneously in hardware A new thread was spawned to process the matrix-by- vector multiplication for each vector Each thread updates its own resultant vector

ECE 646, Fall 2006F-2: Factoring of Large Numbers Using Number Field Sieve Future Work Development of a routine to examine the state of the mesh after each phase To find number of phases that are actually required to complete routing in the 12x12 mesh