Class OpenSSLECDHKeyAgreement
Elliptic Curve Diffie-Hellman key agreement backed by the OpenSSL engine.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intcomputeKey(byte[] buffer, OpenSSLKey theirPublicKey, OpenSSLKey ourPrivateKey) Given the public keytheirPublicKeyand the private keyourPrivateKeywrite the shared secret tobufferand return the actual output size.protected OpenSSLKeyprotected OpenSSLKeyprotected intgetOutputSize(OpenSSLKey openSslKey) Returns the expected result length for the givenkey.Methods inherited from class OpenSSLBaseDHKeyAgreement
engineDoPhase, engineGenerateSecret, engineGenerateSecret, engineGenerateSecret, engineInit, engineInit
-
Constructor Details
-
OpenSSLECDHKeyAgreement
public OpenSSLECDHKeyAgreement()
-
-
Method Details
-
convertPublicKey
- Specified by:
convertPublicKeyin classOpenSSLBaseDHKeyAgreement<OpenSSLKey>- Throws:
InvalidKeyException
-
convertPrivateKey
- Specified by:
convertPrivateKeyin classOpenSSLBaseDHKeyAgreement<OpenSSLKey>- Throws:
InvalidKeyException
-
computeKey
protected int computeKey(byte[] buffer, OpenSSLKey theirPublicKey, OpenSSLKey ourPrivateKey) throws InvalidKeyException Description copied from class:OpenSSLBaseDHKeyAgreementGiven the public keytheirPublicKeyand the private keyourPrivateKeywrite the shared secret tobufferand return the actual output size.- Specified by:
computeKeyin classOpenSSLBaseDHKeyAgreement<OpenSSLKey>- Throws:
InvalidKeyException
-
getOutputSize
Description copied from class:OpenSSLBaseDHKeyAgreementReturns the expected result length for the givenkey.- Specified by:
getOutputSizein classOpenSSLBaseDHKeyAgreement<OpenSSLKey>
-