Package org.apache.sshd.common.kex
Interface KeyExchange
- All Superinterfaces:
NamedResource,SessionContextHolder,SessionHolder<Session>
- All Known Implementing Classes:
AbstractDHClientKeyExchange,AbstractDHKeyExchange,AbstractDHServerKeyExchange,DHGClient,DHGEXClient,DHGEXServer,DHGServer
Key exchange algorithm.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final NavigableMap<Integer, String> static final NavigableMap<Integer, String> Fields inherited from interface org.apache.sshd.common.NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTOR -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetGroupKexOpcodeName(int cmd) byte[]getH()Retrieves the computedhparametergetHash()The message digest used by this key exchange algorithm.byte[]getK()Retrieves the computed k parameterstatic StringgetSimpleKexOpcodeName(int cmd) voidinit(byte[] v_s, byte[] v_c, byte[] i_s, byte[] i_c) Initialize the key exchange algorithm.static booleanisValidDHValue(BigInteger value, BigInteger p) booleanProcess the next packetMethods inherited from interface org.apache.sshd.common.NamedResource
getNameMethods inherited from interface org.apache.sshd.common.session.SessionHolder
getSession, getSessionContext
-
Field Details
-
GROUP_KEX_OPCODES_MAP
-
SIMPLE_KEX_OPCODES_MAP
-
-
Method Details
-
init
Initialize the key exchange algorithm.- 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
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
-
getHash
Digest getHash()The message digest used by this key exchange algorithm.- Returns:
- the message digest
-
getH
byte[] getH()Retrieves the computedhparameter- Returns:
- The
hparameter
-
getK
byte[] getK()Retrieves the computed k parameter- Returns:
- The
kparameter
-
getGroupKexOpcodeName
-
getSimpleKexOpcodeName
-
isValidDHValue
-