Class PrimeBaseGenerator


  • public class PrimeBaseGenerator
    extends Object
    Prime base generator. Creates prime bases consisting of the 2 and odd primes with Legendre(kN|p)>=0, i.e. such that kN is not a non-residue (mod p). Instead of the Legendre symbol, the faster Jacobi symbol is computed.
    Author:
    Tilman Neumann
    • Constructor Detail

      • PrimeBaseGenerator

        public PrimeBaseGenerator()
    • Method Detail

      • computeReducedPrimeBase

        public void computeReducedPrimeBase​(BigInteger kN,
                                            int primeBaseSize,
                                            int[] primesArray)
        Compute a reduced prime base containing the 2 and odd primes p with Jacobi(kN|p)>=0
        Parameters:
        kN - has to be a quadratic residue modulo all p
        primeBaseSize - the wanted number of primes
        primesArray - is filled with the primes p satisfying Jacobi(kN|p)>=0