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

public Class KeyAgreementSpi

extends BaseAgreementSpi
Class Inheritance
Known Direct Subclasses
org.bouncycastle.jcajce.provider.asymmetric.ecgost.KeyAgreementSpi.ECVKO
Imports
java.security.InvalidAlgorithmParameterException, .InvalidKeyException, .Key, .PrivateKey, .PublicKey, .SecureRandom, java.security.spec.AlgorithmParameterSpec, org.bouncycastle.asn1.x9.X9IntegerConverter, org.bouncycastle.crypto.CipherParameters, .DerivationFunction, org.bouncycastle.crypto.agreement.ECVKOAgreement, org.bouncycastle.crypto.digests.GOST3411Digest, org.bouncycastle.crypto.params.AsymmetricKeyParameter, .ECDomainParameters, .ECPrivateKeyParameters, .ParametersWithUKM, org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPublicKey, org.bouncycastle.jcajce.provider.asymmetric.util.BaseAgreementSpi, .ECUtil, org.bouncycastle.jcajce.spec.UserKeyingMaterialSpec, org.bouncycastle.jce.interfaces.ECPrivateKey, .ECPublicKey

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private ECVKOAgreement
private static final X9IntegerConverter
private String
private ECDomainParameters
private byte[]
Inherited from org.bouncycastle.jcajce.provider.asymmetric.util.BaseAgreementSpi:
kdfukmParameters

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
protected byte[]
protected void
protected Key
engineDoPhase(Key
the key for this phase. For example, in the case of Diffie-Hellman between 2 parties, this would be the other party's Diffie-Hellman public key.
key
,
boolean
flag which indicates whether this is the last phase of this key agreement.
lastPhase
)

Implements abstract javax.crypto.KeyAgreementSpi.engineDoPhase.

Executes the next phase of this key agreement with the given key that was received from one of the other parties involved in this key agreement.
pack-priv static AsymmetricKeyParameter
private static String
getSimpleName(Class<T> clazz)

Inherited from org.bouncycastle.jcajce.provider.asymmetric.util.BaseAgreementSpi:
engineGenerateSecretengineGenerateSecretengineGenerateSecretengineInitengineInitgetAlgorithmgetKeySizetrimZeroes

Field Detail

agreementback to summary
private ECVKOAgreement agreement
converterback to summary
private static final X9IntegerConverter converter
kaAlgorithmback to summary
private String kaAlgorithm

Hides org.bouncycastle.jcajce.provider.asymmetric.util.BaseAgreementSpi.kaAlgorithm.

parametersback to summary
private ECDomainParameters parameters
resultback to summary
private byte[] result

Constructor Detail

KeyAgreementSpiback to summary
protected KeyAgreementSpi(String kaAlgorithm, ECVKOAgreement agreement, DerivationFunction kdf)

Method Detail

doCalcSecretback to summary
protected byte[] doCalcSecret()

Implements abstract org.bouncycastle.jcajce.provider.asymmetric.util.BaseAgreementSpi.doCalcSecret.

doInitFromKeyback to summary
protected void doInitFromKey(Key key, AlgorithmParameterSpec parameterSpec, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException

Implements abstract org.bouncycastle.jcajce.provider.asymmetric.util.BaseAgreementSpi.doInitFromKey.

engineDoPhaseback to summary
protected Key engineDoPhase(Key key, boolean lastPhase) throws InvalidKeyException, IllegalStateException

Implements abstract javax.crypto.KeyAgreementSpi.engineDoPhase.

Doc from javax.crypto.KeyAgreementSpi.engineDoPhase.

Executes the next phase of this key agreement with the given key that was received from one of the other parties involved in this key agreement.

Parameters
key:Key

the key for this phase. For example, in the case of Diffie-Hellman between 2 parties, this would be the other party's Diffie-Hellman public key.

lastPhase:boolean

flag which indicates whether this is the last phase of this key agreement.

Returns:Key

the (intermediate) key resulting from this phase, or null if this phase does not yield a key

Exceptions
InvalidKeyException:
if the given key is inappropriate for this phase.
IllegalStateException:
if this key agreement has not been initialized.
generatePublicKeyParameterback to summary
pack-priv static AsymmetricKeyParameter generatePublicKeyParameter(PublicKey key) throws InvalidKeyException
getSimpleNameback to summary
private static String getSimpleName(Class<T> clazz)
org.bouncycastle.jcajce.provider.asymmetric.ecgost back to summary

public Class KeyAgreementSpi.ECVKO

extends KeyAgreementSpi
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.ecgost.KeyAgreementSpi:
doCalcSecretdoInitFromKeyengineDoPhasegeneratePublicKeyParameter

Constructor Detail

ECVKOback to summary
public ECVKO()