Interface AParamGenerator
- All Known Implementing Classes:
AParamGenerator01,AParamGenerator02
public interface AParamGenerator
Interface for generators that produce the leading coefficient
a of the quadratic polynomial
Q(x) = (d*a*x+b)^2 - kN used by SIQS. d is typically 1 or 2.
The a-parameter in SIQS is chosen as a product of primes from the prime base: a = q1 * ... * q_s.
Its value should be roughly a ~ sqrt(2*k*N)/(d*M), where M is the sieve array size, such that |Q(x)|
is about the same at x=+M and x=-M, and |Q(x)| <= kN for all x.
The quality of the a-generator is crucial for both stability and performance of SIQS.-
Method Summary
Modifier and Type Method Description voidcleanUp()Release memory after a factorization.java.math.BigIntegercomputeNextAParameter()doublegetBestQ()java.lang.StringgetName()int[]getQArray()intgetQCount()int[]getQTArray()voidinitialize(int k, java.math.BigInteger N, java.math.BigInteger kN, int d, int primeBaseSize, int[] primesArray, int[] tArray, int sieveArraySize)Initialize this a-parameter generator for a new N.
-
Method Details
-
getName
java.lang.String getName() -
initialize
void initialize(int k, java.math.BigInteger N, java.math.BigInteger kN, int d, int primeBaseSize, int[] primesArray, int[] tArray, int sieveArraySize)Initialize this a-parameter generator for a new N. One result has to be aqCountvalue fixed throughout the rest of the factorization of N.- Parameters:
k-N-kN-d- the d-value in Q(x) = (d*a*x + b)^2 - kN; typically 1 or 2primeBaseSize-primesArray-tArray- the modular square roots t with t^2 == kN (mod p)sieveArraySize-
-
computeNextAParameter
java.math.BigInteger computeNextAParameter() -
getBestQ
double getBestQ()- Returns:
- approximate optimal size of q-parameters
-
getQCount
int getQCount()- Returns:
- number of primes
switha-parameter = q_1 * ... * q_s
-
getQArray
int[] getQArray()- Returns:
- the q-values that give the
a-parameter = q_1 * ... * q_s
-
getQTArray
int[] getQTArray()- Returns:
- the modular sqrt values for the chosen q's.
-
cleanUp
void cleanUp()Release memory after a factorization.
-