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
public interface KeyExchange extends NamedResource, SessionHolder<Session>
Key exchange algorithm.- Author:
- Apache MINA SSHD Project
-
-
Field Summary
Fields Modifier and Type Field Description static NavigableMap<Integer,String>
GROUP_KEX_OPCODES_MAP
static NavigableMap<Integer,String>
SIMPLE_KEX_OPCODES_MAP
-
Fields inherited from interface org.apache.sshd.common.NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTOR
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static String
getGroupKexOpcodeName(int cmd)
byte[]
getH()
Retrieves the computedh
parameterDigest
getHash()
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
next(int cmd, Buffer buffer)
Process the next packet-
Methods inherited from interface org.apache.sshd.common.NamedResource
getName
-
Methods inherited from interface org.apache.sshd.common.session.SessionHolder
getSession, getSessionContext
-
-
-
-
Field Detail
-
GROUP_KEX_OPCODES_MAP
static final NavigableMap<Integer,String> GROUP_KEX_OPCODES_MAP
-
SIMPLE_KEX_OPCODES_MAP
static final NavigableMap<Integer,String> SIMPLE_KEX_OPCODES_MAP
-
-
Method Detail
-
init
void init(byte[] v_s, byte[] v_c, byte[] i_s, byte[] i_c) throws Exception
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
boolean next(int cmd, Buffer buffer) throws Exception
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
static String getGroupKexOpcodeName(int cmd)
-
getSimpleKexOpcodeName
static String getSimpleKexOpcodeName(int cmd)
-
isValidDHValue
static boolean isValidDHValue(BigInteger value, BigInteger p)
-
-