Quadratic Sieve Tools

Here are some tools for performing the quadratic sieve.

Set an integer $n$ to factor and find $k$ near the square root of n

 

Find a factor base (primes < B)

This will find only prime $p < B$ where $n$ is a square modulo $p$.

 

Manually factor $m$ values of $k^2-n$ starting at the k indicated above; show only those factoring in factor base

 

Sieve $m$ values of $k^2-n$ starting at the k indicated above

 

Don’t forget to double-check your answer!