Skip to content

devatnull/GNFS-Integer-Factorization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

General Number Field Sieve (GNFS) Algorithm

Introduction

The General Number Field Sieve (GNFS) is a powerful algorithm for factoring large integers into their prime factors. It is based on a combination of number theory, polynomial algebra, and linear algebra and is one of the most efficient algorithms for factoring large numbers. This algorithm was first introduced in 1993 by J. Franke and E. Thomé and has since been improved and optimized.

Optimizations

The following optimizations have been applied to the GNFS algorithm:

  • Parallelization of the sieve step to speed up the search for a smooth relation.
  • Use of an optimized sieve algorithm to improve the efficiency of the sieve step.
  • Better selection of parameters to improve the efficiency of the algorithm.
  • Use of fast linear algebra algorithms to improve the efficiency of the combination of relations step.

Possible Optimizations

  1. Improved Sieve Algorithm: The current sieve algorithm is based on the standard sieve of Eratosthenes. However, there are several optimized sieve algorithms that could be used instead, such as the Sundaram sieve, the Legendre sieve, or the number field sieve. These algorithms can often be faster than the standard sieve and could be used to improve the efficiency of the factorization.
  2. Improved Elliptic Curve Method: The current implementation of the elliptic curve method uses a random starting point, which may not always result in the fastest factorization. Other methods, such as the Pollard-rho algorithm or the Brent-Montgomery algorithm, could be used instead to improve the efficiency of the factorization.
  3. Optimized Linear Algebra: The current implementation of the linear algebra step uses LU factorization, which is a standard method for solving linear systems. However, there are several other algorithms, such as the QR factorization or the Cholesky factorization, that could be used instead to improve the efficiency of the factorization.
  4. Parallelization: The current implementation of the algorithm uses parallelization to speed up the search for smooth relations. However, there are several other methods, such as GPU acceleration or distributed computing, that could be used to further improve the efficiency of the factorization.
  5. Improved Polynomial Selection: The current implementation of the auxiliary polynomial is x^2 - n, which is a simple polynomial that is easy to work with. However, there are other polynomials, such as x^2 + 1 or x^2 + x + 1, that could be used instead to improve the efficiency of the factorization.

Conclusion

The GNFS algorithm is a powerful tool for factoring large integers into their prime factors. This implementation uses the elliptic curve method for factoring, a parallelized version of the sieve algorithm, and fast linear algebra algorithms to improve efficiency. It can be used in real-world scenarios for cryptography and number theory research.

About

GNFS RSA Encryption Breaking

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages