com.mindbright.ssh2
Class SSH2KEXDHGroupNumSHA1
java.lang.Object
com.mindbright.ssh2.SSH2KeyExchanger
com.mindbright.ssh2.SSH2KEXDHGroupNumSHA1
- Direct Known Subclasses:
- SSH2KEXDHGroup14SHA1, SSH2KEXDHGroup1SHA1
public abstract class SSH2KEXDHGroupNumSHA1
- extends SSH2KeyExchanger
Base class for diffie hellman key exchange using predefined groups.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
transport
protected SSH2Transport transport
dhPublicKey
protected DHPublicKey dhPublicKey
dhPrivateKey
protected DHPrivateKey dhPrivateKey
serverHostKey
protected byte[] serverHostKey
serverF
protected java.math.BigInteger serverF
clientE
protected java.math.BigInteger clientE
sharedSecret_K
protected byte[] sharedSecret_K
exchangeHash_H
protected byte[] exchangeHash_H
sha1
protected MessageDigest sha1
serverKey
protected KeyPair serverKey
SSH2KEXDHGroupNumSHA1
public SSH2KEXDHGroupNumSHA1()
getGroupP
public abstract java.math.BigInteger getGroupP()
getGroupG
public abstract java.math.BigInteger getGroupG()
getName
public abstract java.lang.String getName()
init
public void init(SSH2Transport transport)
throws SSH2Exception
- Specified by:
init
in class SSH2KeyExchanger
- Throws:
SSH2Exception
init
public void init(SSH2Transport transport,
KeyPair serverKey)
throws SSH2Exception
- Throws:
SSH2Exception
processKEXMethodPDU
public void processKEXMethodPDU(SSH2TransportPDU pdu)
throws SSH2Exception
- Specified by:
processKEXMethodPDU
in class SSH2KeyExchanger
- Throws:
SSH2Exception
getExchangeHashAlgorithm
public MessageDigest getExchangeHashAlgorithm()
- Specified by:
getExchangeHashAlgorithm
in class SSH2KeyExchanger
getSharedSecret_K
public byte[] getSharedSecret_K()
- Specified by:
getSharedSecret_K
in class SSH2KeyExchanger
getExchangeHash_H
public byte[] getExchangeHash_H()
- Specified by:
getExchangeHash_H
in class SSH2KeyExchanger
getHostKeyAlgorithms
public java.lang.String getHostKeyAlgorithms()
- Specified by:
getHostKeyAlgorithms
in class SSH2KeyExchanger
computeExchangeHash_H
protected void computeExchangeHash_H()
computeSharedSecret_K
protected void computeSharedSecret_K(DHPublicKeySpec peerPubSpec)
throws SSH2Exception
- Throws:
SSH2Exception
sendDHINIT
protected void sendDHINIT(int type)
throws SSH2Exception
- Throws:
SSH2Exception
createHash
protected MessageDigest createHash()
throws SSH2Exception
- Throws:
SSH2Exception
generateDHKeyPair
protected void generateDHKeyPair(DHParameterSpec dhParams)
throws SSH2Exception
- Throws:
SSH2Exception