public class DiffieHellmanGroup14Sha1JCE extends SshKeyExchangeServer implements com.maverick.ssh.components.jce.AbstractKeyExchange
Implementation of the required SSH Transport Protocol key exchange method "diffie-hellman-group14-sha1".
| Modifier and Type | Field and Description |
|---|---|
static String |
DIFFIE_HELLMAN_GROUP14_SHA1
Constant for the algorithm name "diffie-hellman-group14-sha1".
|
clientId, clientKexInit, exchangeHash, firstPacketFollows, hostKey, prvkey, pubkey, secret, serverId, serverKexInit, session, signature, transport, useFirstPacket| Constructor and Description |
|---|
DiffieHellmanGroup14Sha1JCE()
Construct an uninitialized instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
calculateExchangeHash()
Calculates the exchange hash as an SHA1 hash of the following data.
|
String |
getName()
Get the algorithm name for this key exchange
|
String |
getProvider() |
void |
init(org.apache.mina.core.session.IoSession session,
SshTransport transport,
String clientId,
String serverId,
byte[] clientKexInit,
byte[] serverKexInit,
com.maverick.ssh.components.SshPrivateKey prvkey,
com.maverick.ssh.components.SshPublicKey pubkey,
boolean firstPacketFollows,
boolean useFirstPacket)
Initialize the server side key exchange.
|
boolean |
processMessage(byte[] msg)
Process a key exchange message
|
getExchangeHash, getHostKey, getSecret, getSignature, hasReceivedNewKeys, hasSentNewKeys, reset, setReceivedNewKeys, setSentNewKeyspublic static final String DIFFIE_HELLMAN_GROUP14_SHA1
public DiffieHellmanGroup14Sha1JCE()
public String getName()
getName in interface com.maverick.ssh.components.SshComponentgetName in class SshKeyExchangeServerpublic void init(org.apache.mina.core.session.IoSession session,
SshTransport transport,
String clientId,
String serverId,
byte[] clientKexInit,
byte[] serverKexInit,
com.maverick.ssh.components.SshPrivateKey prvkey,
com.maverick.ssh.components.SshPublicKey pubkey,
boolean firstPacketFollows,
boolean useFirstPacket)
throws IOException
SshKeyExchangeServerinit in class SshKeyExchangeServerIOExceptionpublic String getProvider()
getProvider in interface com.maverick.ssh.components.jce.AbstractKeyExchangepublic boolean processMessage(byte[] msg)
throws com.maverick.ssh.SshException,
IOException
SshKeyExchangeServerprocessMessage in class SshKeyExchangeServerIOExceptioncom.maverick.ssh.SshExceptionprotected void calculateExchangeHash()
throws com.maverick.ssh.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
IOExceptioncom.maverick.ssh.SshExceptionCopyright © 2012. All Rights Reserved.