Class DSADomainParametersGenerationParameterSpec

  • All Implemented Interfaces:
    java.security.spec.AlgorithmParameterSpec

    public class DSADomainParametersGenerationParameterSpec
    extends java.lang.Object
    implements java.security.spec.AlgorithmParameterSpec
    Parameter spec for guiding the generation of DSA Domain Parameters.
    • Constructor Detail

      • DSADomainParametersGenerationParameterSpec

        public DSADomainParametersGenerationParameterSpec​(int L,
                                                          int N,
                                                          int certainty)
        Construct without a usage index, this will do a random construction of G.
        Parameters:
        L - desired length of prime P in bits (the effective key size).
        N - desired length of prime Q in bits.
        certainty - certainty level for prime number generation.
      • DSADomainParametersGenerationParameterSpec

        public DSADomainParametersGenerationParameterSpec​(int L,
                                                          int N,
                                                          int certainty,
                                                          int usageIndex)
        Construct for a specific usage index - this has the effect of using verifiable canonical generation of G.
        Parameters:
        L - desired length of prime P in bits (the effective key size).
        N - desired length of prime Q in bits.
        certainty - certainty level for prime number generation.
        usageIndex - a valid usage index.
      • DSADomainParametersGenerationParameterSpec

        public DSADomainParametersGenerationParameterSpec​(java.math.BigInteger p,
                                                          java.math.BigInteger q)
        Construct using a specific value of p and q - this will do a random construction of g.
        Parameters:
        p - the prime p.
        q - the sub-prime q.
      • DSADomainParametersGenerationParameterSpec

        public DSADomainParametersGenerationParameterSpec​(java.math.BigInteger p,
                                                          java.math.BigInteger q,
                                                          byte[] seed,
                                                          int usageIndex)
        Construct using a specific value of p and q, but with a seed and usageIndex as well - this has the effect of using verifiable canonical generation of G.
        Parameters:
        p - the prime p.
        q - the sub-prime q.
        seed - the seed used to generate p and q.
        usageIndex - a valid usage index.
    • Method Detail

      • withDigestAlgorithm

        public DSADomainParametersGenerationParameterSpec withDigestAlgorithm​(DigestAlgorithm digestAlgorithm)
        Create a spec which also specifies a specific digest algorithm to use for parameters generation.
        Parameters:
        digestAlgorithm - the specific digest algorithm to use.
        Returns:
        a new parameters generator spec.
      • getL

        public int getL()
      • getN

        public int getN()
      • getCertainty

        public int getCertainty()
      • getUsageIndex

        public int getUsageIndex()
      • getP

        public java.math.BigInteger getP()
      • getQ

        public java.math.BigInteger getQ()
      • getSeed

        public byte[] getSeed()