Class OpenSSLXDHKeyAgreement
java.lang.Object
javax.crypto.KeyAgreementSpi
org.conscrypt.OpenSSLBaseDHKeyAgreement<byte[]>
org.conscrypt.OpenSSLXDHKeyAgreement
Elliptic Curve Diffie-Hellman key agreement backed by the OpenSSL engine.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intcomputeKey(byte[] buffer, byte[] theirPublicKey, byte[] ourPrivateKey) Given the public keytheirPublicKeyand the private keyourPrivateKeywrite the shared secret tobufferand return the actual output size.protected byte[]protected byte[]protected intgetOutputSize(byte[] key) Returns the expected result length for the givenkey.Methods inherited from class OpenSSLBaseDHKeyAgreement
engineDoPhase, engineGenerateSecret, engineGenerateSecret, engineGenerateSecret, engineInit, engineInit
-
Constructor Details
-
OpenSSLXDHKeyAgreement
public OpenSSLXDHKeyAgreement()
-
-
Method Details
-
convertPublicKey
- Specified by:
convertPublicKeyin classOpenSSLBaseDHKeyAgreement<byte[]>- Throws:
InvalidKeyException
-
convertPrivateKey
- Specified by:
convertPrivateKeyin classOpenSSLBaseDHKeyAgreement<byte[]>- Throws:
InvalidKeyException
-
computeKey
protected int computeKey(byte[] buffer, byte[] theirPublicKey, byte[] 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<byte[]>- Throws:
InvalidKeyException
-
getOutputSize
protected int getOutputSize(byte[] key) Description copied from class:OpenSSLBaseDHKeyAgreementReturns the expected result length for the givenkey.- Specified by:
getOutputSizein classOpenSSLBaseDHKeyAgreement<byte[]>
-