Package org.apache.sshd.common.kex.dh
Class AbstractDHKeyExchange
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.common.kex.dh.AbstractDHKeyExchange
- All Implemented Interfaces:
KeyExchange
,NamedResource
,SessionContextHolder
,SessionHolder<Session>
- Direct Known Subclasses:
AbstractDHClientKeyExchange
,AbstractDHServerKeyExchange
- Author:
- Apache MINA SSHD Project
-
Field Summary
Modifier and TypeFieldDescriptionprotected byte[]
protected Digest
protected byte[]
protected byte[]
protected byte[]
protected byte[]
protected byte[]
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
Fields inherited from interface org.apache.sshd.common.kex.KeyExchange
GROUP_KEX_OPCODES_MAP, SIMPLE_KEX_OPCODES_MAP
Fields inherited from interface org.apache.sshd.common.NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTOR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]
getE()
protected BigInteger
protected byte[]
getF()
protected BigInteger
byte[]
getH()
Retrieves the computedh
parametergetHash()
The message digest used by this key exchange algorithm.byte[]
getK()
Retrieves the computed k parametervoid
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) toString()
protected byte[]
updateE
(byte[] mpInt) protected byte[]
protected byte[]
updateF
(byte[] mpInt) protected byte[]
protected void
validateEValue
(BigInteger pValue) protected void
validateFValue
(BigInteger pValue) Methods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.sshd.common.kex.KeyExchange
next
Methods inherited from interface org.apache.sshd.common.NamedResource
getName
Methods inherited from interface org.apache.sshd.common.session.SessionHolder
getSessionContext
-
Field Details
-
v_s
protected byte[] v_s -
v_c
protected byte[] v_c -
i_s
protected byte[] i_s -
i_c
protected byte[] i_c -
hash
-
k
protected byte[] k -
h
protected byte[] h
-
-
Constructor Details
-
AbstractDHKeyExchange
-
-
Method Details
-
init
Description copied from interface:KeyExchange
Initialize the key exchange algorithm.- Specified by:
init
in interfaceKeyExchange
- Parameters:
v_s
- the server identification stringv_c
- the client identification stringi_s
- the server key initialization packeti_c
- the client key initialization packet- Throws:
Exception
- if an error occurs
-
getSession
- Specified by:
getSession
in interfaceSessionHolder<Session>
-
getHash
Description copied from interface:KeyExchange
The message digest used by this key exchange algorithm.- Specified by:
getHash
in interfaceKeyExchange
- Returns:
- the message digest
-
getH
public byte[] getH()Description copied from interface:KeyExchange
Retrieves the computedh
parameter- Specified by:
getH
in interfaceKeyExchange
- Returns:
- The
h
parameter
-
getK
public byte[] getK()Description copied from interface:KeyExchange
Retrieves the computed k parameter- Specified by:
getK
in interfaceKeyExchange
- Returns:
- The
k
parameter
-
getE
protected byte[] getE() -
getEValue
-
updateE
-
updateE
protected byte[] updateE(byte[] mpInt) -
setE
protected void setE(byte[] e) -
validateEValue
- Throws:
SshException
-
getF
protected byte[] getF() -
getFValue
-
updateF
-
updateF
protected byte[] updateF(byte[] mpInt) -
setF
protected void setF(byte[] f) -
validateFValue
- Throws:
SshException
-
toString
-