ch.ethz.ssh2.crypto.dh

Class DhGroupExchange


public class DhGroupExchange
extends java.lang.Object

DhGroupExchange.

Constructor Summary

DhGroupExchange(BigInteger p, BigInteger g)

Method Summary

byte[]
calculateH(byte[] clientversion, byte[] serverversion, byte[] clientKexPayload, byte[] serverKexPayload, byte[] hostKey, DHGexParameters para)
BigInteger
getE()
BigInteger
getK()
void
init(SecureRandom rnd)
void
setF(BigInteger f)
Sets f and calculates the shared secret.

Constructor Details

DhGroupExchange

public DhGroupExchange(BigInteger p,
                       BigInteger g)

Method Details

calculateH

public byte[] calculateH(byte[] clientversion,
                         byte[] serverversion,
                         byte[] clientKexPayload,
                         byte[] serverKexPayload,
                         byte[] hostKey,
                         DHGexParameters para)

getE

public BigInteger getE()
Returns:
Returns the e.

getK

public BigInteger getK()
Returns:
Returns the shared secret k.

init

public void init(SecureRandom rnd)

setF

public void setF(BigInteger f)
Sets f and calculates the shared secret.