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

public Class KeyAgreementSpi

extends BaseAgreementSpi
Class Inheritance
Known Direct Subclasses
org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi.XDH, org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi.X448, org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi.X25519, org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi.X25519withSHA256CKDF, org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi.X25519withSHA384CKDF, org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi.X25519withSHA512CKDF, org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi.X448withSHA256CKDF, org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi.X448withSHA384CKDF, org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi.X448withSHA512CKDF, org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi.X25519withSHA256KDF, org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi.X448withSHA512KDF, org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi.X25519UwithSHA256CKDF, org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi.X448UwithSHA512CKDF, org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi.X25519UwithSHA256KDF, org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi.X448UwithSHA512KDF, org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi.X448withSHA512HKDF, org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi.X25519withSHA256HKDF
Imports
java.security.InvalidAlgorithmParameterException, .InvalidKeyException, .Key, .PrivateKey, .PublicKey, .SecureRandom, java.security.spec.AlgorithmParameterSpec, org.bouncycastle.crypto.DerivationFunction, .RawAgreement, org.bouncycastle.crypto.agreement.X25519Agreement, .X448Agreement, .XDHUnifiedAgreement, org.bouncycastle.crypto.agreement.kdf.ConcatenationKDFGenerator, org.bouncycastle.crypto.generators.HKDFBytesGenerator, .KDF2BytesGenerator, org.bouncycastle.crypto.params.AsymmetricKeyParameter, .X25519PrivateKeyParameters, .X448PrivateKeyParameters, .XDHUPrivateParameters, .XDHUPublicParameters, org.bouncycastle.crypto.util.DigestFactory, org.bouncycastle.jcajce.provider.asymmetric.util.BaseAgreementSpi, org.bouncycastle.jcajce.spec.DHUParameterSpec, .UserKeyingMaterialSpec, org.bouncycastle.util.Properties

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class

Field Summary

Modifier and TypeField and Description
private RawAgreement
private DHUParameterSpec
private byte[]
Inherited from org.bouncycastle.jcajce.provider.asymmetric.util.BaseAgreementSpi:
kaAlgorithmkdfukmParametersukmParametersSalt

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv

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.

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

Field Detail

agreementback to summary
private RawAgreement agreement
dhuSpecback to summary
private DHUParameterSpec dhuSpec
resultback to summary
private byte[] result

Constructor Detail

KeyAgreementSpiback to summary
pack-priv KeyAgreementSpi(String algorithm)
KeyAgreementSpiback to summary
pack-priv KeyAgreementSpi(String algorithm, 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 params, SecureRandom secureRandom) 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.
getAgreementback to summary
private RawAgreement getAgreement(String alg) throws InvalidKeyException
org.bouncycastle.jcajce.provider.asymmetric.edec back to summary

public final Class KeyAgreementSpi.X25519

extends KeyAgreementSpi
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi:
doCalcSecretdoInitFromKeyengineDoPhase

Constructor Detail

X25519back to summary
public X25519()
org.bouncycastle.jcajce.provider.asymmetric.edec back to summary

public Class KeyAgreementSpi.X25519UwithSHA256CKDF

extends KeyAgreementSpi
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi:
doCalcSecretdoInitFromKeyengineDoPhase

Constructor Detail

X25519UwithSHA256CKDFback to summary
public X25519UwithSHA256CKDF()
org.bouncycastle.jcajce.provider.asymmetric.edec back to summary

public Class KeyAgreementSpi.X25519UwithSHA256KDF

extends KeyAgreementSpi
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi:
doCalcSecretdoInitFromKeyengineDoPhase

Constructor Detail

X25519UwithSHA256KDFback to summary
public X25519UwithSHA256KDF()
org.bouncycastle.jcajce.provider.asymmetric.edec back to summary

public final Class KeyAgreementSpi.X25519withSHA256CKDF

extends KeyAgreementSpi
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi:
doCalcSecretdoInitFromKeyengineDoPhase

Constructor Detail

X25519withSHA256CKDFback to summary
public X25519withSHA256CKDF()
org.bouncycastle.jcajce.provider.asymmetric.edec back to summary

public final Class KeyAgreementSpi.X25519withSHA256HKDF

extends KeyAgreementSpi
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi:
doCalcSecretdoInitFromKeyengineDoPhase

Constructor Detail

X25519withSHA256HKDFback to summary
public X25519withSHA256HKDF()
org.bouncycastle.jcajce.provider.asymmetric.edec back to summary

public final Class KeyAgreementSpi.X25519withSHA256KDF

extends KeyAgreementSpi
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi:
doCalcSecretdoInitFromKeyengineDoPhase

Constructor Detail

X25519withSHA256KDFback to summary
public X25519withSHA256KDF()
org.bouncycastle.jcajce.provider.asymmetric.edec back to summary

public Class KeyAgreementSpi.X25519withSHA384CKDF

extends KeyAgreementSpi
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi:
doCalcSecretdoInitFromKeyengineDoPhase

Constructor Detail

X25519withSHA384CKDFback to summary
public X25519withSHA384CKDF()
org.bouncycastle.jcajce.provider.asymmetric.edec back to summary

public Class KeyAgreementSpi.X25519withSHA512CKDF

extends KeyAgreementSpi
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi:
doCalcSecretdoInitFromKeyengineDoPhase

Constructor Detail

X25519withSHA512CKDFback to summary
public X25519withSHA512CKDF()
org.bouncycastle.jcajce.provider.asymmetric.edec back to summary

public final Class KeyAgreementSpi.X448

extends KeyAgreementSpi
Class Inheritance

Constructor Summary

AccessConstructor and Description
public
X448()

Method Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi:
doCalcSecretdoInitFromKeyengineDoPhase

Constructor Detail

X448back to summary
public X448()
org.bouncycastle.jcajce.provider.asymmetric.edec back to summary

public Class KeyAgreementSpi.X448UwithSHA512CKDF

extends KeyAgreementSpi
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi:
doCalcSecretdoInitFromKeyengineDoPhase

Constructor Detail

X448UwithSHA512CKDFback to summary
public X448UwithSHA512CKDF()
org.bouncycastle.jcajce.provider.asymmetric.edec back to summary

public Class KeyAgreementSpi.X448UwithSHA512KDF

extends KeyAgreementSpi
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi:
doCalcSecretdoInitFromKeyengineDoPhase

Constructor Detail

X448UwithSHA512KDFback to summary
public X448UwithSHA512KDF()
org.bouncycastle.jcajce.provider.asymmetric.edec back to summary

public final Class KeyAgreementSpi.X448withSHA256CKDF

extends KeyAgreementSpi
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi:
doCalcSecretdoInitFromKeyengineDoPhase

Constructor Detail

X448withSHA256CKDFback to summary
public X448withSHA256CKDF()
org.bouncycastle.jcajce.provider.asymmetric.edec back to summary

public Class KeyAgreementSpi.X448withSHA384CKDF

extends KeyAgreementSpi
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi:
doCalcSecretdoInitFromKeyengineDoPhase

Constructor Detail

X448withSHA384CKDFback to summary
public X448withSHA384CKDF()
org.bouncycastle.jcajce.provider.asymmetric.edec back to summary

public final Class KeyAgreementSpi.X448withSHA512CKDF

extends KeyAgreementSpi
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi:
doCalcSecretdoInitFromKeyengineDoPhase

Constructor Detail

X448withSHA512CKDFback to summary
public X448withSHA512CKDF()
org.bouncycastle.jcajce.provider.asymmetric.edec back to summary

public final Class KeyAgreementSpi.X448withSHA512HKDF

extends KeyAgreementSpi
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi:
doCalcSecretdoInitFromKeyengineDoPhase

Constructor Detail

X448withSHA512HKDFback to summary
public X448withSHA512HKDF()
org.bouncycastle.jcajce.provider.asymmetric.edec back to summary

public final Class KeyAgreementSpi.X448withSHA512KDF

extends KeyAgreementSpi
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi:
doCalcSecretdoInitFromKeyengineDoPhase

Constructor Detail

X448withSHA512KDFback to summary
public X448withSHA512KDF()
org.bouncycastle.jcajce.provider.asymmetric.edec back to summary

public final Class KeyAgreementSpi.XDH

extends KeyAgreementSpi
Class Inheritance

Constructor Summary

AccessConstructor and Description
public
XDH()

Method Summary

Inherited from org.bouncycastle.jcajce.provider.asymmetric.edec.KeyAgreementSpi:
doCalcSecretdoInitFromKeyengineDoPhase

Constructor Detail

XDHback to summary
public XDH()