Package net.schmizz.sshj.transport.kex
Class AbstractDHGex
java.lang.Object
net.schmizz.sshj.transport.kex.KeyExchangeBase
net.schmizz.sshj.transport.kex.AbstractDH
net.schmizz.sshj.transport.kex.AbstractDHGex
- All Implemented Interfaces:
KeyExchange
- Direct Known Subclasses:
DHGexSHA1
,DHGexSHA256
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.Logger
private final int
private final int
private final int
Fields inherited from class net.schmizz.sshj.transport.kex.AbstractDH
dh
Fields inherited from class net.schmizz.sshj.transport.kex.KeyExchangeBase
digest, H, hostKey, trans
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Initialize the key exchange algorithm.boolean
Process the next packetprivate boolean
parseGexGroup
(SSHPacket buffer) private boolean
parseGexReply
(SSHPacket buffer) Methods inherited from class net.schmizz.sshj.transport.kex.AbstractDH
getK
Methods inherited from class net.schmizz.sshj.transport.kex.KeyExchangeBase
getH, getHash, getHostKey, initializedBuffer
-
Field Details
-
log
private final org.slf4j.Logger log -
minBits
private final int minBits- See Also:
-
maxBits
private final int maxBits- See Also:
-
preferredBits
private final int preferredBits- See Also:
-
-
Constructor Details
-
AbstractDHGex
-
-
Method Details
-
init
public void init(Transport trans, String V_S, String V_C, byte[] I_S, byte[] I_C) throws GeneralSecurityException, TransportException Description copied from interface:KeyExchange
Initialize the key exchange algorithm.- Specified by:
init
in interfaceKeyExchange
- Overrides:
init
in classKeyExchangeBase
- 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
-
next
public boolean next(Message msg, SSHPacket buffer) throws GeneralSecurityException, TransportException Description copied from interface:KeyExchange
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
-
parseGexReply
private boolean parseGexReply(SSHPacket buffer) throws Buffer.BufferException, GeneralSecurityException, TransportException -
parseGexGroup
private boolean parseGexGroup(SSHPacket buffer) throws Buffer.BufferException, GeneralSecurityException, TransportException
-