public class DHGEXServer extends AbstractDHServerKeyExchange
| Modifier and Type | Field and Description |
|---|---|
protected DHG |
dh |
protected byte |
expected |
protected DHFactory |
factory |
protected int |
max |
protected int |
min |
protected boolean |
oldRequest |
protected int |
prf |
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 |
DHGEXServer(DHFactory factory,
Session session) |
| Modifier and Type | Method and Description |
|---|---|
protected DHG |
chooseDH(int min,
int prf,
int max) |
protected DHG |
getDH(BigInteger p,
BigInteger g) |
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 |
next(int cmd,
Buffer buffer)
Process the next packet
|
protected List<Moduli.DhGroup> |
selectModuliGroups(ServerSession session,
int min,
int prf,
int max,
List<Moduli.DhGroup> groups) |
getServerSessiongetE, 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 DHG dh
protected int min
protected int prf
protected int max
protected byte expected
protected boolean oldRequest
public final String getName()
public static KeyExchangeFactory newFactory(DHFactory factory)
public void init(byte[] v_s,
byte[] v_c,
byte[] i_s,
byte[] i_c)
throws 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 packetException - if an error occurspublic boolean next(int cmd,
Buffer buffer)
throws Exception
KeyExchangecmd - the commandbuffer - the packet contents positioned after the commandException - if an error occursprotected List<Moduli.DhGroup> selectModuliGroups(ServerSession session, int min, int prf, int max, List<Moduli.DhGroup> groups) throws Exception
Exceptionprotected List<Moduli.DhGroup> loadModuliGroups(ServerSession session) throws IOException
IOExceptionprotected DHG getDH(BigInteger p, BigInteger g) throws Exception
ExceptionCopyright © 2008–2021 The Apache Software Foundation. All rights reserved.