|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.sshtools.j2ssh.transport.SshMessage
|
+--com.sshtools.j2ssh.transport.kex.SshMsgKexDhInit
Implements the diffie-hellman-group1-sha1 key exchange init message.
byte SSH_MSG_KEXDH_INIT
mpint e
The Diffie-Hellman key exchange provides a shared secret that can not be determined by either party alone. The key exchange is combined with a signature with the host key to provide host authentication.
The client generates a random number x (1 < x < q) and computes e = g^x mod p. The client sends e to the server.
| Field Summary | |
protected static int |
SSH_MSG_KEXDH_INIT
The message id for this message |
| Constructor Summary | |
SshMsgKexDhInit()
Constructs the message from data received |
|
SshMsgKexDhInit(java.math.BigInteger e)
Constructs the message ready for sending |
|
| Method Summary | |
protected void |
constructByteArray(ByteArrayWriter baw)
Abstract method implementation to create a byte array containing the message. |
protected void |
constructMessage(ByteArrayReader bar)
Abstract method implementation to construct the message from a byte array. |
java.math.BigInteger |
getE()
Gets the diffie hellman e value |
java.lang.String |
getMessageName()
Gets the message name for debugging |
| Methods inherited from class com.sshtools.j2ssh.transport.SshMessage |
fromByteArray, getMessageId, toByteArray |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final int SSH_MSG_KEXDH_INIT
| Constructor Detail |
public SshMsgKexDhInit(java.math.BigInteger e)
e - The diffie hellman e valuepublic SshMsgKexDhInit()
| Method Detail |
public java.lang.String getMessageName()
getMessageName in class SshMessage
protected void constructMessage(ByteArrayReader bar)
throws InvalidMessageException
constructMessage in class SshMessagebar - The byte array containing the message
data.
InvalidMessageException - Thrown is the data cannot be read.
protected void constructByteArray(ByteArrayWriter baw)
throws InvalidMessageException
constructByteArray in class SshMessagebaw - The byte array to write to.
InvalidMessageException - Thrown if the data cannot be written.public java.math.BigInteger getE()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||