Git Product home page Git Product logo

gnfs's Introduction

Rust GNFS Implementation

Welcome to the Rust implementation of the General Number Field Sieve (GNFS), the most advanced classical algorithm used for factoring large integers. This project aims to provide a robust and efficient implementation of GNFS, leveraging the power and safety of Rust.

Project Inspiration

This project is inspired by AdamWhiteHat's GNFS implementation and a deep interest in cryptography. It is intended for educational and research purposes, focusing on continuous improvement and validation of the implementation.

Getting Started

Prerequisites

Ensure you have the following installed:

You can install Rust and Cargo using rustup, which is the recommended toolchain manager for Rust projects.

Building the Project

Clone the repository:

git clone https://github.com/danielrcurtis/gnfs
cd rust-gnfs
cargo build --release
cargo test

Contributing

We welcome contributions from the community, whether they are bug fixes, improvements, or new features. Here's how you can contribute:

Issues

Check out the Issues tab on GitHub to see a list of known issues and feature requests.

Feel free to submit new issues for bugs, enhancements, or feature requests.

Use issues to discuss potential changes before starting work on a pull request.

Pull Requests

Fork the repository.

Create a new branch for each feature or fix.

Develop your feature or fix, adhering to the existing code style.

Write or adapt tests as necessary.

Ensure your code passes all tests.

Submit a pull request targeting the main branch of the original repository.

Guidelines

Keep your code clean and well-commented.

Make sure to document new code accordingly.

Follow Rust's idiomatic practices.

Roadmap

The project roadmap is tracked through GitHub issues. We use issues to outline future plans and track ongoing progress.

License

This project is licensed under MIT License. See the LICENSE file in the repository for full license text.

gnfs's People

Contributors

danielrcurtis avatar

Stargazers

Salvador Guzman avatar

Watchers

 avatar

Forkers

williamli0623

gnfs's Issues

Finish UI

Batch Mode

  • Read input parameters from .toml file
  • Runs all steps
  • Saves on ctrl+c or other process termination inputs
  • Prints Job details to info log
  • Saves Job results to solution_{}.json
  • Show job progress at each step interval

Interactive Mode

  • Menu Based
  • Input Parameters/Configuration/Load
  • Run Job Steps - Menu Selections Under sub-menu (Create Polynomial, Facor Bases, and Roots | Sieve Relations | Matrix Solve | Square Root Solve)
  • Stop Job (Cancellation token triggers saved state)

Web Interface? ;)

  • All of the above.

Validate Polynomial Implementation

[New factorization job creation initialization for N = 45113...]
 Polynomial constructed: X^3 + 15*X^2 + 29*X + 8
 Polynomial base: 31
 Rational  Factor Base Bounds: Min: - Max: 50
 Algebraic Factor Base Bounds: Min: - Max: 150
 Quadratic Factor Base Bounds: Min: 170 Max: 1113
 Saved prime factor base bounds.
 Constructing new prime bases (- of 3)...
 Completed rational prime base (1 of 3).
 Completed algebraic prime base (2 of 3).
 Completed quadratic prime base (3 of 3).
 Constructing new factor bases (- of 3)...
 Completed rational factor base (1 of 3).
 Completed algebraic factor base (2 of 3).
 Completed quadratic factor base (3 of 3).
 Factor bases populated.
 Relations container initialized. Target quantity: 65
 

Current:

[2024-04-21T05:53:51Z INFO gnfs::core::gnfs] Polynomial constructed: 45113X^0
[2024-04-21T05:53:51Z INFO gnfs::core::gnfs] Polynomial base: 31
 

Implement Rayon for Search

Increase the search space per step by making it configurable by num_cpu parameter which should be added with this feature. We need to test and find the balance between CPU cache and parallel processing enhancement.

  • Add rayon
  • Find optimization opportunities
  • Test
  • Optimize

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.