Package com.sshtools.client.components
Class Curve25519SHA256Client
java.lang.Object
com.sshtools.client.SshKeyExchangeClient
com.sshtools.client.components.Curve25519SHA256Client
- 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:
Curve25519SHA256LibSshClient
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
final String
static final int
static final int
Fields inherited from class com.sshtools.client.SshKeyExchangeClient
exchangeHash, firstPacketFollows, hostKey, key, secret, signature, transport, useFirstPacket
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Calculates the exchange hash as an SHA1 hash of the following data.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) boolean
processMessage
(byte[] resp) Process a key exchange messagevoid
test()
Methods inherited from class com.sshtools.client.SshKeyExchangeClient
getExchangeHash, getHashAlgorithm, getHostKey, getPriority, getSecret, getSecurityLevel, getSignature, hasReceivedNewKeys, hasSentNewKeys, isComplete, reset, setReceivedNewKeys, setSentNewKeys
-
Field Details
-
SSH_MSG_KEX_ECDH_INIT
public static final int SSH_MSG_KEX_ECDH_INIT- See Also:
-
SSH_MSG_KEX_ECDH_REPLY
public static final int SSH_MSG_KEX_ECDH_REPLY- See Also:
-
CURVE25519_SHA2
- See Also:
-
name
-
-
Constructor Details
-
Curve25519SHA256Client
public Curve25519SHA256Client() -
Curve25519SHA256Client
-
-
Method Details
-
getAlgorithm
-
test
public void test() -
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
-
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
-
calculateExchangeHash
protected void calculateExchangeHash() throws com.sshtools.common.ssh.SshExceptionDescription copied from class:SshKeyExchangeClient
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
- Overrides:
calculateExchangeHash
in classSshKeyExchangeClient
- Throws:
com.sshtools.common.ssh.SshException
-
getProvider
-