Top Description Fields Constructors Methods
org.apache.sshd.common.kex

public Class ECDH

extends AbstractDH
Class Inheritance
Imports
java.security.KeyFactory, .KeyPair, .KeyPairGenerator, .PublicKey, java.security.interfaces.ECPublicKey, java.security.spec.ECParameterSpec, .ECPoint, .ECPublicKeySpec, java.util.Objects, org.apache.sshd.common.cipher.ECCurves, org.apache.sshd.common.config.keys.KeyUtils, org.apache.sshd.common.digest.Digest, org.apache.sshd.common.util.ValidateUtils, org.apache.sshd.common.util.buffer.Buffer, org.apache.sshd.common.util.security.SecurityUtils

Elliptic Curve Diffie-Hellman key agreement.
Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
private ECCurves
private ECPoint
f

public static final String
private ECParameterSpec
private final boolean
Inherited from org.apache.sshd.common.kex.AbstractDH:
myKeyAgree

Constructor Summary

AccessConstructor and Description
public
ECDH(String curveName)

public
ECDH(ECCurves curve)

public
ECDH(ECParameterSpec paramSpec)

public
ECDH(String curveName, boolean raw)

public
ECDH(ECCurves curve, boolean raw)

public
ECDH(ECParameterSpec paramSpec, boolean raw)

Method Summary

Modifier and TypeMethod and Description
protected byte[]
calculateE()

Implements abstract org.apache.sshd.common.kex.AbstractDH.calculateE.

Lazy-called by getE() if the public key data has not been generated yet.

protected byte[]
calculateK()

Implements abstract org.apache.sshd.common.kex.AbstractDH.calculateK.

Lazy-called by getK() if the shared secret data has not been calculated yet

private ECCurves
public Digest
public void
public void
public void
setF(byte[] f)

Implements abstract org.apache.sshd.common.kex.AbstractDH.setF.

public String
toString()

Overrides org.apache.sshd.common.kex.AbstractDH.toString.

Returns a string representation of the object.

Inherited from org.apache.sshd.common.kex.AbstractDH:
checkKeyAgreementNecessitygetEgetKgetKeyEncapsulationisPublicDataAvailableisSharedSecretAvailablestripLeadingZeroes

Field Detail

curveback to summary
private ECCurves curve
fback to summary
private ECPoint f
KEX_TYPEback to summary
public static final String KEX_TYPE
paramsback to summary
private ECParameterSpec params
rawback to summary
private final boolean raw

Constructor Detail

ECDHback to summary
public ECDH(String curveName) throws Exception
ECDHback to summary
public ECDH(ECCurves curve) throws Exception
ECDHback to summary
public ECDH(ECParameterSpec paramSpec) throws Exception
ECDHback to summary
public ECDH(String curveName, boolean raw) throws Exception
ECDHback to summary
public ECDH(ECCurves curve, boolean raw) throws Exception
ECDHback to summary
public ECDH(ECParameterSpec paramSpec, boolean raw) throws Exception

Method Detail

calculateEback to summary
protected byte[] calculateE() throws Exception

Implements abstract org.apache.sshd.common.kex.AbstractDH.calculateE.

Doc from org.apache.sshd.common.kex.AbstractDH.calculateE.

Lazy-called by getE() if the public key data has not been generated yet.

Returns:byte[]

The calculated public key data

Annotations
@Override
Exceptions
Exception:
If failed to generate the relevant data
calculateKback to summary
protected byte[] calculateK() throws Exception

Implements abstract org.apache.sshd.common.kex.AbstractDH.calculateK.

Doc from org.apache.sshd.common.kex.AbstractDH.calculateK.

Lazy-called by getK() if the shared secret data has not been calculated yet

Returns:byte[]

The shared secret data

Annotations
@Override
Exceptions
Exception:
If failed to calculate it
findCurveback to summary
private ECCurves findCurve()
getHashback to summary
public Digest getHash() throws Exception

Implements abstract org.apache.sshd.common.kex.AbstractDH.getHash.

Annotations
@Override
putEback to summary
public void putE(Buffer buffer, byte[] e)

Overrides org.apache.sshd.common.kex.AbstractDH.putE.

Annotations
@Override
putFback to summary
public void putF(Buffer buffer, byte[] f)

Overrides org.apache.sshd.common.kex.AbstractDH.putF.

Annotations
@Override
setFback to summary
public void setF(byte[] f)

Implements abstract org.apache.sshd.common.kex.AbstractDH.setF.

Annotations
@Override
toStringback to summary
public String toString()

Overrides org.apache.sshd.common.kex.AbstractDH.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override