Package com.sshtools.client.components
Class DiffieHellmanGroup
java.lang.Object
com.sshtools.client.SshKeyExchangeClient
com.sshtools.client.components.DiffieHellmanGroup
- All Implemented Interfaces:
com.sshtools.common.ssh.components.Component
,com.sshtools.common.ssh.components.SshComponent
,com.sshtools.common.ssh.SecureComponent
,com.sshtools.synergy.ssh.components.SshKeyExchange<SshClientContext>
- Direct Known Subclasses:
DiffieHellmanGroup14Sha1JCE
,DiffieHellmanGroup14Sha256JCE
,DiffieHellmanGroup15Sha512JCE
,DiffieHellmanGroup16Sha512JCE
,DiffieHellmanGroup17Sha512JCE
,DiffieHellmanGroup18Sha512JCE
,DiffieHellmanGroup1Sha1JCE
Implementation of the required SSH Transport Protocol key exchange method
"diffie-hellman-group14-sha1".
-
Field Summary
Fields inherited from class com.sshtools.client.SshKeyExchangeClient
clientId, clientKexInit, e, exchangeHash, f, firstPacketFollows, hostKey, key, secret, serverId, serverKexInit, signature, transport, useFirstPacket
-
Method Summary
Modifier and TypeMethodDescriptionGet the algorithm name for this key exchangevoid
init
(com.sshtools.synergy.ssh.SshTransport<SshClientContext> transport, String clientId, String serverId, byte[] clientKexInit, byte[] serverKexInit, com.sshtools.common.ssh.components.SshPrivateKey prvkey, com.sshtools.common.ssh.components.SshPublicKey pubkey, boolean firstPacketFollows, boolean useFirstPacket) boolean
isKeyExchangeMessage
(int messageid) boolean
processMessage
(byte[] m) Process a key exchange messagevoid
test()
Methods inherited from class com.sshtools.client.SshKeyExchangeClient
calculateExchangeHash, getExchangeHash, getHashAlgorithm, getHostKey, getPriority, getSecret, getSecurityLevel, getSignature, hasReceivedNewKeys, hasSentNewKeys, isComplete, reset, setReceivedNewKeys, setSentNewKeys
-
Method Details
-
getAlgorithm
Get the algorithm name for this key exchange- Returns:
- "diffie-hellman-group14-sha1"
-
init
public void init(com.sshtools.synergy.ssh.SshTransport<SshClientContext> transport, String clientId, String serverId, byte[] clientKexInit, byte[] serverKexInit, com.sshtools.common.ssh.components.SshPrivateKey prvkey, com.sshtools.common.ssh.components.SshPublicKey pubkey, boolean firstPacketFollows, boolean useFirstPacket) throws IOException, com.sshtools.common.ssh.SshException - Throws:
IOException
com.sshtools.common.ssh.SshException
-
getProvider
-
processMessage
Description copied from class:SshKeyExchangeClient
Process a key exchange message- Specified by:
processMessage
in interfacecom.sshtools.synergy.ssh.components.SshKeyExchange<SshClientContext>
- Specified by:
processMessage
in classSshKeyExchangeClient
- Returns:
- boolean, indicating whether it has processed the message or not
- Throws:
com.sshtools.common.ssh.SshException
IOException
-
isKeyExchangeMessage
public boolean isKeyExchangeMessage(int messageid) -
test
- Throws:
IOException
com.sshtools.common.ssh.SshException
-