Package org.apache.sshd.common.kex
Class ECDH
java.lang.Object
org.apache.sshd.common.kex.AbstractDH
org.apache.sshd.common.kex.ECDH
Elliptic Curve Diffie-Hellman key agreement.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ECCurvesprivate ECPointstatic final Stringprivate ECParameterSpecFields inherited from class org.apache.sshd.common.kex.AbstractDH
myKeyAgree -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]Lazy-called byAbstractDH.getE()if the public key data has not been generated yet.protected byte[]Lazy-called byAbstractDH.getK()if the shared secret data has not been calculated yetgetHash()voidvoidvoidsetCurveParameters(ECParameterSpec paramSpec) voidsetF(byte[] f) toString()Methods inherited from class org.apache.sshd.common.kex.AbstractDH
checkKeyAgreementNecessity, getE, getK, isPublicDataAvailable, isSharedSecretAvailable, stripLeadingZeroes
-
Field Details
-
KEX_TYPE
- See Also:
-
curve
-
params
-
f
-
-
Constructor Details
-
Method Details
-
calculateE
Description copied from class:AbstractDHLazy-called byAbstractDH.getE()if the public key data has not been generated yet.- Specified by:
calculateEin classAbstractDH- Returns:
- The calculated public key data
- Throws:
Exception- If failed to generate the relevant data
-
calculateK
Description copied from class:AbstractDHLazy-called byAbstractDH.getK()if the shared secret data has not been calculated yet- Specified by:
calculateKin classAbstractDH- Returns:
- The shared secret data
- Throws:
Exception- If failed to calculate it
-
setCurveParameters
-
setF
public void setF(byte[] f) - Specified by:
setFin classAbstractDH
-
putE
- Overrides:
putEin classAbstractDH
-
putF
- Overrides:
putFin classAbstractDH
-
getHash
- Specified by:
getHashin classAbstractDH- Throws:
Exception
-
toString
- Overrides:
toStringin classAbstractDH
-