public class Rsa2048Sha256 extends SshKeyExchangeClient implements AbstractKeyExchange
Implementation of RFC 4432 https://tools.ietf.org/html/rfc4432
Modifier and Type | Field and Description |
---|---|
static String |
RSA_2048_SHA256
Constant for the algorithm name "rsa2048-sha256".
|
exchangeHash, hashAlgorithm, hostKey, secret, signature, transport
Constructor and Description |
---|
Rsa2048Sha256()
Construct an uninitialized instance.
|
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 algorithm name for this key exchange
|
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, reset
public static final String RSA_2048_SHA256
public String getAlgorithm()
getAlgorithm
in interface SshComponent
getAlgorithm
in interface SecureComponent
getAlgorithm
in class SshKeyExchangeClient
public String getProvider()
getProvider
in interface AbstractKeyExchange
getProvider
in interface SshKeyExchange
public void test()
test
in interface SshKeyExchange
public void performClientExchange(String clientIdentification, String serverIdentification, byte[] clientKexInit, byte[] serverKexInit) throws SshException
SshKeyExchangeClient
performClientExchange
in class SshKeyExchangeClient
SshException
protected 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
IOException
SshException
public boolean isKeyExchangeMessage(int messageid)
isKeyExchangeMessage
in class SshKeyExchangeClient
Copyright © 2024. All rights reserved.