public class DiffieHellmanGroup14Sha1 extends SshKeyExchangeClient implements AbstractKeyExchange
| Modifier and Type | Field and Description |
|---|---|
static String |
DIFFIE_HELLMAN_GROUP14_SHA1
Constant for the algorithm name "diffie-hellman-group14-sha1".
|
exchangeHash, hashAlgorithm, hostKey, secret, signature, transport| Constructor and Description |
|---|
DiffieHellmanGroup14Sha1() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
calculateExchangeHash()
Calculates the exchange hash as an SHA1 hash of the following data.
|
String |
getAlgorithm()
Get the key exchange algorithm name.
|
String |
getProvider() |
boolean |
isKeyExchangeMessage(int messageid) |
void |
performClientExchange(String clientIdentification,
String serverIdentification,
byte[] clientKexInit,
byte[] serverKexInit)
Override to perform the client side key exchange.
|
void |
test() |
getExchangeHash, getHashAlgorithm, getHostKey, getPriority, getSecret, getSecurityLevel, getSignature, init, resetpublic static final String DIFFIE_HELLMAN_GROUP14_SHA1
public void test()
test in interface SshKeyExchangepublic void performClientExchange(String clientIdentification, String serverIdentification, byte[] clientKexInit, byte[] serverKexInit) throws SshException
SshKeyExchangeClientperformClientExchange in class SshKeyExchangeClientSshExceptionpublic String getProvider()
getProvider in interface AbstractKeyExchangegetProvider in interface SshKeyExchangeprotected void calculateExchangeHash()
throws SshException
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
IOExceptionSshExceptionpublic String getAlgorithm()
SshKeyExchangeClientgetAlgorithm in interface SshComponentgetAlgorithm in interface SecureComponentgetAlgorithm in class SshKeyExchangeClientpublic boolean isKeyExchangeMessage(int messageid)
isKeyExchangeMessage in class SshKeyExchangeClientCopyright © 2025. All rights reserved.