ch.ethz.ssh2.crypto.dh
Class DhExchange
java.lang.Object
ch.ethz.ssh2.crypto.dh.DhExchange
public class DhExchange
- extends java.lang.Object
DhExchange.
- Version:
- 2.50, 03/15/10
- Author:
- Christian Plattner
Field Summary |
(package private) java.math.BigInteger |
e
|
(package private) java.math.BigInteger |
f
|
(package private) static java.math.BigInteger |
g
|
(package private) java.math.BigInteger |
k
|
private static Logger |
log
|
(package private) java.math.BigInteger |
p
|
(package private) static java.math.BigInteger |
p1
|
(package private) static java.math.BigInteger |
p14
|
(package private) java.math.BigInteger |
x
|
Method Summary |
byte[] |
calculateH(byte[] clientversion,
byte[] serverversion,
byte[] clientKexPayload,
byte[] serverKexPayload,
byte[] hostKey)
|
java.math.BigInteger |
getE()
|
java.math.BigInteger |
getK()
|
void |
init(int group,
java.security.SecureRandom rnd)
|
void |
setF(java.math.BigInteger f)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
private static final Logger log
p1
static final java.math.BigInteger p1
p14
static final java.math.BigInteger p14
g
static final java.math.BigInteger g
p
java.math.BigInteger p
e
java.math.BigInteger e
x
java.math.BigInteger x
f
java.math.BigInteger f
k
java.math.BigInteger k
DhExchange
public DhExchange()
init
public void init(int group,
java.security.SecureRandom rnd)
getE
public java.math.BigInteger getE()
- Returns:
- Returns the e.
- Throws:
java.lang.IllegalStateException
getK
public java.math.BigInteger getK()
- Returns:
- Returns the shared secret k.
- Throws:
java.lang.IllegalStateException
setF
public void setF(java.math.BigInteger f)
- Parameters:
f
-
calculateH
public byte[] calculateH(byte[] clientversion,
byte[] serverversion,
byte[] clientKexPayload,
byte[] serverKexPayload,
byte[] hostKey)