Class TDiv_QS_nLarge

  • All Implemented Interfaces:
    TDiv_QS

    public class TDiv_QS_nLarge
    extends Object
    implements TDiv_QS
    A trial division engine where partials can have several large factors. Division is carried out in two stages: Stage 1 identifies prime factors of Q, applying long-valued Barrett reduction Stage 2 does the actual division using BigInteger
    Author:
    Tilman Neumann
    • Constructor Detail

      • TDiv_QS_nLarge

        public TDiv_QS_nLarge​(boolean permitUnsafeUsage)
        Full constructor.
        Parameters:
        permitUnsafeUsage - if true then SIQS_Small (which is used for N > 310 bit to factor Q-rests) uses a sieve exploiting sun.misc.Unsafe features.
    • Method Detail

      • getName

        public String getName()
        Specified by:
        getName in interface TDiv_QS
        Returns:
        the name of this algorithm
      • initializeForN

        public void initializeForN​(double N_dbl,
                                   BigInteger kN,
                                   double maxQRest)
        Description copied from interface: TDiv_QS
        Initialize this trial division engine for a new N.
        Specified by:
        initializeForN in interface TDiv_QS
        kN - multiplier k (typically Knuth-Schroeppel) * factor argument N
        maxQRest - the biggest QRest admitted for a smooth relation
      • initializeForAParameter

        public void initializeForAParameter​(BigInteger da,
                                            int d,
                                            BigInteger b,
                                            SolutionArrays solutionArrays,
                                            int filteredBaseSize,
                                            int[] unsievedBaseElements)
        Description copied from interface: TDiv_QS
        Set prime/power base, polynomial parameters and smallest x-solutions for a new a-parameter.
        Specified by:
        initializeForAParameter in interface TDiv_QS
        Parameters:
        da - d*a, with d = 1 or 2 depending on kN % 8
        d - the d-value
        b - the (first) b-parameter
        filteredBaseSize - number of primes and powers use for sieving
        unsievedBaseElements - Prime base elements that were excluded from sieving, like the q's that give the a-parameter in SIQS
      • testList

        public List<AQPair> testList​(List<Integer> xList)
        Description copied from interface: TDiv_QS
        Test if Q(x) is smooth (factors completely over the prime base) or "sufficiently smooth" (factors almost over the prime base) for all x in the given list.
        Specified by:
        testList in interface TDiv_QS
        Returns:
        the AQ-pairs where Q is at least "sufficiently smooth"
      • getReport

        public TDivReport getReport()
        Specified by:
        getReport in interface TDiv_QS
        Returns:
        a description of the performed tests.
      • cleanUp

        public void cleanUp()
        Description copied from interface: TDiv_QS
        Release memory after a factorization.
        Specified by:
        cleanUp in interface TDiv_QS