public abstract class SshKeyExchangeClient extends Object implements SshKeyExchange
Abstract representation of an SSH key exchange.
Modifier and Type | Field and Description |
---|---|
protected byte[] |
exchangeHash
The exchange hash produced during key exchange.
|
protected byte[] |
hostKey
The server's host key.
|
protected BigInteger |
secret
The secret value produced during key exchange.
|
protected byte[] |
signature
The signature generated over the exchange hash
|
protected TransportProtocol |
transport
The transport protocol for sending/receiving messages
|
Modifier | Constructor and Description |
---|---|
|
SshKeyExchangeClient()
Contruct an uninitialized key exchange
|
protected |
SshKeyExchangeClient(String hashAlgorithm) |
Modifier and Type | Method and Description |
---|---|
abstract String |
getAlgorithm()
Get the key exchange algorithm name.
|
byte[] |
getExchangeHash()
Get the output of the key exchange
|
String |
getHashAlgorithm() |
byte[] |
getHostKey()
Get the host key supplied during key exchange.
|
BigInteger |
getSecret()
Get the secret value produced during key exchange.
|
byte[] |
getSignature()
Get the signature produced during key exchange.
|
void |
init(TransportProtocol transport,
boolean ignoreFirstPacket)
Initialize the key exchange.
|
abstract boolean |
isKeyExchangeMessage(int messageid) |
abstract void |
performClientExchange(String clientId,
String serverId,
byte[] clientKexInit,
byte[] serverKexInit)
Override to perform the client side key exchange.
|
void |
reset()
Reset the key exchange.
|
protected BigInteger secret
protected byte[] exchangeHash
protected byte[] hostKey
protected byte[] signature
protected TransportProtocol transport
protected SshKeyExchangeClient(String hashAlgorithm)
public SshKeyExchangeClient()
public abstract String getAlgorithm()
public byte[] getExchangeHash()
public byte[] getHostKey()
public BigInteger getSecret()
public byte[] getSignature()
public String getHashAlgorithm()
public void init(TransportProtocol transport, boolean ignoreFirstPacket)
transport
- IOException
public abstract void performClientExchange(String clientId, String serverId, byte[] clientKexInit, byte[] serverKexInit) throws SshException
clientId
- serverId
- clientKexInit
- serverKexInit
- IOException
SshException
public abstract boolean isKeyExchangeMessage(int messageid)
public void reset()
Copyright © 2014. All rights reserved.