public class DHGEX extends KeyExchange
diffie-hellman-group-exchange-sha1
,
allowing the server to propose a group (i.e. prime number
and generator) in which the calculations
for key exchange will be done.
For the actual cryptographic calculations we
delegate to an implementation of DH
.Constructor and Description |
---|
DHGEX() |
Modifier and Type | Method and Description |
---|---|
protected int |
check2048(Class c,
int _max) |
int |
getState()
returns the identifier of the next SSH packet expected,
or
KeyExchange.STATE_END if the KeyExchange was already
successfully finished. |
void |
init(Session session,
byte[] V_S,
byte[] V_C,
byte[] I_S,
byte[] I_C)
Initializes the key exchange object.
|
boolean |
next(Buffer _buf)
Does the next step in the key exchange algorithm.
|
getFingerPrint, getKeyAlgorithName, getKeyType, guess, normalize, verify
protected String hash
public void init(Session session, byte[] V_S, byte[] V_C, byte[] I_S, byte[] I_C) throws Exception
KeyExchange
init
in class KeyExchange
session
- the session object.V_S
- the server's identification string sent before negotiationV_C
- the client's identification string sent before negotiationI_S
- the server's complete SSH_MSG_KEXINIT message.I_C
- the server's complete SSH_MSG_KEXINIT message.Exception
public boolean next(Buffer _buf) throws Exception
KeyExchange
next
in class KeyExchange
_buf
- the received packet. It will have the same
message-type as KeyExchange.getState()
returned before.Exception
public int getState()
KeyExchange
KeyExchange.STATE_END
if the KeyExchange was already
successfully finished.getState
in class KeyExchange
This is an inofficial Javadoc created by PaĆlo Ebermann. Have a look at the official homepage.