Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.bouncycastle.crypto.params;
 
 
Parameters for NaccacheStern public private key generation. For details on this cipher, please see http://www.gemplus.com/smart/rd/publications/pdf/NS98pkcs.pdf
    // private BigInteger publicExponent;
    private int certainty;
    private int cntSmallPrimes;
    private boolean debug = false;

    
Parameters for generating a NaccacheStern KeyPair.

Parameters:
random The source of randomness
strength The desired strength of the Key in Bits
certainty the probability that the generated primes are not really prime as integer: 2^(-certainty) is then the probability
cntSmallPrimes How many small key factors are desired
    public NaccacheSternKeyGenerationParameters(SecureRandom randomint strengthint certaintyint cntSmallPrimes)
    {
        this(randomstrengthcertaintycntSmallPrimesfalse);
    }

    
Parameters for a NaccacheStern KeyPair.

Parameters:
random The source of randomness
strength The desired strength of the Key in Bits
certainty the probability that the generated primes are not really prime as integer: 2^(-certainty) is then the probability
cntSmallPrimes How many small key factors are desired
debug Turn debugging on or off (reveals secret information, use with caution)
            int strengthint certaintyint cntSmallPrimesboolean debug)
    {
        super(randomstrength);
        this. = certainty;
        if (cntSmallPrimes % 2 == 1)
        {
            throw new IllegalArgumentException("cntSmallPrimes must be a multiple of 2");
        }
        if (cntSmallPrimes < 30)
        {
            throw new IllegalArgumentException("cntSmallPrimes must be >= 30 for security reasons");
        }
        this. = cntSmallPrimes;
        this. = debug;
    }

    

Returns:
Returns the certainty.
    public int getCertainty()
    {
        return ;
    }

    

Returns:
Returns the cntSmallPrimes.
    public int getCntSmallPrimes()
    {
        return ;
    }
    public boolean isDebug()
    {
        return ;
    }
New to GrepCode? Check out our FAQ X