Top Inners Fields Constructors Methods
org.bouncycastle.jcajce.provider

pack-priv Class ProvECGOST3410

extends AsymmetricAlgorithmProvider
Class Inheritance
Imports
java.io.IOException, java.security.InvalidAlgorithmParameterException, .InvalidKeyException, .InvalidParameterException, .Key, .KeyPair, .PrivateKey, .PublicKey, .SecureRandom, java.security.spec.AlgorithmParameterSpec, .ECGenParameterSpec, .InvalidKeySpecException, .KeySpec, org.bouncycastle.asn1.ASN1ObjectIdentifier, org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers, .ECGOST3410NamedCurves, org.bouncycastle.asn1.pkcs.PrivateKeyInfo, org.bouncycastle.asn1.x509.SubjectPublicKeyInfo, org.bouncycastle.crypto.Algorithm, .AsymmetricKeyPairGenerator, org.bouncycastle.crypto.asymmetric.AsymmetricECGOST3410PrivateKey, .AsymmetricECGOST3410PublicKey, .AsymmetricKeyPair, .ECDomainParameters, .GOST3410Parameters, org.bouncycastle.crypto.general.ECGOST3410, org.bouncycastle.jcajce.interfaces.ECGOST3410PrivateKey, .ECGOST3410PublicKey, org.bouncycastle.jcajce.spec.ECDomainParameterSpec, .ECGOST3410PrivateKeySpec, .ECGOST3410PublicKeySpec, .GOST3410ParameterSpec

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
private static final String
private static final PrivateKeyConverter<AsymmetricECGOST3410PrivateKey>
private static final PublicKeyConverter<AsymmetricECGOST3410PublicKey>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from org.bouncycastle.jcajce.provider.AsymmetricAlgorithmProvider:
addKeyAgreementAlgorithmaddSignatureAlgorithmaddSignatureAlgorithmregisterOidregisterOidAlgorithmParameters

Field Detail

PREFIXback to summary
private static final String PREFIX
privateKeyConverterback to summary
private static final PrivateKeyConverter<AsymmetricECGOST3410PrivateKey> privateKeyConverter
publicKeyConverterback to summary
private static final PublicKeyConverter<AsymmetricECGOST3410PublicKey> publicKeyConverter

Constructor Detail

ProvECGOST3410back to summary
pack-priv ProvECGOST3410()

Method Detail

configureback to summary
public void configure(final BouncyCastleFipsProvider provider)

Implements abstract org.bouncycastle.jcajce.provider.AlgorithmProvider.configure.

org.bouncycastle.jcajce.provider back to summary

pack-priv Class ProvECGOST3410.KeyFactorySpi

extends BaseKeyFactory
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected PrivateKey
engineGeneratePrivate(KeySpec
the specification (key material) of the private key.
keySpec
)

Overrides org.bouncycastle.jcajce.provider.BaseKeyFactory.engineGeneratePrivate.

Generates a private key object from the provided key specification (key material).
protected PublicKey
engineGeneratePublic(KeySpec
the specification (key material) of the public key.
keySpec
)

Overrides org.bouncycastle.jcajce.provider.BaseKeyFactory.engineGeneratePublic.

Generates a public key object from the provided key specification (key material).
protected KeySpec
engineGetKeySpec(Key
the key.
key
,
Class<T>
the specification class in which the key material should be returned.
spec
)

Overrides org.bouncycastle.jcajce.provider.BaseKeyFactory.engineGetKeySpec.

Returns a specification (key material) of the given key object.
protected Key
engineTranslateKey(Key
the key whose provider is unknown or untrusted.
key
)

Implements abstract java.security.KeyFactorySpi.engineTranslateKey.

Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this key factory.
public PrivateKey
public PublicKey

Constructor Detail

KeyFactorySpiback to summary
public KeyFactorySpi()

Method Detail

engineGeneratePrivateback to summary
protected PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException

Overrides org.bouncycastle.jcajce.provider.BaseKeyFactory.engineGeneratePrivate.

Doc from java.security.KeyFactorySpi.engineGeneratePrivate.

Generates a private key object from the provided key specification (key material).

Parameters
keySpec:KeySpec

the specification (key material) of the private key.

Returns:PrivateKey

the private key.

Exceptions
InvalidKeySpecException:
if the given key specification is inappropriate for this key factory to produce a private key.
engineGeneratePublicback to summary
protected PublicKey engineGeneratePublic(KeySpec keySpec) throws InvalidKeySpecException

Overrides org.bouncycastle.jcajce.provider.BaseKeyFactory.engineGeneratePublic.

Doc from java.security.KeyFactorySpi.engineGeneratePublic.

Generates a public key object from the provided key specification (key material).

Parameters
keySpec:KeySpec

the specification (key material) of the public key.

Returns:PublicKey

the public key.

Exceptions
InvalidKeySpecException:
if the given key specification is inappropriate for this key factory to produce a public key.
engineGetKeySpecback to summary
protected KeySpec engineGetKeySpec(Key key, Class<T> spec) throws InvalidKeySpecException

Overrides org.bouncycastle.jcajce.provider.BaseKeyFactory.engineGetKeySpec.

Doc from java.security.KeyFactorySpi.engineGetKeySpec.

Returns a specification (key material) of the given key object. keySpec identifies the specification class in which the key material should be returned. It could, for example, be DSAPublicKeySpec.class, to indicate that the key material should be returned in an instance of the DSAPublicKeySpec class.

Parameters
key:Key

the key.

spec:Class<T>

the specification class in which the key material should be returned.

Returns:KeySpec

the underlying key specification (key material) in an instance of the requested specification class.

Exceptions
InvalidKeySpecException:
if the requested key specification is inappropriate for the given key, or the given key cannot be dealt with (e.g., the given key has an unrecognized format).
engineTranslateKeyback to summary
protected Key engineTranslateKey(Key key) throws InvalidKeyException

Implements abstract java.security.KeyFactorySpi.engineTranslateKey.

Doc from java.security.KeyFactorySpi.engineTranslateKey.

Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this key factory.

Parameters
key:Key

the key whose provider is unknown or untrusted.

Returns:Key

the translated key.

Exceptions
InvalidKeyException:
if the given key cannot be processed by this key factory.
generatePrivateback to summary
public PrivateKey generatePrivate(PrivateKeyInfo keyInfo) throws IOException

Implements org.bouncycastle.jcajce.provider.AsymmetricKeyInfoConverter.generatePrivate.

generatePublicback to summary
public PublicKey generatePublic(SubjectPublicKeyInfo keyInfo) throws IOException

Implements org.bouncycastle.jcajce.provider.AsymmetricKeyInfoConverter.generatePublic.

org.bouncycastle.jcajce.provider back to summary

pack-priv Class ProvECGOST3410.KeyPairGenerator

extends KeyPairGenerator
Class Inheritance

Field Summary

Modifier and TypeField and Description
private AsymmetricKeyPairGenerator<T extends Parameters, P extends AsymmetricPublicKey, S extends AsymmetricPrivateKey>
private final BouncyCastleFipsProvider
private boolean
private GOST3410Parameters<ECDomainParameters>
private SecureRandom

Constructor Summary

AccessConstructor and Description
public

Method Summary

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

Overrides java.security.KeyPairGenerator.initialize.

Initializes the key pair generator for a certain keysize using a default parameter set and the SecureRandom implementation of the highest-priority installed provider as the source of randomness.
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
)

Overrides java.security.KeyPairGenerator.initialize.

Initializes the key pair generator using the specified parameter set and the SecureRandom implementation of the highest-priority installed provider as the source of randomness.
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.
Inherited from java.security.KeyPairGenerator:
genKeyPairgetAlgorithmgetInstancegetInstancegetInstancegetProvider

Field Detail

engineback to summary
private AsymmetricKeyPairGenerator<T extends Parameters, P extends AsymmetricPublicKey, S extends AsymmetricPrivateKey> engine
fipsProviderback to summary
private final BouncyCastleFipsProvider fipsProvider
initialisedback to summary
private boolean initialised
paramsback to summary
private GOST3410Parameters<ECDomainParameters> params
randomback to summary
private SecureRandom random

Constructor Detail

KeyPairGeneratorback to summary
public KeyPairGenerator(BouncyCastleFipsProvider fipsProvider)

Method Detail

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

initback to summary
private void init(GOST3410ParameterSpec<T extends AlgorithmParameterSpec> gParams, SecureRandom random)
initializeback to summary
public void initialize(int strength)

Overrides java.security.KeyPairGenerator.initialize.

Doc from java.security.KeyPairGenerator.initialize.

Initializes the key pair generator for a certain keysize using a default parameter set and the SecureRandom implementation of the highest-priority installed provider as the source of randomness. (If none of the installed providers supply an implementation of SecureRandom, a system-provided source of randomness is used.)

Parameters
strength:int

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

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) throws InvalidAlgorithmParameterException

Overrides java.security.KeyPairGenerator.initialize.

Doc from java.security.KeyPairGenerator.initialize.

Initializes the key pair generator using the specified parameter set and the SecureRandom implementation of the highest-priority installed provider as the source of randomness. (If none of the installed providers supply an implementation of SecureRandom, a system-provided source of randomness is used.)

This concrete method has been added to this previously-defined abstract class. This method calls the KeyPairGeneratorSpi initialize method, passing it params and a source of randomness (obtained from the highest-priority installed provider or system-provided if none of the installed providers supply one). 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.

Exceptions
InvalidAlgorithmParameterException:
if the given parameters are inappropriate for this key pair generator.
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.