public abstract class AbstractDHG extends java.lang.Object implements KeyExchange
DH
class in theConstructor and Description |
---|
AbstractDHG() |
Modifier and Type | Method and 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.
|
protected abstract void |
initDH(DH dh) |
boolean |
next(Message msg,
SSHPacket packet)
Process the next packet
|
public byte[] getH()
getH
in interface KeyExchange
public java.math.BigInteger getK()
getK
in interface KeyExchange
public Digest getHash()
KeyExchange
getHash
in interface KeyExchange
public java.security.PublicKey getHostKey()
getHostKey
in interface KeyExchange
public 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
KeyExchange
init
in interface KeyExchange
trans
- the transportV_S
- the server identification stringV_C
- the client identification stringI_S
- the server key init packetI_C
- the client key init packetjava.security.GeneralSecurityException
TransportException
- if there is an error sending a packetpublic boolean next(Message msg, SSHPacket packet) throws java.security.GeneralSecurityException, TransportException
KeyExchange
next
in interface KeyExchange
msg
- message identifierpacket
- the packetjava.security.GeneralSecurityException
TransportException
- if there is an error sending a packetprotected abstract void initDH(DH dh) throws java.security.GeneralSecurityException
java.security.GeneralSecurityException