How mayiding/gnfs works
GNFS is a C++20 integer-factorization product with a CLI and a macOS Workbench. The main workflow accepts an integer, selects a factoring method, and returns factors; the GNFS route spans polynomial selection through square-root extraction. The README documents the adaptive trial-division, Pollard-rho, SIQS, and GNFS routes. The graph focuses on runtime architecture; unsampled implementation details are represented only where the README or sampled interfaces support them.
Main entry points: pipeline.cpp GNFS Pipeline · factorizer.cpp Factorizer API · main.cpp CLI · GNFSWorkbench macOS Workbench
Components 18
User Interfaces
- CLI
src/cli/main.cpp - macOS Workbench
apps/macos/GNFSWorkbench/GNFSWorkbench
Method Dispatch
- Factorizer API
src/api/factorizer.cpp - GNFS Pipeline
src/api/pipeline.cpp - Trial Division
include/gnfs/cofactor/trial_division.hpp - Pollard Rho
include/gnfs/cofactor/brent_pollard_rho.hpp - SIQS
include/gnfs/siqs/siqs.hpp
GNFS Collection
- Polynomial Selection
include/gnfs/polynomial/selector_dispatch.hpp - Factor Base
src/factor_base/builder.cpp - Lattice Sieve
src/sieve/lattice_sieve.cpp - Cofactorization
include/gnfs/cofactor/cofactorizer.hpp - Relation Collection
include/gnfs/relation/collector.hpp
Relation Solving
- Relation Reduction
include/gnfs/relation/reduction_engine.hpp - Matrix Construction
src/linalg/matrix_builder.cpp - Linear Algebra
include/gnfs/linalg/block_lanczos.hpp - Square Roots
src/sqrt/algebraic_sqrt.cpp
Factorization Support
- Factor Result
include/gnfs/api/result.hpp
Other components
- User
Connections 18
- User → CLI: provides integer
- CLI → GNFS Pipeline: runs pipeline
- GNFS Pipeline → Factorizer API: dispatches method
- Factorizer API → Trial Division: uses when selected
- Factorizer API → Pollard Rho: uses when selected
- Factorizer API → SIQS: uses when selected
- Factorizer API → GNFS Pipeline: uses for GNFS
- GNFS Pipeline → Polynomial Selection: selects polynomial
- GNFS Pipeline → Factor Base: builds factor base
- GNFS Pipeline → Lattice Sieve: collects relations
- GNFS Pipeline → Cofactorization: factors cofactors
- GNFS Pipeline → Relation Collection: gathers relations
- GNFS Pipeline → Relation Reduction: reduces relations
- GNFS Pipeline → Matrix Construction: builds matrix
- GNFS Pipeline → Linear Algebra: solves dependencies
- GNFS Pipeline → Square Roots: extracts roots
- GNFS Pipeline → Factor Result: returns factors
- User → macOS Workbench: starts run