|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sshtools.j2ssh.transport.kex.SshKeyExchange | +--com.sshtools.j2ssh.transport.kex.DhGroup1Sha1
Implements the diffie-hellman-group1-sha1 key exchange method as described in the transport protocol specification [SSH-TRANS]
Field Summary |
Fields inherited from class com.sshtools.j2ssh.transport.kex.SshKeyExchange |
messageStore |
Constructor Summary | |
DhGroup1Sha1()
Constructor for the DhGroup1Sha1 object |
Method Summary | |
protected byte[] |
calculateExchangeHash(byte[] hostKey)
This method is during key exchange to calculate the exchange hash The exchange hash is computed as the concatenation of the following: The clients identification string, The servers identification string, The payload of the clients SSH_MSG_KEXINIT, The payload of the servers SSH_MSG_KEX_INIT, The servers host key, The diffie hellman e value, The diffie hellman f value, The diffie hellman k value. |
void |
init(TransportProtocol transport,
java.lang.String clientId,
java.lang.String serverId,
byte[] clientKexInit,
byte[] serverKexInit)
Called by the framework to initate the key exchange. |
protected void |
onMessageReceived(SshMessage msg)
Called by the framework when a registered message is received. |
void |
startClient()
Called by the framework to start the client side of the key exchange method. |
void |
startServer()
Called by the framework to start the server side of the key exchange |
Methods inherited from class com.sshtools.j2ssh.transport.kex.SshKeyExchange |
getState, run, setComplete, setFailed, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DhGroup1Sha1()
Method Detail |
public void init(TransportProtocol transport, java.lang.String clientId, java.lang.String serverId, byte[] clientKexInit, byte[] serverKexInit)
init
in class SshKeyExchange
transport
- The transport protocol object for sending/receivingclientId
- The client identication string from protocol
negotiationserverId
- The servers identification string from protocol
negotiationclientKexInit
- The clients SSH_MSG_KEX_INIT payloadserverKexInit
- The servers SSH_MSG_KEX_INIT payloadpublic void startClient() throws KeyExchangeException
startClient
in class SshKeyExchange
KeyExchangeException
- Thrown if a key exchange error occurspublic void startServer() throws KeyExchangeException
startServer
in class SshKeyExchange
KeyExchangeException
- Thrown if a key exchange error occursprotected void onMessageReceived(SshMessage msg)
onMessageReceived
in class SshKeyExchange
msg
- The message receivedprotected byte[] calculateExchangeHash(byte[] hostKey) throws KeyExchangeException
hostKey
- The servers host key
KeyExchangeException
- Thrown if an error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |