public abstract class AbstractDHKeyExchange extends AbstractLoggingBean implements KeyExchange
Modifier and Type | Field and Description |
---|---|
private byte[] |
e |
private java.math.BigInteger |
eValue |
private byte[] |
f |
private java.math.BigInteger |
fValue |
protected byte[] |
h |
protected Digest |
hash |
protected byte[] |
i_c |
protected byte[] |
i_s |
protected byte[] |
k |
private Session |
session |
protected byte[] |
v_c |
protected byte[] |
v_s |
log
GROUP_KEX_OPCODES_MAP, SIMPLE_KEX_OPCODES_MAP
BY_NAME_COMPARATOR, NAME_EXTRACTOR
Modifier | Constructor and Description |
---|---|
protected |
AbstractDHKeyExchange(Session session) |
Modifier and Type | Method and Description |
---|---|
protected byte[] |
getE() |
protected java.math.BigInteger |
getEValue() |
protected byte[] |
getF() |
protected java.math.BigInteger |
getFValue() |
byte[] |
getH()
Retrieves the computed
h parameter |
Digest |
getHash()
The message digest used by this key exchange algorithm.
|
byte[] |
getK()
Retrieves the computed k parameter
|
Session |
getSession() |
void |
init(byte[] v_s,
byte[] v_c,
byte[] i_s,
byte[] i_c)
Initialize the key exchange algorithm.
|
protected void |
setE(byte[] e) |
protected void |
setF(byte[] f) |
java.lang.String |
toString() |
protected byte[] |
updateE(Buffer buffer) |
protected byte[] |
updateE(byte[] mpInt) |
protected byte[] |
updateF(Buffer buffer) |
protected byte[] |
updateF(byte[] mpInt) |
protected void |
validateEValue(java.math.BigInteger pValue) |
protected void |
validateFValue(java.math.BigInteger pValue) |
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getGroupKexOpcodeName, getSimpleKexOpcodeName, isValidDHValue, next
findByName, findFirstMatchByName, getName, getNameList, getNames, ofName, removeByName, safeCompareByName
getSessionContext
protected byte[] v_s
protected byte[] v_c
protected byte[] i_s
protected byte[] i_c
protected Digest hash
protected byte[] k
protected byte[] h
private byte[] e
private java.math.BigInteger eValue
private byte[] f
private java.math.BigInteger fValue
private final Session session
protected AbstractDHKeyExchange(Session session)
public void init(byte[] v_s, byte[] v_c, byte[] i_s, byte[] i_c) throws java.lang.Exception
KeyExchange
init
in interface KeyExchange
v_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 Session getSession()
getSession
in interface SessionHolder<Session>
public Digest getHash()
KeyExchange
getHash
in interface KeyExchange
public byte[] getH()
KeyExchange
h
parametergetH
in interface KeyExchange
h
parameterpublic byte[] getK()
KeyExchange
getK
in interface KeyExchange
k
parameterprotected byte[] getE()
protected java.math.BigInteger getEValue()
protected byte[] updateE(Buffer buffer)
protected byte[] updateE(byte[] mpInt)
protected void setE(byte[] e)
protected void validateEValue(java.math.BigInteger pValue) throws java.lang.Exception
java.lang.Exception
protected byte[] getF()
protected java.math.BigInteger getFValue()
protected byte[] updateF(Buffer buffer)
protected byte[] updateF(byte[] mpInt)
protected void setF(byte[] f)
protected void validateFValue(java.math.BigInteger pValue) throws java.lang.Exception
java.lang.Exception
public java.lang.String toString()
toString
in class java.lang.Object