com.mindbright.ssh2
Class SSH2KEXECDHSHA2NIST
java.lang.Object
com.mindbright.ssh2.SSH2KeyExchanger
com.mindbright.ssh2.SSH2KEXECDHSHA2NIST
- Direct Known Subclasses:
- SSH2KEXECDHSHA2NIST.P256, SSH2KEXECDHSHA2NIST.P384, SSH2KEXECDHSHA2NIST.P521
public abstract class SSH2KEXECDHSHA2NIST
- extends SSH2KeyExchanger
Base class for ECC DH key exchange as defined in RFC 5656
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
transport
protected SSH2Transport transport
ecPublicKey
protected java.security.interfaces.ECPublicKey ecPublicKey
ecPrivateKey
protected java.security.interfaces.ECPrivateKey ecPrivateKey
serverHostKey
protected byte[] serverHostKey
serverF
protected java.security.spec.ECPoint serverF
clientE
protected java.security.spec.ECPoint clientE
sharedSecret_K
protected byte[] sharedSecret_K
exchangeHash_H
protected byte[] exchangeHash_H
sha2
protected java.security.MessageDigest sha2
serverKey
protected java.security.KeyPair serverKey
SSH2KEXECDHSHA2NIST
public SSH2KEXECDHSHA2NIST()
getName
public abstract java.lang.String getName()
getECName
public abstract java.lang.String getECName()
getHashName
public abstract java.lang.String getHashName()
init
public void init(SSH2Transport transport)
throws SSH2Exception
- Specified by:
init
in class SSH2KeyExchanger
- Throws:
SSH2Exception
init
public void init(SSH2Transport transport,
java.security.KeyPair serverKey)
throws SSH2Exception
- Throws:
SSH2Exception
tobytes
public static byte[] tobytes(java.security.spec.ECPoint e,
java.security.spec.EllipticCurve curve)
frombytes
public static java.security.spec.ECPoint frombytes(byte[] b,
java.security.spec.EllipticCurve curve)
processKEXMethodPDU
public void processKEXMethodPDU(SSH2TransportPDU pdu)
throws SSH2Exception
- Specified by:
processKEXMethodPDU
in class SSH2KeyExchanger
- Throws:
SSH2Exception
getExchangeHashAlgorithm
public java.security.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
computeExchangeHash_H
protected void computeExchangeHash_H()
computeSharedSecret_K
protected void computeSharedSecret_K(java.security.spec.ECPoint point)
throws SSH2Exception
- Throws:
SSH2Exception
sendECDHINIT
protected void sendECDHINIT(int type)
throws SSH2Exception
- Throws:
SSH2Exception
createHash
protected java.security.MessageDigest createHash()
throws SSH2Exception
- Throws:
SSH2Exception
generateECKeyPair
protected void generateECKeyPair()
throws SSH2Exception
- Throws:
SSH2Exception