Package com.trilead.ssh2.crypto.dh
Class DhGroupExchange
- java.lang.Object
-
- com.trilead.ssh2.crypto.dh.DhGroupExchange
-
public class DhGroupExchange extends java.lang.Object
DhGroupExchange.- Version:
- $Id: DhGroupExchange.java,v 1.1 2007/10/15 12:49:57 cplattne Exp $
-
-
Constructor Summary
Constructors Constructor Description DhGroupExchange(java.lang.String algorithm, java.math.BigInteger p, java.math.BigInteger g)
DhGroupExchange(java.math.BigInteger p, java.math.BigInteger g)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
calculateH(byte[] clientversion, byte[] serverversion, byte[] clientKexPayload, byte[] serverKexPayload, byte[] hostKey, DHGexParameters para)
java.math.BigInteger
getE()
java.lang.String
getHashAlgorithm()
java.math.BigInteger
getK()
void
init(java.security.SecureRandom rnd)
void
setF(java.math.BigInteger f)
Sets f and calculates the shared secret.
-
-
-
Method Detail
-
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.- Parameters:
f
- f.
-
calculateH
public byte[] calculateH(byte[] clientversion, byte[] serverversion, byte[] clientKexPayload, byte[] serverKexPayload, byte[] hostKey, DHGexParameters para)
-
getHashAlgorithm
public java.lang.String getHashAlgorithm()
-
-