Package org.apache.sshd.server.kex
Class DHGEXServer
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.common.kex.dh.AbstractDHKeyExchange
org.apache.sshd.server.kex.AbstractDHServerKeyExchange
org.apache.sshd.server.kex.DHGEXServer
- All Implemented Interfaces:
KeyExchange
,NamedResource
,SessionContextHolder
,SessionHolder<Session>
,ServerSessionHolder
- Author:
- Apache MINA SSHD Project
-
Field Summary
Modifier and TypeFieldDescriptionprotected DHG
protected byte
protected final DHFactory
protected int
protected int
protected boolean
protected int
Fields inherited from class org.apache.sshd.common.kex.dh.AbstractDHKeyExchange
h, hash, i_c, i_s, k, v_c, v_s
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 DHG
chooseDH
(int min, int prf, int max) protected DHG
getDH
(BigInteger p, BigInteger g) final String
getName()
void
init
(byte[] v_s, byte[] v_c, byte[] i_s, byte[] i_c) Initialize the key exchange algorithm.protected List<Moduli.DhGroup>
loadModuliGroups
(ServerSession session) static KeyExchangeFactory
newFactory
(DHFactory factory) boolean
Process the next packetprotected List<Moduli.DhGroup>
selectModuliGroups
(ServerSession session, int min, int prf, int max, List<Moduli.DhGroup> groups) Methods inherited from class org.apache.sshd.server.kex.AbstractDHServerKeyExchange
getServerSession
Methods inherited from class org.apache.sshd.common.kex.dh.AbstractDHKeyExchange
getE, getEValue, getF, getFValue, getH, getHash, getK, getSession, setE, setF, toString, updateE, updateE, updateF, updateF, validateEValue, validateFValue
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.session.SessionHolder
getSessionContext
-
Field Details
-
factory
-
dh
-
min
protected int min -
prf
protected int prf -
max
protected int max -
expected
protected byte expected -
oldRequest
protected boolean oldRequest
-
-
Constructor Details
-
DHGEXServer
-
-
Method Details
-
getName
-
newFactory
-
init
Description copied from interface:KeyExchange
Initialize the key exchange algorithm.- Specified by:
init
in interfaceKeyExchange
- Overrides:
init
in classAbstractDHKeyExchange
- 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
-
next
Description copied from interface:KeyExchange
Process the next packet- Parameters:
cmd
- the commandbuffer
- the packet contents positioned after the command- Returns:
- a boolean indicating if the processing is complete or if more packets are to be received
- Throws:
Exception
- if an error occurs
-
chooseDH
- Throws:
Exception
-
selectModuliGroups
protected List<Moduli.DhGroup> selectModuliGroups(ServerSession session, int min, int prf, int max, List<Moduli.DhGroup> groups) throws Exception - Throws:
Exception
-
loadModuliGroups
- Throws:
IOException
-
getDH
- Throws:
Exception
-