Class JCEECDHKeyAgreement
java.lang.Object
javax.crypto.KeyAgreementSpi
org.gudy.bouncycastle.jce.provider.JCEECDHKeyAgreement
- Direct Known Subclasses:
JCEECDHKeyAgreement.DH
Diffie-Hellman key agreement using elliptic curve keys, ala IEEE P1363
both the simple one, and the simple one with cofactors are supported.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BasicAgreementprivate CipherParametersprivate BigInteger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected KeyengineDoPhase(Key key, boolean lastPhase) protected byte[]protected intengineGenerateSecret(byte[] sharedSecret, int offset) protected SecretKeyengineGenerateSecret(String algorithm) protected voidengineInit(Key key, SecureRandom random) protected voidengineInit(Key key, AlgorithmParameterSpec params, SecureRandom random) byte[]void
-
Field Details
-
result
-
privKey
-
agreement
-
-
Constructor Details
-
JCEECDHKeyAgreement
-
-
Method Details
-
doPhase
-
engineDoPhase
protected Key engineDoPhase(Key key, boolean lastPhase) throws InvalidKeyException, IllegalStateException - Specified by:
engineDoPhasein classKeyAgreementSpi- Throws:
InvalidKeyExceptionIllegalStateException
-
generateSecret
- Throws:
IllegalStateException
-
engineGenerateSecret
- Specified by:
engineGenerateSecretin classKeyAgreementSpi- Throws:
IllegalStateException
-
engineGenerateSecret
protected int engineGenerateSecret(byte[] sharedSecret, int offset) throws IllegalStateException, ShortBufferException - Specified by:
engineGenerateSecretin classKeyAgreementSpi- Throws:
IllegalStateExceptionShortBufferException
-
engineGenerateSecret
- Specified by:
engineGenerateSecretin classKeyAgreementSpi
-
init
-
engineInit
protected void engineInit(Key key, AlgorithmParameterSpec params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException - Specified by:
engineInitin classKeyAgreementSpi- Throws:
InvalidKeyExceptionInvalidAlgorithmParameterException
-
engineInit
- Specified by:
engineInitin classKeyAgreementSpi- Throws:
InvalidKeyException
-