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 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 transportV_S
- the server identification stringV_C
- the client identification stringI_S
- the server key init packetI_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 identifierbuffer
- 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
-
-