org.bouncycastle.jce.provider.test
Class ElGamalTest

java.lang.Object
  extended by org.bouncycastle.util.test.SimpleTest
      extended by org.bouncycastle.jce.provider.test.ElGamalTest
All Implemented Interfaces:
Test

public class ElGamalTest
extends SimpleTest


Field Summary
private  java.math.BigInteger g1024
           
private  java.math.BigInteger g512
           
private  java.math.BigInteger g768
           
private  java.math.BigInteger p1024
           
private  java.math.BigInteger p512
           
private  java.math.BigInteger p768
           
 
Constructor Summary
ElGamalTest()
           
 
Method Summary
private  void checkKeySize(int privateValueSize, java.security.KeyPair aKeyPair)
           
 java.lang.String getName()
           
static void main(java.lang.String[] args)
           
 void performTest()
           
private  void testGP(int size, int privateValueSize, java.math.BigInteger g, java.math.BigInteger p)
           
private  void testRandom(int size)
           
 
Methods inherited from class org.bouncycastle.util.test.SimpleTest
areEqual, fail, fail, fail, perform, runTest, runTest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

g512

private java.math.BigInteger g512

p512

private java.math.BigInteger p512

g768

private java.math.BigInteger g768

p768

private java.math.BigInteger p768

g1024

private java.math.BigInteger g1024

p1024

private java.math.BigInteger p1024
Constructor Detail

ElGamalTest

public ElGamalTest()
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface Test
Specified by:
getName in class SimpleTest

testGP

private void testGP(int size,
                    int privateValueSize,
                    java.math.BigInteger g,
                    java.math.BigInteger p)
             throws java.lang.Exception
Throws:
java.lang.Exception

checkKeySize

private void checkKeySize(int privateValueSize,
                          java.security.KeyPair aKeyPair)

testRandom

private void testRandom(int size)
                 throws java.lang.Exception
Throws:
java.lang.Exception

performTest

public void performTest()
                 throws java.lang.Exception
Specified by:
performTest in class SimpleTest
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)