Top Description Fields Constructors Methods
org.bouncycastle.crypto.generators

public Class DSAKeyPairGenerator

extends Object
implements AsymmetricCipherKeyPairGenerator
Class Inheritance
All Implemented Interfaces
org.bouncycastle.crypto.AsymmetricCipherKeyPairGenerator
Imports
java.math.BigInteger, java.security.SecureRandom, org.bouncycastle.crypto.AsymmetricCipherKeyPair, .AsymmetricCipherKeyPairGenerator, .CryptoServicePurpose, .CryptoServicesRegistrar, .KeyGenerationParameters, org.bouncycastle.crypto.constraints.ConstraintUtils, .DefaultServiceProperties, org.bouncycastle.crypto.params.DSAKeyGenerationParameters, .DSAParameters, .DSAPrivateKeyParameters, .DSAPublicKeyParameters, org.bouncycastle.math.ec.WNafUtil, org.bouncycastle.util.BigIntegers

a DSA key pair generator. This generates DSA keys in line with the method described in FIPS 186-3 B.1 FFC Key Pair Generation.

Field Summary

Modifier and TypeField and Description
private static final BigInteger
private DSAKeyGenerationParameters

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static BigInteger
public AsymmetricCipherKeyPair
generateKeyPair()

Implements org.bouncycastle.crypto.AsymmetricCipherKeyPairGenerator.generateKeyPair.

return an AsymmetricCipherKeyPair containing the generated keys.

private static BigInteger
public void
init(KeyGenerationParameters
the parameters the key pair is to be initialised with.
param
)

Implements org.bouncycastle.crypto.AsymmetricCipherKeyPairGenerator.init.

intialise the key pair generator.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ONEback to summary
private static final BigInteger ONE
paramback to summary
private DSAKeyGenerationParameters param

Constructor Detail

DSAKeyPairGeneratorback to summary
public DSAKeyPairGenerator()

Method Detail

calculatePublicKeyback to summary
private static BigInteger calculatePublicKey(BigInteger p, BigInteger g, BigInteger x)
generateKeyPairback to summary
public AsymmetricCipherKeyPair generateKeyPair()

Implements org.bouncycastle.crypto.AsymmetricCipherKeyPairGenerator.generateKeyPair.

Doc from org.bouncycastle.crypto.AsymmetricCipherKeyPairGenerator.generateKeyPair.

return an AsymmetricCipherKeyPair containing the generated keys.

Returns:AsymmetricCipherKeyPair

an AsymmetricCipherKeyPair containing the generated keys.

generatePrivateKeyback to summary
private static BigInteger generatePrivateKey(BigInteger q, SecureRandom random)
initback to summary
public void init(KeyGenerationParameters param)

Implements org.bouncycastle.crypto.AsymmetricCipherKeyPairGenerator.init.

Doc from org.bouncycastle.crypto.AsymmetricCipherKeyPairGenerator.init.

intialise the key pair generator.

Parameters
param:KeyGenerationParameters

the parameters the key pair is to be initialised with.