org.bouncycastle.jce.provider.test
Class DSATest

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

public class DSATest
extends SimpleTest


Field Summary
(package private)  byte[] k1
           
(package private)  byte[] k2
           
(package private)  java.security.SecureRandom random
           
 
Constructor Summary
DSATest()
           
 
Method Summary
private  void checkPrivateKey(java.security.interfaces.DSAPrivateKey k2, java.security.PrivateKey sKey)
           
private  void checkPublic(java.security.interfaces.DSAPublicKey k1, java.security.PublicKey vKey)
           
protected  java.math.BigInteger[] derDecode(byte[] encoding)
           
 java.lang.String getName()
           
static void main(java.lang.String[] args)
           
 void performTest()
           
private  java.lang.Object serializeDeserialize(java.lang.Object o)
           
 void testCompat()
           
private  void testECDSA239bitBinary()
          X9.62 - 1998,
J.2.1, Page 100, ECDSA over the field F2m
an example with 191 bit binary field
private  void testECDSA239bitBinary(java.lang.String algorithm, DERObjectIdentifier oid)
           
private  void testECDSA239bitPrime()
          X9.62 - 1998,
J.3.2, Page 155, ECDSA over the field Fp
an example with 239 bit prime
private  void testGeneration()
           
private  void testParameters()
           
 
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

k1

byte[] k1

k2

byte[] k2

random

java.security.SecureRandom random
Constructor Detail

DSATest

public DSATest()
Method Detail

testCompat

public void testCompat()
                throws java.lang.Exception
Throws:
java.lang.Exception

checkPublic

private void checkPublic(java.security.interfaces.DSAPublicKey k1,
                         java.security.PublicKey vKey)

checkPrivateKey

private void checkPrivateKey(java.security.interfaces.DSAPrivateKey k2,
                             java.security.PrivateKey sKey)

serializeDeserialize

private java.lang.Object serializeDeserialize(java.lang.Object o)
                                       throws java.lang.Exception
Throws:
java.lang.Exception

testECDSA239bitPrime

private void testECDSA239bitPrime()
                           throws java.lang.Exception
X9.62 - 1998,
J.3.2, Page 155, ECDSA over the field Fp
an example with 239 bit prime

Throws:
java.lang.Exception

testECDSA239bitBinary

private void testECDSA239bitBinary()
                            throws java.lang.Exception
X9.62 - 1998,
J.2.1, Page 100, ECDSA over the field F2m
an example with 191 bit binary field

Throws:
java.lang.Exception

testECDSA239bitBinary

private void testECDSA239bitBinary(java.lang.String algorithm,
                                   DERObjectIdentifier oid)
                            throws java.lang.Exception
Throws:
java.lang.Exception

testGeneration

private void testGeneration()
                     throws java.lang.Exception
Throws:
java.lang.Exception

testParameters

private void testParameters()
                     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

derDecode

protected java.math.BigInteger[] derDecode(byte[] encoding)
                                    throws java.io.IOException
Throws:
java.io.IOException

getName

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

main

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