com.mindbright.ssh2
public abstract class SSH2KEXECDHSHA2NIST extends SSH2KeyExchanger
Modifier and Type | Class and Description |
---|---|
static class |
SSH2KEXECDHSHA2NIST.P256 |
static class |
SSH2KEXECDHSHA2NIST.P384 |
static class |
SSH2KEXECDHSHA2NIST.P521 |
Modifier and Type | Field and Description |
---|---|
protected java.security.spec.ECPoint |
clientE |
protected java.security.interfaces.ECPrivateKey |
ecPrivateKey |
protected java.security.interfaces.ECPublicKey |
ecPublicKey |
protected byte[] |
exchangeHash_H |
protected java.security.spec.ECPoint |
serverF |
protected byte[] |
serverHostKey |
protected java.security.KeyPair |
serverKey |
protected java.security.MessageDigest |
sha2 |
protected byte[] |
sharedSecret_K |
protected SSH2Transport |
transport |
Constructor and Description |
---|
SSH2KEXECDHSHA2NIST() |
Modifier and Type | Method and Description |
---|---|
protected void |
computeExchangeHash_H() |
protected void |
computeSharedSecret_K(java.security.spec.ECPoint point) |
protected java.security.MessageDigest |
createHash() |
static java.security.spec.ECPoint |
frombytes(byte[] b,
java.security.spec.EllipticCurve curve) |
protected void |
generateECKeyPair() |
abstract java.lang.String |
getECName() |
byte[] |
getExchangeHash_H() |
java.security.MessageDigest |
getExchangeHashAlgorithm() |
abstract java.lang.String |
getHashName() |
abstract java.lang.String |
getName() |
byte[] |
getSharedSecret_K() |
void |
init(SSH2Transport transport) |
void |
init(SSH2Transport transport,
java.security.KeyPair serverKey) |
void |
processKEXMethodPDU(SSH2TransportPDU pdu) |
protected void |
sendECDHINIT(int type) |
static byte[] |
tobytes(java.security.spec.ECPoint e,
java.security.spec.EllipticCurve curve) |
getHostKeyAlgorithms, getInstance
protected SSH2Transport transport
protected java.security.interfaces.ECPublicKey ecPublicKey
protected java.security.interfaces.ECPrivateKey ecPrivateKey
protected byte[] serverHostKey
protected java.security.spec.ECPoint serverF
protected java.security.spec.ECPoint clientE
protected byte[] sharedSecret_K
protected byte[] exchangeHash_H
protected java.security.MessageDigest sha2
protected java.security.KeyPair serverKey
public abstract java.lang.String getName()
public abstract java.lang.String getECName()
public abstract java.lang.String getHashName()
public void init(SSH2Transport transport) throws SSH2Exception
init
in class SSH2KeyExchanger
SSH2Exception
public void init(SSH2Transport transport, java.security.KeyPair serverKey) throws SSH2Exception
SSH2Exception
public static byte[] tobytes(java.security.spec.ECPoint e, java.security.spec.EllipticCurve curve)
public static java.security.spec.ECPoint frombytes(byte[] b, java.security.spec.EllipticCurve curve)
public void processKEXMethodPDU(SSH2TransportPDU pdu) throws SSH2Exception
processKEXMethodPDU
in class SSH2KeyExchanger
SSH2Exception
public java.security.MessageDigest getExchangeHashAlgorithm()
getExchangeHashAlgorithm
in class SSH2KeyExchanger
public byte[] getSharedSecret_K()
getSharedSecret_K
in class SSH2KeyExchanger
public byte[] getExchangeHash_H()
getExchangeHash_H
in class SSH2KeyExchanger
protected void computeExchangeHash_H()
protected void computeSharedSecret_K(java.security.spec.ECPoint point) throws SSH2Exception
SSH2Exception
protected void sendECDHINIT(int type) throws SSH2Exception
SSH2Exception
protected java.security.MessageDigest createHash() throws SSH2Exception
SSH2Exception
protected void generateECKeyPair() throws SSH2Exception
SSH2Exception