public interface

KeyExchange

net.schmizz.sshj.transport.kex.KeyExchange
Known Indirect Subclasses

Class Overview

Key exchange algorithm.

Summary

Public Methods
abstract byte[] getH()
abstract Digest getHash()
The message digest used by this key exchange algorithm.
abstract PublicKey getHostKey()
abstract BigInteger getK()
abstract void init(Transport trans, String V_S, String V_C, byte[] I_S, byte[] I_C)
Initialize the key exchange algorithm.
abstract boolean next(Message msg, SSHPacket buffer)
Process the next packet

Public Methods

public abstract byte[] getH ()

Returns
  • the computed H parameter

public abstract Digest getHash ()

The message digest used by this key exchange algorithm.

Returns
  • the message digest

public abstract PublicKey getHostKey ()

Returns
  • the host key determined from server's response packets

public abstract BigInteger getK ()

Returns
  • the computed K parameter

public abstract void init (Transport trans, String V_S, String V_C, byte[] I_S, byte[] I_C)

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
TransportException if there is an error sending a packet
GeneralSecurityException

public abstract boolean next (Message msg, SSHPacket buffer)

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
TransportException if there is an error sending a packet
GeneralSecurityException