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.
- Author:
- Apache MINA SSHD Project
-
Field Summary
Modifier 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 String
getGroupKexOpcodeName
(int cmd) byte[]
getH()
Retrieves the computedh
parametergetHash()
The message digest used by this key exchange algorithm.byte[]
getK()
Retrieves the computed k parameterstatic String
getSimpleKexOpcodeName
(int cmd) void
init
(byte[] v_s, byte[] v_c, byte[] i_s, byte[] i_c) Initialize the key exchange algorithm.static boolean
isValidDHValue
(BigInteger value, BigInteger p) boolean
Process the next packetMethods inherited from interface org.apache.sshd.common.NamedResource
getName
Methods 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 computedh
parameter- Returns:
- The
h
parameter
-
getK
byte[] getK()Retrieves the computed k parameter- Returns:
- The
k
parameter
-
getGroupKexOpcodeName
-
getSimpleKexOpcodeName
-
isValidDHValue
-