public class Curve25519SHA256Client extends SshKeyExchangeClient
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CURVE25519_SHA2 |
java.lang.String |
name |
static int |
SSH_MSG_KEX_ECDH_INIT |
static int |
SSH_MSG_KEX_ECDH_REPLY |
exchangeHash, firstPacketFollows, hostKey, key, secret, signature, transport, useFirstPacket
Modifier | Constructor and Description |
---|---|
|
Curve25519SHA256Client() |
protected |
Curve25519SHA256Client(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
protected void |
calculateExchangeHash()
Calculates the exchange hash as an SHA1 hash of the following data.
|
java.lang.String |
getAlgorithm() |
java.lang.String |
getProvider() |
void |
init(com.sshtools.synergy.ssh.SshTransport<SshClientContext> transport,
java.lang.String clientId,
java.lang.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 message
|
void |
test() |
getExchangeHash, getHashAlgorithm, getHostKey, getPriority, getSecret, getSecurityLevel, getSignature, hasReceivedNewKeys, hasSentNewKeys, isComplete, reset, setReceivedNewKeys, setSentNewKeys
public static final int SSH_MSG_KEX_ECDH_INIT
public static final int SSH_MSG_KEX_ECDH_REPLY
public static final java.lang.String CURVE25519_SHA2
public final java.lang.String name
public Curve25519SHA256Client()
protected Curve25519SHA256Client(java.lang.String name)
public java.lang.String getAlgorithm()
public void test()
public void init(com.sshtools.synergy.ssh.SshTransport<SshClientContext> transport, java.lang.String clientId, java.lang.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 java.io.IOException, com.sshtools.common.ssh.SshException
java.io.IOException
com.sshtools.common.ssh.SshException
public boolean processMessage(byte[] resp) throws com.sshtools.common.ssh.SshException, java.io.IOException
SshKeyExchangeClient
processMessage
in interface com.sshtools.synergy.ssh.components.SshKeyExchange<SshClientContext>
processMessage
in class SshKeyExchangeClient
com.sshtools.common.ssh.SshException
java.io.IOException
protected void calculateExchangeHash() throws com.sshtools.common.ssh.SshException
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
calculateExchangeHash
in class SshKeyExchangeClient
com.sshtools.common.ssh.SshException
public java.lang.String getProvider()
Copyright © 2022. All rights reserved.