com.sshtools.j2ssh.transport.kex
Class SshKeyExchange

java.lang.Object
  extended by com.sshtools.j2ssh.transport.kex.SshKeyExchange
Direct Known Subclasses:
DhGroup1Sha1

public abstract class SshKeyExchange
extends java.lang.Object

Version:
$Revision: 1.22 $
Author:
$author$

Field Summary
protected  byte[] exchangeHash
           
protected  byte[] hostKey
           
protected  SshMessageStore messageStore
           
protected  java.math.BigInteger secret
           
protected  byte[] signature
           
protected  TransportProtocol transport
           
 
Constructor Summary
SshKeyExchange()
          Creates a new SshKeyExchange object.
 
Method Summary
 byte[] getExchangeHash()
           
 byte[] getHostKey()
           
 java.math.BigInteger getSecret()
           
 byte[] getSignature()
           
 void init(TransportProtocol transport)
           
protected abstract  void onInit()
           
abstract  void performClientExchange(java.lang.String clientId, java.lang.String serverId, byte[] clientKexInit, byte[] serverKexInit)
           
abstract  void performServerExchange(java.lang.String clientId, java.lang.String serverId, byte[] clientKexInit, byte[] serverKexInit, SshPrivateKey prvkey)
           
 void reset()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

secret

protected java.math.BigInteger secret

messageStore

protected SshMessageStore messageStore

exchangeHash

protected byte[] exchangeHash

hostKey

protected byte[] hostKey

signature

protected byte[] signature

transport

protected TransportProtocol transport
Constructor Detail

SshKeyExchange

public SshKeyExchange()
Creates a new SshKeyExchange object.

Method Detail

getExchangeHash

public byte[] getExchangeHash()
Returns:

getHostKey

public byte[] getHostKey()
Returns:

getSecret

public java.math.BigInteger getSecret()
Returns:

getSignature

public byte[] getSignature()
Returns:

init

public void init(TransportProtocol transport)
          throws java.io.IOException
Parameters:
transport -
Throws:
java.io.IOException

onInit

protected abstract void onInit()
                        throws java.io.IOException
Throws:
java.io.IOException

performClientExchange

public abstract void performClientExchange(java.lang.String clientId,
                                           java.lang.String serverId,
                                           byte[] clientKexInit,
                                           byte[] serverKexInit)
                                    throws java.io.IOException
Parameters:
clientId -
serverId -
clientKexInit -
serverKexInit -
Throws:
java.io.IOException

performServerExchange

public abstract void performServerExchange(java.lang.String clientId,
                                           java.lang.String serverId,
                                           byte[] clientKexInit,
                                           byte[] serverKexInit,
                                           SshPrivateKey prvkey)
                                    throws java.io.IOException
Parameters:
clientId -
serverId -
clientKexInit -
serverKexInit -
prvkey -
Throws:
java.io.IOException

reset

public void reset()


Copyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.