Journal

Tracking our progress toward a production-quality GNFS implementation.

Recent Updates

2026-01-30✓ Complete

Phase 1.1: Polynomial Selection Improvements

Completed production-quality polynomial selection with major improvements over the naive approach. **What was implemented:** - **Murphy E scoring** — Alpha value computation, coefficient size scoring, root counting, smoothness analysis - **Base-m expansion** — Express n in base m for mathematically correct GNFS polynomials where f(m) = n - **Coefficient optimization** — Search around optimal m, leading coefficient adjustment, local optimization passes **Results:** - 6-12x better Murphy E scores for larger numbers - Alpha values closer to 0 or negative (better small-prime divisibility) - 32 new tests validating correctness **Files changed:** gnfs/polynomial/selection.py, new test suite in tests/test_polynomial_selection.py
2026-01-30✓ Complete

Website Launch & Interactive Playground

Launched the educational website at gnfs-edu.web.app with: - **Interactive playground** — Run GNFS in your browser via Pyodide - **Detailed output** — Shows all four stages with actual calculations - **Step-by-step learning** — Documentation for each phase of the algorithm The playground successfully factors small semiprimes like 91 = 7 × 13 and 143 = 11 × 13, showing the polynomial selection, smooth relations found, and factor extraction.
2026-01-30✓ Complete

Production Roadmap Published

Published ROADMAP.md outlining the path from educational implementation to production-quality GNFS. **Milestones:** - v0.2: 40-digit numbers (improved polynomial selection) - v0.3: 60-digit numbers (lattice sieving) - v0.4: 80-digit numbers (Block Lanczos) - v0.5: 100-digit numbers (multi-threading) - v1.0: 120+ digit numbers (production ready) **Key technical decisions:** - Pure Python with optional gmpy2 for performance - Target ~10x slower than CADO-NFS (acceptable for Python)

Coming Up

1.2

Lattice Sieving

Replace line sieve with lattice sieve and special-q. Exponentially faster for large numbers.

1.3

Block Lanczos

Replace O(n³) Gaussian elimination with O(n²) Block Lanczos for sparse matrices.

1.4

Square Root Improvements

Montgomery's algorithm for efficient algebraic square roots.

2.1

Large Number Arithmetic

Integrate gmpy2 for GMP bindings with pure Python fallback.

2.2

Parallelization

Multi-threaded sieving and distributed linear algebra.

Full roadmap available on GitHub