public class Rsa2048SHA2KeyExchange extends SshKeyExchangeServer implements AbstractKeyExchange
Implementation of RFC 4432 https://tools.ietf.org/html/rfc4432
| Modifier and Type | Field and Description |
|---|---|
static String |
RSA_2048_SHA2
Constant for the algorithm name "rsa2048-sha256".
|
clientId, clientKexInit, exchangeHash, firstPacketFollows, hostKey, prvkey, pubkey, secret, serverId, serverKexInit, signature, transport, useFirstPacket| Constructor and Description |
|---|
Rsa2048SHA2KeyExchange()
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() |
void |
init(AbstractServerTransport transport,
String clientIdentification,
String serverIdentification,
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, getPriority, getSecret, getSecurityLevel, getSignature, hasReceivedNewKeys, hasSentNewKeys, reset, setReceivedNewKeys, setSentNewKeyspublic static final String RSA_2048_SHA2
public Rsa2048SHA2KeyExchange()
public String getAlgorithm()
getAlgorithm in interface SshComponentgetAlgorithm in interface SecureComponentgetAlgorithm in class SshKeyExchangeServerpublic void test()
test in interface SshKeyExchangepublic void init(AbstractServerTransport transport, String clientIdentification, String serverIdentification, byte[] clientKexInit, byte[] serverKexInit, SshPrivateKey prvkey, SshPublicKey pubkey, boolean firstPacketFollows, boolean useFirstPacket) throws IOException
init in class SshKeyExchangeServerIOExceptionpublic String getProvider()
getProvider in interface AbstractKeyExchangegetProvider in interface SshKeyExchangepublic boolean processMessage(byte[] msg)
throws SshException,
IOException
SshKeyExchangeServerprocessMessage in class SshKeyExchangeServerIOExceptionSshExceptionprotected 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
IOExceptionSshExceptionCopyright © 2025. All rights reserved.