public class Rsa1024Sha1 extends SshKeyExchangeClient implements com.sshtools.synergy.ssh.components.jce.AbstractKeyExchange
Implementation of RFC 4432 https://tools.ietf.org/html/rfc4432
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
RSA_1024_SHA1
Constant for the algorithm name "rsa1024-sha1".
|
e, exchangeHash, f, firstPacketFollows, hostKey, key, secret, signature, transport, useFirstPacket
Constructor and Description |
---|
Rsa1024Sha1()
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.
|
java.lang.String |
getAlgorithm()
Get the algorithm name for this key exchange
|
java.lang.String |
getProvider() |
void |
init(com.sshtools.synergy.ssh.SshTransport<SshClientContext> transport,
java.lang.String clientId,
java.lang.String serverId,
byte[] clientKexInit,
byte[] serverKexInit,
com.sshtools.common.ssh.components.SshPrivateKey prvkey,
com.sshtools.common.ssh.components.SshPublicKey pubkey,
boolean firstPacketFollows,
boolean useFirstPacket) |
boolean |
isKeyExchangeMessage(int messageid) |
boolean |
processMessage(byte[] tmp)
Process a key exchange message
|
void |
test() |
getExchangeHash, getHashAlgorithm, getHostKey, getPriority, getSecret, getSecurityLevel, getSignature, hasReceivedNewKeys, hasSentNewKeys, isComplete, reset, setReceivedNewKeys, setSentNewKeys
public static final java.lang.String RSA_1024_SHA1
public java.lang.String getAlgorithm()
getAlgorithm
in interface com.sshtools.common.ssh.components.SshComponent
getAlgorithm
in interface com.sshtools.common.ssh.SecureComponent
getAlgorithm
in interface com.sshtools.synergy.ssh.components.SshKeyExchange<SshClientContext>
public java.lang.String getProvider()
getProvider
in interface com.sshtools.synergy.ssh.components.jce.AbstractKeyExchange
getProvider
in interface com.sshtools.synergy.ssh.components.SshKeyExchange<SshClientContext>
public void test()
test
in interface com.sshtools.synergy.ssh.components.SshKeyExchange<SshClientContext>
public void init(com.sshtools.synergy.ssh.SshTransport<SshClientContext> transport, java.lang.String clientId, java.lang.String serverId, byte[] clientKexInit, byte[] serverKexInit, com.sshtools.common.ssh.components.SshPrivateKey prvkey, com.sshtools.common.ssh.components.SshPublicKey pubkey, boolean firstPacketFollows, boolean useFirstPacket) throws java.io.IOException, com.sshtools.common.ssh.SshException
init
in interface com.sshtools.synergy.ssh.components.SshKeyExchange<SshClientContext>
java.io.IOException
com.sshtools.common.ssh.SshException
public boolean processMessage(byte[] tmp) throws com.sshtools.common.ssh.SshException, java.io.IOException
SshKeyExchangeClient
processMessage
in interface com.sshtools.synergy.ssh.components.SshKeyExchange<SshClientContext>
processMessage
in class SshKeyExchangeClient
com.sshtools.common.ssh.SshException
java.io.IOException
protected void calculateExchangeHash() throws com.sshtools.common.ssh.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
calculateExchangeHash
in class SshKeyExchangeClient
java.io.IOException
com.sshtools.common.ssh.SshException
public boolean isKeyExchangeMessage(int messageid)
Copyright © 2023. All rights reserved.