Interface KeyExchange

    • Method Summary

      Modifier and Type Method Description
      byte[] getH()  
      Digest getHash()
      The message digest used by this key exchange algorithm.
      java.security.PublicKey getHostKey()  
      java.math.BigInteger getK()  
      void init​(Transport trans, java.lang.String V_S, java.lang.String V_C, byte[] I_S, byte[] I_C)
      Initialize the key exchange algorithm.
      boolean next​(Message msg, SSHPacket buffer)
      Process the next packet
    • Method Detail

      • init

        void init​(Transport trans,
                  java.lang.String V_S,
                  java.lang.String V_C,
                  byte[] I_S,
                  byte[] I_C)
           throws java.security.GeneralSecurityException,
                  TransportException
        Initialize the key exchange algorithm.
        Parameters:
        trans - the transport
        V_S - the server identification string
        V_C - the client identification string
        I_S - the server key init packet
        I_C - the client key init packet
        Throws:
        java.security.GeneralSecurityException
        TransportException - if there is an error sending a packet
      • getH

        byte[] getH()
        Returns:
        the computed H parameter
      • getK

        java.math.BigInteger getK()
        Returns:
        the computed K parameter
      • getHash

        Digest getHash()
        The message digest used by this key exchange algorithm.
        Returns:
        the message digest
      • getHostKey

        java.security.PublicKey getHostKey()
        Returns:
        the host key determined from server's response packets
      • next

        boolean next​(Message msg,
                     SSHPacket buffer)
              throws java.security.GeneralSecurityException,
                     TransportException
        Process the next packet
        Parameters:
        msg - message identifier
        buffer - the packet
        Returns:
        a boolean indicating if the processing is complete or if more packets are to be received
        Throws:
        java.security.GeneralSecurityException
        TransportException - if there is an error sending a packet