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

public abstract Class AbstractDHKeyExchange

extends AbstractLoggingBean
implements KeyExchange
Class Inheritance
All Implemented Interfaces
org.apache.sshd.common.kex.KeyExchange, org.apache.sshd.common.session.SessionHolder, org.apache.sshd.common.session.SessionContextHolder, org.apache.sshd.common.NamedResource
Known Direct Subclasses
org.apache.sshd.server.kex.AbstractDHServerKeyExchange, org.apache.sshd.client.kex.AbstractDHClientKeyExchange
Imports
java.math.BigInteger, java.util.Objects, org.apache.sshd.common.SshConstants, .SshException, org.apache.sshd.common.digest.Digest, org.apache.sshd.common.kex.KeyExchange, org.apache.sshd.common.session.Session, org.apache.sshd.common.util.NumberUtils, .ValidateUtils, org.apache.sshd.common.util.buffer.Buffer, .BufferUtils, org.apache.sshd.common.util.logging.AbstractLoggingBean

Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
private byte[]
e

private BigInteger
private byte[]
f

private BigInteger
protected byte[]
h

protected Digest
protected byte[]
protected byte[]
protected byte[]
k

private final Session
protected byte[]
protected byte[]
Inherited from org.apache.sshd.common.util.logging.AbstractLoggingBean:
log

Constructor Summary

AccessConstructor and Description
protected

Method Summary

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

protected BigInteger
protected byte[]
getF()

protected BigInteger
public byte[]
getH()

Implements org.apache.sshd.common.kex.KeyExchange.getH.

Retrieves the computed h parameter

public Digest
getHash()

Implements org.apache.sshd.common.kex.KeyExchange.getHash.

The message digest used by this key exchange algorithm.

public byte[]
getK()

Implements org.apache.sshd.common.kex.KeyExchange.getK.

Retrieves the computed k parameter

public Session
public void
init(byte[]
the server identification string
v_s
,
byte[]
the client identification string
v_c
,
byte[]
the server key initialization packet
i_s
,
byte[]
the client key initialization packet
i_c
)

Implements org.apache.sshd.common.kex.KeyExchange.init.

Initialize the key exchange algorithm.

protected byte[]
normalize(byte[] mpInt)

protected void
setE(byte[] e)

protected void
setF(byte[] f)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

protected byte[]
updateE(Buffer buffer)

protected byte[]
updateE(byte[] mpInt)

protected byte[]
updateF(Buffer buffer)

protected byte[]
updateF(byte[] mpInt)

protected void
protected void
Inherited from org.apache.sshd.common.util.logging.AbstractLoggingBean:
debugdebugdebugdebugdebugerrorerrorerrorerrorerrorgetSimplifiedLoggerinfoinfowarnwarnwarnwarnwarnwarnwarnwarn

Field Detail

eback to summary
private byte[] e
eValueback to summary
private BigInteger eValue
fback to summary
private byte[] f
fValueback to summary
private BigInteger fValue
hback to summary
protected byte[] h
hashback to summary
protected Digest hash
i_cback to summary
protected byte[] i_c
i_sback to summary
protected byte[] i_s
kback to summary
protected byte[] k
sessionback to summary
private final Session session
v_cback to summary
protected byte[] v_c
v_sback to summary
protected byte[] v_s

Constructor Detail

AbstractDHKeyExchangeback to summary
protected AbstractDHKeyExchange(Session session)

Method Detail

getEback to summary
protected byte[] getE()
getEValueback to summary
protected BigInteger getEValue()
getFback to summary
protected byte[] getF()
getFValueback to summary
protected BigInteger getFValue()
getHback to summary
public byte[] getH()

Implements org.apache.sshd.common.kex.KeyExchange.getH.

Doc from org.apache.sshd.common.kex.KeyExchange.getH.

Retrieves the computed h parameter

Returns:byte[]

The h parameter

Annotations
@Override
getHashback to summary
public Digest getHash()

Implements org.apache.sshd.common.kex.KeyExchange.getHash.

Doc from org.apache.sshd.common.kex.KeyExchange.getHash.

The message digest used by this key exchange algorithm.

Returns:Digest

the message digest

Annotations
@Override
getKback to summary
public byte[] getK()

Implements org.apache.sshd.common.kex.KeyExchange.getK.

Doc from org.apache.sshd.common.kex.KeyExchange.getK.

Retrieves the computed k parameter

Returns:byte[]

The k parameter

Annotations
@Override
getSessionback to summary
public Session getSession()

Implements org.apache.sshd.common.session.SessionHolder.getSession.

Annotations
@Override
initback to summary
public void init(byte[] v_s, byte[] v_c, byte[] i_s, byte[] i_c) throws Exception

Implements org.apache.sshd.common.kex.KeyExchange.init.

Doc from org.apache.sshd.common.kex.KeyExchange.init.

Initialize the key exchange algorithm.

Parameters
v_s:byte[]

the server identification string

v_c:byte[]

the client identification string

i_s:byte[]

the server key initialization packet

i_c:byte[]

the client key initialization packet

Annotations
@Override
Exceptions
Exception:
if an error occurs
normalizeback to summary
protected byte[] normalize(byte[] mpInt)
setEback to summary
protected void setE(byte[] e)
setFback to summary
protected void setF(byte[] f)
toStringback to summary
public String toString()

Overrides java.lang.Object.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
updateEback to summary
protected byte[] updateE(Buffer buffer)
updateEback to summary
protected byte[] updateE(byte[] mpInt)
updateFback to summary
protected byte[] updateF(Buffer buffer)
updateFback to summary
protected byte[] updateF(byte[] mpInt)
validateEValueback to summary
protected void validateEValue(BigInteger pValue) throws SshException
validateFValueback to summary
protected void validateFValue(BigInteger pValue) throws SshException