Top Inners Constructors Methods
org.bouncycastle.jcajce.provider.asymmetric.ec

public abstract Class GMKeyPairGeneratorSpi

extends KeyPairGenerator
Class Inheritance
Known Direct Subclasses
org.bouncycastle.jcajce.provider.asymmetric.ec.GMKeyPairGeneratorSpi.BaseSM2
Imports
java.math.BigInteger, java.security.InvalidAlgorithmParameterException, .InvalidParameterException, .KeyPair, .SecureRandom, java.security.spec.AlgorithmParameterSpec, .ECGenParameterSpec, java.util.Hashtable, org.bouncycastle.asn1.x9.X9ECParameters, org.bouncycastle.crypto.AsymmetricCipherKeyPair, .CryptoServicesRegistrar, org.bouncycastle.crypto.generators.ECKeyPairGenerator, org.bouncycastle.crypto.params.ECDomainParameters, .ECKeyGenerationParameters, .ECPrivateKeyParameters, .ECPublicKeyParameters, org.bouncycastle.jcajce.provider.asymmetric.util.EC5Util, .ECUtil, org.bouncycastle.jcajce.provider.config.ProviderConfiguration, org.bouncycastle.jce.provider.BouncyCastleProvider, org.bouncycastle.jce.spec.ECNamedCurveGenParameterSpec, .ECNamedCurveSpec, .ECParameterSpec, org.bouncycastle.math.ec.ECCurve, .ECPoint, org.bouncycastle.util.Integers

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from java.security.KeyPairGenerator:
generateKeyPairgenKeyPairgetAlgorithmgetInstancegetInstancegetInstancegetProviderinitializeinitializeinitializeinitialize

Constructor Detail

GMKeyPairGeneratorSpiback to summary
public GMKeyPairGeneratorSpi(String algorithmName)
org.bouncycastle.jcajce.provider.asymmetric.ec back to summary

public Class GMKeyPairGeneratorSpi.BaseSM2

extends GMKeyPairGeneratorSpi
Class Inheritance
Known Direct Subclasses
org.bouncycastle.jcajce.provider.asymmetric.ec.GMKeyPairGeneratorSpi.SM2

Field Summary

Modifier and TypeField and Description
pack-priv String
pack-priv ProviderConfiguration
private static Hashtable<K, V>
pack-priv Object
pack-priv ECKeyPairGenerator
pack-priv boolean
pack-priv ECKeyGenerationParameters
pack-priv SecureRandom
pack-priv int

Constructor Summary

AccessConstructor and Description
public
public
BaseSM2(String algorithm, ProviderConfiguration configuration)

Method Summary

Modifier and TypeMethod and Description
protected ECKeyGenerationParameters
protected ECKeyGenerationParameters
protected ECKeyGenerationParameters
public KeyPair
public void
initialize(int
the keysize. This is an algorithm-specific metric, such as modulus length, specified in number of bits.
strength
,
SecureRandom
the source of randomness.
random
)

Overrides java.security.KeyPairGenerator.initialize.

Initializes the key pair generator for a certain keysize with the given source of randomness (and a default parameter set).
public void
initialize(AlgorithmParameterSpec
the parameter set used to generate the keys.
params
,
SecureRandom
the source of randomness.
random
)

Overrides java.security.KeyPairGenerator.initialize.

Initializes the key pair generator with the given parameter set and source of randomness.
protected void

Field Detail

algorithmback to summary
pack-priv String algorithm

Hides java.security.KeyPairGenerator.algorithm.

configurationback to summary
pack-priv ProviderConfiguration configuration
ecParametersback to summary
private static Hashtable<K, V> ecParameters
ecParamsback to summary
pack-priv Object ecParams
engineback to summary
pack-priv ECKeyPairGenerator engine
initialisedback to summary
pack-priv boolean initialised
paramback to summary
pack-priv ECKeyGenerationParameters param
randomback to summary
pack-priv SecureRandom random
strengthback to summary
pack-priv int strength

Constructor Detail

BaseSM2back to summary
public BaseSM2()
BaseSM2back to summary
public BaseSM2(String algorithm, ProviderConfiguration configuration)

Method Detail

createKeyGenParamsBCback to summary
protected ECKeyGenerationParameters createKeyGenParamsBC(ECParameterSpec p, SecureRandom r)
createKeyGenParamsJCEback to summary
protected ECKeyGenerationParameters createKeyGenParamsJCE(ECParameterSpec p, SecureRandom r)
createKeyGenParamsJCEback to summary
protected ECKeyGenerationParameters createKeyGenParamsJCE(X9ECParameters x9, SecureRandom r)
generateKeyPairback to summary
public KeyPair generateKeyPair()

Overrides java.security.KeyPairGenerator.generateKeyPair.

Doc from java.security.KeyPairGenerator.generateKeyPair.

Generates a key pair.

If this KeyPairGenerator has not been initialized explicitly, provider-specific defaults will be used for the size and other (algorithm-specific) values of the generated keys.

This will generate a new key pair every time it is called.

This method is functionally equivalent to genKeyPair.

Returns:KeyPair

the generated key pair

initializeback to summary
public void initialize(int strength, SecureRandom random)

Overrides java.security.KeyPairGenerator.initialize.

Doc from java.security.KeyPairGenerator.initialize.

Initializes the key pair generator for a certain keysize with the given source of randomness (and a default parameter set).

Parameters
strength:int

the keysize. This is an algorithm-specific metric, such as modulus length, specified in number of bits.

random:SecureRandom

the source of randomness.

initializeback to summary
public void initialize(AlgorithmParameterSpec params, SecureRandom random) throws InvalidAlgorithmParameterException

Overrides java.security.KeyPairGenerator.initialize.

Doc from java.security.KeyPairGenerator.initialize.

Initializes the key pair generator with the given parameter set and source of randomness.

This concrete method has been added to this previously-defined abstract class. This method calls the KeyPairGeneratorSpi initialize method, passing it params and random. That initialize method always throws an UnsupportedOperationException if it is not overridden by the provider.

Parameters
params:AlgorithmParameterSpec

the parameter set used to generate the keys.

random:SecureRandom

the source of randomness.

Exceptions
InvalidAlgorithmParameterException:
if the given parameters are inappropriate for this key pair generator.
initializeNamedCurveback to summary
protected void initializeNamedCurve(String curveName, SecureRandom random) throws InvalidAlgorithmParameterException
org.bouncycastle.jcajce.provider.asymmetric.ec back to summary

public Class GMKeyPairGeneratorSpi.SM2

extends BaseSM2
Class Inheritance

Field Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.ec.GMKeyPairGeneratorSpi.BaseSM2:
algorithmconfigurationecParamsengineinitialisedparamrandomstrength

Constructor Summary

AccessConstructor and Description
public
SM2()

Method Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.ec.GMKeyPairGeneratorSpi.BaseSM2:
createKeyGenParamsBCcreateKeyGenParamsJCEcreateKeyGenParamsJCEgenerateKeyPairinitializeinitializeinitializeNamedCurve

Constructor Detail

SM2back to summary
public SM2()