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 |
static java.lang.String |
PROP_DHGEX_SERVER_MAX_KEY |
static java.lang.String |
PROP_DHGEX_SERVER_MIN_KEY |
e, f, 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(java.math.BigInteger p,
java.math.BigInteger g) |
java.lang.String |
getName() |
void |
init(byte[] v_s,
byte[] v_c,
byte[] i_s,
byte[] i_c)
Initialize the key exchange algorithm.
|
protected java.util.List<Moduli.DhGroup> |
loadModuliGroups() |
static KeyExchangeFactory |
newFactory(DHFactory factory) |
boolean |
next(int cmd,
Buffer buffer)
Process the next packet
|
getServerKey, getServerSessiongetH, getHash, getK, getSession, toStringgetSimplifiedLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetGroupKexOpcodeName, getSimpleKexOpcodeNamefindByName, getNameList, getNames, ofName, removeByNamegetSessionContextpublic static final java.lang.String PROP_DHGEX_SERVER_MIN_KEY
public static final java.lang.String PROP_DHGEX_SERVER_MAX_KEY
protected final DHFactory factory
protected DHG dh
protected int min
protected int prf
protected int max
protected byte expected
protected boolean oldRequest
public final java.lang.String getName()
public static KeyExchangeFactory newFactory(DHFactory factory)
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 DHG chooseDH(int min, int prf, int max) throws java.lang.Exception
java.lang.Exceptionprotected java.util.List<Moduli.DhGroup> loadModuliGroups() throws java.io.IOException
java.io.IOExceptionprotected DHG getDH(java.math.BigInteger p, java.math.BigInteger g) throws java.lang.Exception
java.lang.Exception