public class DHGEXClient extends AbstractDHClientKeyExchange
| Modifier and Type | Field and Description |
|---|---|
protected AbstractDH |
dh |
protected byte |
expected |
protected DHFactory |
factory |
protected byte[] |
g |
protected int |
max |
protected int |
min |
private byte[] |
p |
protected int |
prf |
private java.math.BigInteger |
pValue |
h, hash, i_c, i_s, k, v_c, v_slogGROUP_KEX_OPCODES_MAP, SIMPLE_KEX_OPCODES_MAPBY_NAME_COMPARATOR, NAME_EXTRACTOR| Modifier | Constructor and Description |
|---|---|
protected |
DHGEXClient(DHFactory factory,
Session session) |
| Modifier and Type | Method and Description |
|---|---|
protected AbstractDH |
getDH(java.math.BigInteger p,
java.math.BigInteger g) |
java.lang.String |
getName() |
protected byte[] |
getP() |
protected java.math.BigInteger |
getPValue() |
void |
init(byte[] v_s,
byte[] v_c,
byte[] i_s,
byte[] i_c)
Initialize the key exchange algorithm.
|
static KeyExchangeFactory |
newFactory(DHFactory delegate) |
boolean |
next(int cmd,
Buffer buffer)
Process the next packet
|
protected void |
setP(byte[] p) |
protected void |
validateEValue() |
protected void |
validateFValue() |
getClientSessiongetE, getEValue, getF, getFValue, getH, getHash, getK, getSession, setE, setF, toString, updateE, updateE, updateF, updateF, validateEValue, validateFValuedebug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warnclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetGroupKexOpcodeName, getSimpleKexOpcodeName, isValidDHValuefindByName, findFirstMatchByName, getNameList, getNames, ofName, removeByName, safeCompareByNamegetSessionContextprotected final DHFactory factory
protected byte expected
protected int min
protected int prf
protected int max
protected AbstractDH dh
protected byte[] g
private byte[] p
private java.math.BigInteger pValue
public final java.lang.String getName()
protected byte[] getP()
protected java.math.BigInteger getPValue()
protected void setP(byte[] p)
protected void validateEValue()
throws java.lang.Exception
java.lang.Exceptionprotected void validateFValue()
throws java.lang.Exception
java.lang.Exceptionpublic static KeyExchangeFactory newFactory(DHFactory delegate)
public void init(byte[] v_s,
byte[] v_c,
byte[] i_s,
byte[] i_c)
throws java.lang.Exception
KeyExchangeinit in interface KeyExchangeinit in class AbstractDHKeyExchangev_s - the server identification stringv_c - the client identification stringi_s - the server key initialization packeti_c - the client key initialization packetjava.lang.Exception - if an error occurspublic boolean next(int cmd,
Buffer buffer)
throws java.lang.Exception
KeyExchangecmd - the commandbuffer - the packet contents positioned after the commandjava.lang.Exception - if an error occursprotected AbstractDH getDH(java.math.BigInteger p, java.math.BigInteger g) throws java.lang.Exception
java.lang.Exception