|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.maverick.sshd.components.SshKeyExchangeServer
com.maverick.sshd.components.standalone.DiffieHellmanGroup14Sha1Server
public class DiffieHellmanGroup14Sha1Server
Implementation of the required SSH Transport Protocol key exchange method "diffie-hellman-group1-sha1".
| Field Summary | |
|---|---|
static java.lang.String |
DIFFIE_HELLMAN_GROUP14_SHA1
Constant for the algorithm name "diffie-hellman-group1-sha1". |
| Fields inherited from class com.maverick.sshd.components.SshKeyExchangeServer |
|---|
clientId, clientKexInit, exchangeHash, firstPacketFollows, hostKey, prvkey, pubkey, secret, serverId, serverKexInit, signature, transport, useFirstPacket |
| Constructor Summary | |
|---|---|
DiffieHellmanGroup14Sha1Server()
Construct an uninitialized instance. |
|
| Method Summary | |
|---|---|
protected void |
calculateExchangeHash()
Calculates the exchange hash as an SHA1 hash of the following data. |
boolean |
exchangeGroup(byte[] msg)
Exchange groups |
java.lang.String |
getAlgorithm()
Get the algorithm name for this key exchange |
void |
init(TransportProtocol transport,
java.lang.String clientId,
java.lang.String serverId,
byte[] clientKexInit,
byte[] serverKexInit,
SshPrivateKey prvkey,
SshPublicKey pubkey,
boolean firstPacketFollows,
boolean useFirstPacket)
Initialize the server side key exchange. |
boolean |
processMessage(byte[] msg)
Process a key exchange message |
| Methods inherited from class com.maverick.sshd.components.SshKeyExchangeServer |
|---|
getExchangeHash, getHostKey, getSecret, getSignature, hasReceivedNewKeys, hasSentNewKeys, reset, setReceivedNewKeys, setSentNewKeys |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DIFFIE_HELLMAN_GROUP14_SHA1
| Constructor Detail |
|---|
public DiffieHellmanGroup14Sha1Server()
| Method Detail |
|---|
public java.lang.String getAlgorithm()
getAlgorithm in class SshKeyExchangeServer
public void init(TransportProtocol transport,
java.lang.String clientId,
java.lang.String serverId,
byte[] clientKexInit,
byte[] serverKexInit,
SshPrivateKey prvkey,
SshPublicKey pubkey,
boolean firstPacketFollows,
boolean useFirstPacket)
throws java.io.IOException
SshKeyExchangeServer
init in class SshKeyExchangeServerjava.io.IOException
public boolean processMessage(byte[] msg)
throws SshException,
java.io.IOException
SshKeyExchangeServer
processMessage in class SshKeyExchangeServerjava.io.IOException
SshException
protected void calculateExchangeHash()
throws SshException
Calculates the exchange hash as an SHA1 hash of the following data.
String the client's version string (CR and NL excluded) String the server's version string (CR and NL excluded) String the payload of the client's SSH_MSG_KEXINIT String the payload of the server's SSH_MSG_KEXINIT String the host key BigInteger e, exchange value sent by the client BigInteger f, exchange value sent by the server BigInteger K, the shared secret
java.io.IOException
SshException
public boolean exchangeGroup(byte[] msg)
throws SshException,
java.io.IOException
SshKeyExchangeServer
exchangeGroup in class SshKeyExchangeServerSshException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||