Package org.conscrypt
Class OpenSSLECDHKeyAgreement
- java.lang.Object
-
- javax.crypto.KeyAgreementSpi
-
- org.conscrypt.OpenSSLBaseDHKeyAgreement<OpenSSLKey>
-
- org.conscrypt.OpenSSLECDHKeyAgreement
-
@Internal public final class OpenSSLECDHKeyAgreement extends OpenSSLBaseDHKeyAgreement<OpenSSLKey>
Elliptic Curve Diffie-Hellman key agreement backed by the OpenSSL engine.
-
-
Constructor Summary
Constructors Constructor Description OpenSSLECDHKeyAgreement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intcomputeKey(byte[] buffer, OpenSSLKey theirPublicKey, OpenSSLKey ourPrivateKey)Given the public keytheirPublicKeyand the private keyourPrivateKeywrite the shared secret tobufferand return the actual output size.protected OpenSSLKeyconvertPrivateKey(java.security.PrivateKey key)protected OpenSSLKeyconvertPublicKey(java.security.PublicKey key)protected intgetOutputSize(OpenSSLKey openSslKey)Returns the expected result length for the givenkey.-
Methods inherited from class org.conscrypt.OpenSSLBaseDHKeyAgreement
engineDoPhase, engineGenerateSecret, engineGenerateSecret, engineGenerateSecret, engineInit, engineInit
-
-
-
-
Method Detail
-
convertPublicKey
protected OpenSSLKey convertPublicKey(java.security.PublicKey key) throws java.security.InvalidKeyException
- Specified by:
convertPublicKeyin classOpenSSLBaseDHKeyAgreement<OpenSSLKey>- Throws:
java.security.InvalidKeyException
-
convertPrivateKey
protected OpenSSLKey convertPrivateKey(java.security.PrivateKey key) throws java.security.InvalidKeyException
- Specified by:
convertPrivateKeyin classOpenSSLBaseDHKeyAgreement<OpenSSLKey>- Throws:
java.security.InvalidKeyException
-
computeKey
protected int computeKey(byte[] buffer, OpenSSLKey theirPublicKey, OpenSSLKey ourPrivateKey) throws java.security.InvalidKeyExceptionDescription 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:
java.security.InvalidKeyException
-
getOutputSize
protected int getOutputSize(OpenSSLKey openSslKey)
Description copied from class:OpenSSLBaseDHKeyAgreementReturns the expected result length for the givenkey.- Specified by:
getOutputSizein classOpenSSLBaseDHKeyAgreement<OpenSSLKey>
-
-