public class DhGroupExchange
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.math.BigInteger |
e |
private java.math.BigInteger |
f |
private java.math.BigInteger |
g |
private java.math.BigInteger |
k |
private java.math.BigInteger |
p |
private java.math.BigInteger |
x |
Constructor and Description |
---|
DhGroupExchange(java.math.BigInteger p,
java.math.BigInteger g) |
Modifier and Type | Method and Description |
---|---|
byte[] |
calculateH(byte[] clientversion,
byte[] serverversion,
byte[] clientKexPayload,
byte[] serverKexPayload,
byte[] hostKey,
DHGexParameters para) |
java.math.BigInteger |
getE() |
java.math.BigInteger |
getK() |
void |
init(java.security.SecureRandom rnd) |
void |
setF(java.math.BigInteger f)
Sets f and calculates the shared secret.
|
private java.math.BigInteger p
private java.math.BigInteger g
private java.math.BigInteger e
private java.math.BigInteger x
private java.math.BigInteger f
private java.math.BigInteger k
public DhGroupExchange(java.math.BigInteger p, java.math.BigInteger g)
public void init(java.security.SecureRandom rnd)
public java.math.BigInteger getE()
public java.math.BigInteger getK()
public void setF(java.math.BigInteger f)
public byte[] calculateH(byte[] clientversion, byte[] serverversion, byte[] clientKexPayload, byte[] serverKexPayload, byte[] hostKey, DHGexParameters para)