Top Description Fields Methods
org.apache.sshd.common.kex

public Interface KeyExchange

extends NamedResource, SessionHolder<Session>
Known Direct Implementers
org.apache.sshd.common.kex.dh.AbstractDHKeyExchange
Imports
java.math.BigInteger, java.util.Collections, .NavigableMap, org.apache.sshd.common.NamedResource, .SshConstants, org.apache.sshd.common.digest.Digest, org.apache.sshd.common.session.Session, .SessionHolder, org.apache.sshd.common.util.GenericUtils, org.apache.sshd.common.util.buffer.Buffer, org.apache.sshd.common.util.logging.LoggingUtils

Key exchange algorithm.
Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
public static final NavigableMap<Integer, String>
public static final NavigableMap<Integer, String>
Inherited from org.apache.sshd.common.NamedResource:
BY_NAME_COMPARATORNAME_EXTRACTOR

Method Summary

Modifier and TypeMethod and Description
public static String
public byte[]

Returns:

The h parameter
getH
()

Retrieves the computed h parameter

public Digest

Returns:

the message digest
getHash
()

The message digest used by this key exchange algorithm.

public byte[]

Returns:

The k parameter
getK
()

Retrieves the computed k parameter

public static String
public void
init(byte[]
the server identification string
v_s
,
byte[]
the client identification string
v_c
,
byte[]
the server key initialization packet
i_s
,
byte[]
the client key initialization packet
i_c
)

Initialize the key exchange algorithm.

public static boolean
public boolean

Returns:

a boolean indicating if the processing is complete or if more packets are to be received
next
(int
the command
cmd
,
Buffer
the packet contents positioned after the command
buffer
)

Process the next packet

Inherited from org.apache.sshd.common.NamedResource:
findByNamefindFirstMatchByNamegetNamegetNameListgetNamesofNameremoveByNamesafeCompareByName
Inherited from org.apache.sshd.common.session.SessionHolder:
getSessiongetSessionContext

Field Detail

GROUP_KEX_OPCODES_MAPback to summary
public static final NavigableMap<Integer, String> GROUP_KEX_OPCODES_MAP
SIMPLE_KEX_OPCODES_MAPback to summary
public static final NavigableMap<Integer, String> SIMPLE_KEX_OPCODES_MAP

Method Detail

getGroupKexOpcodeNameback to summary
public static String getGroupKexOpcodeName(int cmd)
getHback to summary
public byte[] getH()

Retrieves the computed h parameter

Returns:byte[]

The h parameter

getHashback to summary
public Digest getHash()

The message digest used by this key exchange algorithm.

Returns:Digest

the message digest

getKback to summary
public byte[] getK()

Retrieves the computed k parameter

Returns:byte[]

The k parameter

getSimpleKexOpcodeNameback to summary
public static String getSimpleKexOpcodeName(int cmd)
initback to summary
public void init(byte[] v_s, byte[] v_c, byte[] i_s, byte[] i_c) throws Exception

Initialize the key exchange algorithm.

Parameters
v_s:byte[]

the server identification string

v_c:byte[]

the client identification string

i_s:byte[]

the server key initialization packet

i_c:byte[]

the client key initialization packet

Exceptions
Exception:
if an error occurs
isValidDHValueback to summary
public static boolean isValidDHValue(BigInteger value, BigInteger p)
nextback to summary
public boolean next(int cmd, Buffer buffer) throws Exception

Process the next packet

Parameters
cmd:int

the command

buffer:Buffer

the packet contents positioned after the command

Returns:boolean

a boolean indicating if the processing is complete or if more packets are to be received

Exceptions
Exception:
if an error occurs