com.mindbright.security.publickey
Class DSAAlgorithm

java.lang.Object
  extended by com.mindbright.security.publickey.DSAAlgorithm

public final class DSAAlgorithm
extends java.lang.Object


Constructor Summary
DSAAlgorithm()
           
 
Method Summary
static DSAParameterSpec generateParams(int pBits, int qBits, SecureRandom random)
           
static java.math.BigInteger generatePrivateKey(java.math.BigInteger q, SecureRandom random)
           
static java.math.BigInteger generatePublicKey(java.math.BigInteger g, java.math.BigInteger p, java.math.BigInteger x)
           
static java.math.BigInteger[] sign(java.math.BigInteger x, java.math.BigInteger p, java.math.BigInteger q, java.math.BigInteger g, byte[] data)
           
static boolean verify(java.math.BigInteger y, java.math.BigInteger p, java.math.BigInteger q, java.math.BigInteger g, java.math.BigInteger r, java.math.BigInteger s, byte[] data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DSAAlgorithm

public DSAAlgorithm()
Method Detail

sign

public static java.math.BigInteger[] sign(java.math.BigInteger x,
                                          java.math.BigInteger p,
                                          java.math.BigInteger q,
                                          java.math.BigInteger g,
                                          byte[] data)

verify

public static boolean verify(java.math.BigInteger y,
                             java.math.BigInteger p,
                             java.math.BigInteger q,
                             java.math.BigInteger g,
                             java.math.BigInteger r,
                             java.math.BigInteger s,
                             byte[] data)

generateParams

public static DSAParameterSpec generateParams(int pBits,
                                              int qBits,
                                              SecureRandom random)

generatePrivateKey

public static java.math.BigInteger generatePrivateKey(java.math.BigInteger q,
                                                      SecureRandom random)

generatePublicKey

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