ch.ethz.ssh2.crypto.dh
Class DhGroupExchange
java.lang.Object
ch.ethz.ssh2.crypto.dh.DhGroupExchange
- public class DhGroupExchange
- extends java.lang.Object
DhGroupExchange.
- Version:
- $Id: DhGroupExchange.java,v 1.6 2006/09/20 12:51:37 cplattne Exp $
- Author:
- Christian Plattner, plattner@inf.ethz.ch
Field Summary |
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 Summary |
DhGroupExchange(java.math.BigInteger p,
java.math.BigInteger g)
|
Method Summary |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
p
private java.math.BigInteger p
g
private java.math.BigInteger g
e
private java.math.BigInteger e
x
private java.math.BigInteger x
f
private java.math.BigInteger f
k
private java.math.BigInteger k
DhGroupExchange
public DhGroupExchange(java.math.BigInteger p,
java.math.BigInteger g)
init
public void init(java.security.SecureRandom rnd)
getE
public java.math.BigInteger getE()
- Returns:
- Returns the e.
getK
public java.math.BigInteger getK()
- Returns:
- Returns the shared secret k.
setF
public void setF(java.math.BigInteger f)
- Sets f and calculates the shared secret.
calculateH
public byte[] calculateH(byte[] clientversion,
byte[] serverversion,
byte[] clientKexPayload,
byte[] serverKexPayload,
byte[] hostKey,
DHGexParameters para)