com.jcraft.jsch.KeyExchange Class Reference

Usually not to be used by applications. More...

Collaboration diagram for com.jcraft.jsch.KeyExchange:
Collaboration graph
[legend]

List of all members.

Public Member Functions

abstract void init (Session session, byte[] V_S, byte[] V_C, byte[] I_S, byte[] I_C) throws Exception
 Initializes the key exchange object.
abstract boolean next (Buffer buf) throws Exception
 Does the next step in the key exchange algorithm.

Static Public Attributes

static final int STATE_END = 0
 constant used by getState when no more key exchange packet is expected.

Protected Attributes

Session session = null
HASH sha = null
byte[] K = null
byte[] H = null
byte[] K_S = null

Static Package Attributes

static final int PROPOSAL_KEX_ALGS = 0
static final int PROPOSAL_SERVER_HOST_KEY_ALGS = 1
static final int PROPOSAL_ENC_ALGS_CTOS = 2
static final int PROPOSAL_ENC_ALGS_STOC = 3
static final int PROPOSAL_MAC_ALGS_CTOS = 4
static final int PROPOSAL_MAC_ALGS_STOC = 5
static final int PROPOSAL_COMP_ALGS_CTOS = 6
static final int PROPOSAL_COMP_ALGS_STOC = 7
static final int PROPOSAL_LANG_CTOS = 8
static final int PROPOSAL_LANG_STOC = 9
static final int PROPOSAL_MAX = 10
static String kex = "diffie-hellman-group1-sha1"
static String server_host_key = "ssh-rsa,ssh-dss"
static String enc_c2s = "blowfish-cbc"
static String enc_s2c = "blowfish-cbc"
static String mac_c2s = "hmac-md5"
static String mac_s2c = "hmac-md5"
static String lang_c2s = ""
static String lang_s2c = ""

Detailed Description

Usually not to be used by applications.

Abstract base class for key exchange algorithms.

The concrete implementation will be chosen based on the configuration and on the negotiation between client and server.

See also:
RFC 4253, 7. Key Exchange
RFC 4253, 8. Diffie-Hellman Key Exchange

Definition at line 43 of file KeyExchange.java.


Member Function Documentation

abstract void com.jcraft.jsch.KeyExchange.init ( Session  session,
byte[]  V_S,
byte[]  V_C,
byte[]  I_S,
byte[]  I_C 
) throws Exception [pure virtual]

Initializes the key exchange object.

The parameters here seem to be specific to the Diffie-Hellman Key exchange specified by RFC 4253, other Key Exchange mechanisms might need other parameters.

Parameters:
session the session object.
V_S the server's identification string sent before negotiation
V_C the client's identification string sent before negotiation
I_S the server's complete SSH_MSG_KEXINIT message.
I_C the server's complete SSH_MSG_KEXINIT message.
See also:
RFC 4253, 7. Key Exchange
RFC 4253, 8. Diffie-Hellman Key Exchange

Referenced by com.jcraft.jsch.Session.receive_kexinit().

abstract boolean com.jcraft.jsch.KeyExchange.next ( Buffer  buf  )  throws Exception [pure virtual]

Does the next step in the key exchange algorithm.

Parameters:
buf the received packet. It will have the same message-type as getState returned before.
Returns:
false if there was some problem, true if everything was okay.

Referenced by com.jcraft.jsch.Session.connect().


Member Data Documentation

String com.jcraft.jsch.KeyExchange.enc_c2s = "blowfish-cbc" [static, package]

Definition at line 63 of file KeyExchange.java.

String com.jcraft.jsch.KeyExchange.enc_s2c = "blowfish-cbc" [static, package]

Definition at line 64 of file KeyExchange.java.

byte [] com.jcraft.jsch.KeyExchange.H = null [protected]

Definition at line 82 of file KeyExchange.java.

byte [] com.jcraft.jsch.KeyExchange.K = null [protected]

Definition at line 81 of file KeyExchange.java.

byte [] com.jcraft.jsch.KeyExchange.K_S = null [protected]

Definition at line 83 of file KeyExchange.java.

String com.jcraft.jsch.KeyExchange.kex = "diffie-hellman-group1-sha1" [static, package]

Definition at line 61 of file KeyExchange.java.

String com.jcraft.jsch.KeyExchange.lang_c2s = "" [static, package]

Definition at line 70 of file KeyExchange.java.

String com.jcraft.jsch.KeyExchange.lang_s2c = "" [static, package]

Definition at line 71 of file KeyExchange.java.

String com.jcraft.jsch.KeyExchange.mac_c2s = "hmac-md5" [static, package]

Definition at line 65 of file KeyExchange.java.

String com.jcraft.jsch.KeyExchange.mac_s2c = "hmac-md5" [static, package]

Definition at line 67 of file KeyExchange.java.

final int com.jcraft.jsch.KeyExchange.PROPOSAL_COMP_ALGS_CTOS = 6 [static, package]

Definition at line 51 of file KeyExchange.java.

final int com.jcraft.jsch.KeyExchange.PROPOSAL_COMP_ALGS_STOC = 7 [static, package]

Definition at line 52 of file KeyExchange.java.

final int com.jcraft.jsch.KeyExchange.PROPOSAL_ENC_ALGS_CTOS = 2 [static, package]

Definition at line 47 of file KeyExchange.java.

final int com.jcraft.jsch.KeyExchange.PROPOSAL_ENC_ALGS_STOC = 3 [static, package]

Definition at line 48 of file KeyExchange.java.

final int com.jcraft.jsch.KeyExchange.PROPOSAL_KEX_ALGS = 0 [static, package]

Definition at line 45 of file KeyExchange.java.

final int com.jcraft.jsch.KeyExchange.PROPOSAL_LANG_CTOS = 8 [static, package]

Definition at line 53 of file KeyExchange.java.

final int com.jcraft.jsch.KeyExchange.PROPOSAL_LANG_STOC = 9 [static, package]

Definition at line 54 of file KeyExchange.java.

final int com.jcraft.jsch.KeyExchange.PROPOSAL_MAC_ALGS_CTOS = 4 [static, package]

Definition at line 49 of file KeyExchange.java.

final int com.jcraft.jsch.KeyExchange.PROPOSAL_MAC_ALGS_STOC = 5 [static, package]

Definition at line 50 of file KeyExchange.java.

final int com.jcraft.jsch.KeyExchange.PROPOSAL_MAX = 10 [static, package]

Definition at line 55 of file KeyExchange.java.

Definition at line 46 of file KeyExchange.java.

String com.jcraft.jsch.KeyExchange.server_host_key = "ssh-rsa,ssh-dss" [static, package]

Definition at line 62 of file KeyExchange.java.

Definition at line 79 of file KeyExchange.java.

Definition at line 80 of file KeyExchange.java.

final int com.jcraft.jsch.KeyExchange.STATE_END = 0 [static]

constant used by getState when no more key exchange packet is expected.

Definition at line 77 of file KeyExchange.java.

Referenced by com.jcraft.jsch.Session.connect().


The documentation for this class was generated from the following file:

Generated on 5 May 2015 for HPCVIEWER by  doxygen 1.6.1