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

public Class CramerShoupKeyPairGenerator

extends Object
implements AsymmetricCipherKeyPairGenerator
Class Inheritance
All Implemented Interfaces
org.bouncycastle.crypto.AsymmetricCipherKeyPairGenerator
Imports
java.math.BigInteger, java.security.SecureRandom, org.bouncycastle.crypto.*, org.bouncycastle.crypto.constraints.ConstraintUtils, .DefaultServiceProperties, org.bouncycastle.crypto.params.CramerShoupKeyGenerationParameters, .CramerShoupParameters, .CramerShoupPrivateKeyParameters, .CramerShoupPublicKeyParameters, org.bouncycastle.util.BigIntegers

a Cramer Shoup key pair generator

Field Summary

Modifier and TypeField and Description
private static final BigInteger
private CramerShoupKeyGenerationParameters

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private CramerShoupPublicKeyParameters
public AsymmetricCipherKeyPair
generateKeyPair()

Implements org.bouncycastle.crypto.AsymmetricCipherKeyPairGenerator.generateKeyPair.

return an AsymmetricCipherKeyPair containing the generated keys.

private CramerShoupPrivateKeyParameters
private 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 CramerShoupKeyGenerationParameters param

Constructor Detail

CramerShoupKeyPairGeneratorback to summary
public CramerShoupKeyPairGenerator()

Method Detail

calculatePublicKeyback to summary
private CramerShoupPublicKeyParameters calculatePublicKey(CramerShoupParameters csParams, CramerShoupPrivateKeyParameters sk)
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 CramerShoupPrivateKeyParameters generatePrivateKey(SecureRandom random, CramerShoupParameters csParams)
generateRandomElementback to summary
private BigInteger generateRandomElement(BigInteger p, 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.