Package net.schmizz.sshj.transport.kex
Interface KeyExchange
- All Known Implementing Classes:
AbstractDH
,AbstractDHG
,AbstractDHGex
,Curve25519SHA256
,DHG
,DHG1
,DHG14
,DHGexSHA1
,DHGexSHA256
,ECDHNistP
,KeyExchangeBase
public interface KeyExchange
Key exchange algorithm.
-
Method Details
-
init
void init(Transport trans, String V_S, String V_C, byte[] I_S, byte[] I_C) throws GeneralSecurityException, TransportException Initialize the key exchange algorithm.- Parameters:
trans
- the transportV_S
- the server identification stringV_C
- the client identification stringI_S
- the server key init packetI_C
- the client key init packet- Throws:
GeneralSecurityException
TransportException
- if there is an error sending a packet
-
getH
byte[] getH()- Returns:
- the computed H parameter
-
getK
BigInteger getK()- Returns:
- the computed K parameter
-
getHash
Digest getHash()The message digest used by this key exchange algorithm.- Returns:
- the message digest
-
getHostKey
PublicKey getHostKey()- Returns:
- the host key determined from server's response packets
-
next
Process the next packet- Parameters:
msg
- message identifierbuffer
- the packet- Returns:
- a boolean indicating if the processing is complete or if more packets are to be received
- Throws:
GeneralSecurityException
TransportException
- if there is an error sending a packet
-