Package com.trilead.ssh2.crypto.dh
Class DhGroupExchange
- java.lang.Object
-
- com.trilead.ssh2.crypto.dh.DhGroupExchange
-
public class DhGroupExchange extends Object
DhGroupExchange.- Version:
- $Id: DhGroupExchange.java,v 1.1 2007/10/15 12:49:57 cplattne Exp $
- Author:
- Christian Plattner, plattner@trilead.com
-
-
Constructor Summary
Constructors Constructor Description DhGroupExchange(String algorithm, BigInteger p, BigInteger g)DhGroupExchange(BigInteger p, 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)BigIntegergetE()StringgetHashAlgorithm()BigIntegergetK()voidinit(SecureRandom rnd)voidsetF(BigInteger f)Sets f and calculates the shared secret.
-
-
-
Constructor Detail
-
DhGroupExchange
@Deprecated public DhGroupExchange(BigInteger p, BigInteger g)
Deprecated.
-
DhGroupExchange
public DhGroupExchange(String algorithm, BigInteger p, BigInteger g)
-
-
Method Detail
-
init
public void init(SecureRandom rnd)
-
getE
public BigInteger getE()
- Returns:
- Returns the e.
-
getK
public BigInteger getK()
- Returns:
- Returns the shared secret k.
-
setF
public void setF(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 String getHashAlgorithm()
-
-