Class KeyAgreementSpi
java.lang.Object
javax.crypto.KeyAgreementSpi
org.bouncycastle.jcajce.provider.asymmetric.util.BaseAgreementSpi
org.bouncycastle.jcajce.provider.asymmetric.ec.KeyAgreementSpi
- Direct Known Subclasses:
KeyAgreementSpi.CDHwithSHA1KDFAndSharedInfo
,KeyAgreementSpi.CDHwithSHA224KDFAndSharedInfo
,KeyAgreementSpi.CDHwithSHA256KDFAndSharedInfo
,KeyAgreementSpi.CDHwithSHA384KDFAndSharedInfo
,KeyAgreementSpi.CDHwithSHA512KDFAndSharedInfo
,KeyAgreementSpi.DH
,KeyAgreementSpi.DHC
,KeyAgreementSpi.DHUC
,KeyAgreementSpi.DHUwithSHA1CKDF
,KeyAgreementSpi.DHUwithSHA1KDF
,KeyAgreementSpi.DHUwithSHA224CKDF
,KeyAgreementSpi.DHUwithSHA224KDF
,KeyAgreementSpi.DHUwithSHA256CKDF
,KeyAgreementSpi.DHUwithSHA256KDF
,KeyAgreementSpi.DHUwithSHA384CKDF
,KeyAgreementSpi.DHUwithSHA384KDF
,KeyAgreementSpi.DHUwithSHA512CKDF
,KeyAgreementSpi.DHUwithSHA512KDF
,KeyAgreementSpi.DHwithSHA1CKDF
,KeyAgreementSpi.DHwithSHA1KDF
,KeyAgreementSpi.DHwithSHA1KDFAndSharedInfo
,KeyAgreementSpi.DHwithSHA224KDFAndSharedInfo
,KeyAgreementSpi.DHwithSHA256CKDF
,KeyAgreementSpi.DHwithSHA256KDFAndSharedInfo
,KeyAgreementSpi.DHwithSHA384CKDF
,KeyAgreementSpi.DHwithSHA384KDFAndSharedInfo
,KeyAgreementSpi.DHwithSHA512CKDF
,KeyAgreementSpi.DHwithSHA512KDFAndSharedInfo
,KeyAgreementSpi.ECKAEGwithRIPEMD160KDF
,KeyAgreementSpi.ECKAEGwithSHA1KDF
,KeyAgreementSpi.ECKAEGwithSHA224KDF
,KeyAgreementSpi.ECKAEGwithSHA256KDF
,KeyAgreementSpi.ECKAEGwithSHA384KDF
,KeyAgreementSpi.ECKAEGwithSHA512KDF
,KeyAgreementSpi.MQV
,KeyAgreementSpi.MQVwithSHA1CKDF
,KeyAgreementSpi.MQVwithSHA1KDF
,KeyAgreementSpi.MQVwithSHA1KDFAndSharedInfo
,KeyAgreementSpi.MQVwithSHA224CKDF
,KeyAgreementSpi.MQVwithSHA224KDF
,KeyAgreementSpi.MQVwithSHA224KDFAndSharedInfo
,KeyAgreementSpi.MQVwithSHA256CKDF
,KeyAgreementSpi.MQVwithSHA256KDF
,KeyAgreementSpi.MQVwithSHA256KDFAndSharedInfo
,KeyAgreementSpi.MQVwithSHA384CKDF
,KeyAgreementSpi.MQVwithSHA384KDF
,KeyAgreementSpi.MQVwithSHA384KDFAndSharedInfo
,KeyAgreementSpi.MQVwithSHA512CKDF
,KeyAgreementSpi.MQVwithSHA512KDF
,KeyAgreementSpi.MQVwithSHA512KDFAndSharedInfo
Diffie-Hellman key agreement using elliptic curve keys, ala IEEE P1363
both the simple one, and the simple one with cofactors are supported.
Also, MQV key agreement per SEC-1
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
KeyAgreement according to BSI TR-03111 chapter 4.3.1static class
KeyAgreement according to BSI TR-03111 chapter 4.3.1static class
KeyAgreement according to BSI TR-03111 chapter 4.3.1static class
KeyAgreement according to BSI TR-03111 chapter 4.3.1static class
KeyAgreement according to BSI TR-03111 chapter 4.3.1static class
KeyAgreement according to BSI TR-03111 chapter 4.3.1static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
-
Field Summary
Fields inherited from class org.bouncycastle.jcajce.provider.asymmetric.util.BaseAgreementSpi
kdf, ukmParameters, ukmParametersSalt
-
Constructor Summary
ModifierConstructorDescriptionprotected
KeyAgreementSpi
(String kaAlgorithm, ECDHCUnifiedAgreement agreement, DerivationFunction kdf) protected
KeyAgreementSpi
(String kaAlgorithm, BasicAgreement agreement, DerivationFunction kdf) -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]
protected byte[]
protected void
doInitFromKey
(Key key, AlgorithmParameterSpec parameterSpec, SecureRandom random) protected Key
engineDoPhase
(Key key, boolean lastPhase) Methods inherited from class org.bouncycastle.jcajce.provider.asymmetric.util.BaseAgreementSpi
engineGenerateSecret, engineGenerateSecret, engineGenerateSecret, engineInit, engineInit, getAlgorithm, getKeySize, trimZeroes
-
Constructor Details
-
KeyAgreementSpi
-
KeyAgreementSpi
protected KeyAgreementSpi(String kaAlgorithm, ECDHCUnifiedAgreement agreement, DerivationFunction kdf)
-
-
Method Details
-
bigIntToBytes
-
engineDoPhase
protected Key engineDoPhase(Key key, boolean lastPhase) throws InvalidKeyException, IllegalStateException - Specified by:
engineDoPhase
in classKeyAgreementSpi
- Throws:
InvalidKeyException
IllegalStateException
-
doInitFromKey
protected void doInitFromKey(Key key, AlgorithmParameterSpec parameterSpec, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException - Specified by:
doInitFromKey
in classBaseAgreementSpi
- Throws:
InvalidKeyException
InvalidAlgorithmParameterException
-
doCalcSecret
protected byte[] doCalcSecret()- Specified by:
doCalcSecret
in classBaseAgreementSpi
-