Package com.sshtools.client.components
Class Curve25519SHA256Client
java.lang.Object
com.sshtools.client.SshKeyExchangeClient
com.sshtools.client.components.Curve25519SHA256Client
- All Implemented Interfaces:
Component,SshComponent,SecureComponent,SshKeyExchange<SshClientContext>
- Direct Known Subclasses:
Curve25519SHA256LibSshClient
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringfinal Stringstatic final intstatic final intFields inherited from class com.sshtools.client.SshKeyExchangeClient
exchangeHash, firstPacketFollows, hostKey, key, secret, signature, transport, useFirstPacket -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidCalculates the exchange hash as an SHA1 hash of the following data.voidinit(SshTransport<SshClientContext> transport, String clientId, String serverId, byte[] clientKexInit, byte[] serverKexInit, SshPrivateKey prvkey, SshPublicKey pubkey, boolean firstPacketFollows, boolean useFirstPacket) booleanprocessMessage(byte[] resp) Process a key exchange messagevoidtest()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(SshTransport<SshClientContext> transport, String clientId, String serverId, byte[] clientKexInit, byte[] serverKexInit, SshPrivateKey prvkey, SshPublicKey pubkey, boolean firstPacketFollows, boolean useFirstPacket) throws IOException, SshException - Throws:
IOExceptionSshException
-
processMessage
Description copied from class:SshKeyExchangeClientProcess a key exchange message- Specified by:
processMessagein interfaceSshKeyExchange<SshClientContext>- Specified by:
processMessagein classSshKeyExchangeClient- Returns:
- boolean, indicating whether it has processed the message or not
- Throws:
SshExceptionIOException
-
calculateExchangeHash
Description copied from class:SshKeyExchangeClientCalculates 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:
calculateExchangeHashin classSshKeyExchangeClient- Throws:
SshException
-
getProvider
-