Package org.apache.sshd.common.kex
Class ECDH
- java.lang.Object
-
- org.apache.sshd.common.kex.AbstractDH
-
- org.apache.sshd.common.kex.ECDH
-
public class ECDH extends AbstractDH
Elliptic Curve Diffie-Hellman key agreement.- Author:
- Apache MINA SSHD Project
-
-
Field Summary
Fields Modifier and Type Field Description static StringKEX_TYPE-
Fields inherited from class org.apache.sshd.common.kex.AbstractDH
myKeyAgree
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected byte[]calculateE()Lazy-called byAbstractDH.getE()if the public key data has not been generated yet.protected byte[]calculateK()Lazy-called byAbstractDH.getK()if the shared secret data has not been calculated yetDigestgetHash()voidputE(Buffer buffer, byte[] e)voidputF(Buffer buffer, byte[] f)voidsetCurveParameters(ECParameterSpec paramSpec)voidsetF(byte[] f)StringtoString()-
Methods inherited from class org.apache.sshd.common.kex.AbstractDH
checkKeyAgreementNecessity, getE, getK, isPublicDataAvailable, isSharedSecretAvailable, stripLeadingZeroes
-
-
-
-
Field Detail
-
KEX_TYPE
public static final String KEX_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
calculateE
protected byte[] calculateE() throws ExceptionDescription 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
protected byte[] calculateK() throws ExceptionDescription 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
public void setCurveParameters(ECParameterSpec paramSpec)
-
setF
public void setF(byte[] f)
- Specified by:
setFin classAbstractDH
-
putE
public void putE(Buffer buffer, byte[] e)
- Overrides:
putEin classAbstractDH
-
putF
public void putF(Buffer buffer, byte[] f)
- Overrides:
putFin classAbstractDH
-
getHash
public Digest getHash() throws Exception
- Specified by:
getHashin classAbstractDH- Throws:
Exception
-
toString
public String toString()
- Overrides:
toStringin classAbstractDH
-
-