com.mindbright.security.publickey
Class DiffieHellman

java.lang.Object
  extended bycom.mindbright.security.publickey.DiffieHellman

public final class DiffieHellman
extends java.lang.Object


Constructor Summary
DiffieHellman()
           
 
Method Summary
static java.math.BigInteger computeKey(java.math.BigInteger x, java.math.BigInteger y, java.math.BigInteger p)
           
static java.math.BigInteger generateX(java.math.BigInteger p, int l, SecureRandom random)
           
static java.math.BigInteger generateX(java.math.BigInteger p, SecureRandom random)
           
static java.math.BigInteger generateY(java.math.BigInteger x, java.math.BigInteger g, java.math.BigInteger p)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiffieHellman

public DiffieHellman()
Method Detail

generateX

public static java.math.BigInteger generateX(java.math.BigInteger p,
                                             SecureRandom random)

generateX

public static java.math.BigInteger generateX(java.math.BigInteger p,
                                             int l,
                                             SecureRandom random)

generateY

public static java.math.BigInteger generateY(java.math.BigInteger x,
                                             java.math.BigInteger g,
                                             java.math.BigInteger p)

computeKey

public static java.math.BigInteger computeKey(java.math.BigInteger x,
                                              java.math.BigInteger y,
                                              java.math.BigInteger p)