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

public class Curve25519SHA256Client extends SshKeyExchangeClient
  • Field Details

  • Constructor Details

    • Curve25519SHA256Client

      public Curve25519SHA256Client()
    • Curve25519SHA256Client

      protected Curve25519SHA256Client(String name)
  • Method Details

    • getAlgorithm

      public String 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

      public boolean processMessage(byte[] resp) throws com.sshtools.common.ssh.SshException, IOException
      Description copied from class: SshKeyExchangeClient
      Process a key exchange message
      Specified by:
      processMessage in interface com.sshtools.synergy.ssh.components.SshKeyExchange<SshClientContext>
      Specified by:
      processMessage in class SshKeyExchangeClient
      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.SshException
      Description 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 class SshKeyExchangeClient
      Throws:
      com.sshtools.common.ssh.SshException
    • getProvider

      public String getProvider()