public class DiffieHellmanEcdh extends SshKeyExchangeClient implements SshKeyExchange<SshClientContext>
Modifier and Type | Field and Description |
---|---|
static int |
SSH_MSG_KEX_ECDH_INIT |
static int |
SSH_MSG_KEX_ECDH_REPLY |
e, exchangeHash, f, firstPacketFollows, hostKey, key, secret, signature, transport, useFirstPacket
Modifier | Constructor and Description |
---|---|
protected |
DiffieHellmanEcdh(String name,
String curve,
String hashAlgorithm) |
Modifier and Type | Method and Description |
---|---|
protected void |
calculateExchangeHash()
Calculates the exchange hash as an SHA1 hash of the following data.
|
String |
getAlgorithm() |
String |
getProvider() |
void |
init(TransportProtocol<SshClientContext> transport,
String clientId,
String serverId,
byte[] clientKexInit,
byte[] serverKexInit,
SshPrivateKey prvkey,
SshPublicKey pubkey,
boolean firstPacketFollows,
boolean useFirstPacket) |
boolean |
processMessage(byte[] msg)
Process a key exchange message
|
void |
test() |
getExchangeHash, getHashAlgorithm, getHostKey, getSecret, getSignature, hasReceivedNewKeys, hasSentNewKeys, isComplete, reset, setReceivedNewKeys, setSentNewKeys
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getExchangeHash, getHashAlgorithm, getSecret, hasReceivedNewKeys, hasSentNewKeys, setReceivedNewKeys, setSentNewKeys
public static final int SSH_MSG_KEX_ECDH_INIT
public static final int SSH_MSG_KEX_ECDH_REPLY
public String getAlgorithm()
getAlgorithm
in interface SshComponent
getAlgorithm
in interface SshKeyExchange<SshClientContext>
protected void calculateExchangeHash() throws SshException
SshKeyExchangeClient
Calculates the exchange hash as an SHA1 hash of the following data.
String the client's version string (CR and NL excluded) String the server's version string (CR and NL excluded) String the payload of the client's SSH_MSG_KEXINIT String the payload of the server's SSH_MSG_KEXINIT String the host key BigInteger e, exchange value sent by the client BigInteger f, exchange value sent by the server BigInteger K, the shared secret
calculateExchangeHash
in class SshKeyExchangeClient
SshException
public void init(TransportProtocol<SshClientContext> transport, String clientId, String serverId, byte[] clientKexInit, byte[] serverKexInit, SshPrivateKey prvkey, SshPublicKey pubkey, boolean firstPacketFollows, boolean useFirstPacket) throws IOException, SshException
init
in interface SshKeyExchange<SshClientContext>
IOException
SshException
public boolean processMessage(byte[] msg) throws SshException, IOException
SshKeyExchangeClient
processMessage
in interface SshKeyExchange<SshClientContext>
processMessage
in class SshKeyExchangeClient
SshException
IOException
public String getProvider()
getProvider
in interface SshKeyExchange<SshClientContext>
public void test() throws IOException, SshException
test
in interface SshKeyExchange<SshClientContext>
IOException
SshException
Copyright © 2017. All rights reserved.