Class RainbowSignatureTest
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- org.bouncycastle.pqc.jcajce.provider.test.RainbowSignatureTest
-
- All Implemented Interfaces:
junit.framework.Test
public class RainbowSignatureTest extends junit.framework.TestCaseTest cases for the use of Rainbow with the BCPQC provider.
-
-
Constructor Summary
Constructors Constructor Description RainbowSignatureTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getBytesFromFile(java.io.File file)java.security.PublicKeygetPublicKey(java.lang.String file)protected voidperformSignVerifyTest(int numPassesKPG, int numPassesSigVer, int keySize)Test signature generation and verificationprotected voidperformSignVerifyTest(int numPassesKPG, int numPassesSigVer, java.security.spec.AlgorithmParameterSpec kpgParams)Test signature generation and verificationprotected voidperformSignVerifyTest(int numPassesKPG, int numPassesSigVer, java.security.spec.AlgorithmParameterSpec kpgParams, int messageSize)Test signature generation and verificationvoidsetUp()voidtest_KeyFactory()voidtestRainbowithSHA256()voidtestRainbowWithSHA224()Using ParameterSpecs to initialize the key pair generator without initialization.voidtestRainbowWithSHA384()voidtestRainbowWithSHA512()voidtestSignVerifyWithDefaultParams()voidtestSignVerifyWithRandomParams()-
Methods inherited from class junit.framework.TestCase
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, tearDown, toString
-
-
-
-
Method Detail
-
setUp
public void setUp()
- Overrides:
setUpin classjunit.framework.TestCase
-
performSignVerifyTest
protected final void performSignVerifyTest(int numPassesKPG, int numPassesSigVer, java.security.spec.AlgorithmParameterSpec kpgParams) throws java.lang.ExceptionTest signature generation and verification- Parameters:
numPassesKPG- the number of key pair generation passesnumPassesSigVer- the number of sign/verify passeskpgParams- the parameters for the key pair generator- Throws:
java.lang.Exception
-
performSignVerifyTest
protected final void performSignVerifyTest(int numPassesKPG, int numPassesSigVer, java.security.spec.AlgorithmParameterSpec kpgParams, int messageSize) throws java.lang.ExceptionTest signature generation and verification- Parameters:
numPassesKPG- the number of key pair generation passesnumPassesSigVer- the number of sign/verify passeskpgParams- the parameters for the key pair generatormessageSize- length of the messages which are signed in bytes- Throws:
java.lang.Exception
-
performSignVerifyTest
protected final void performSignVerifyTest(int numPassesKPG, int numPassesSigVer, int keySize) throws java.lang.ExceptionTest signature generation and verification- Parameters:
numPassesKPG- the number of key pair generation passesnumPassesSigVer- the number of sign/verify passeskeySize- the key size for the key pair generator- Throws:
java.lang.Exception
-
testRainbowWithSHA224
public void testRainbowWithSHA224() throws java.lang.ExceptionUsing ParameterSpecs to initialize the key pair generator without initialization.- Throws:
java.lang.Exception
-
testRainbowithSHA256
public void testRainbowithSHA256() throws java.lang.Exception- Throws:
java.lang.Exception
-
testRainbowWithSHA384
public void testRainbowWithSHA384() throws java.lang.Exception- Throws:
java.lang.Exception
-
testRainbowWithSHA512
public void testRainbowWithSHA512() throws java.lang.Exception- Throws:
java.lang.Exception
-
test_KeyFactory
public void test_KeyFactory() throws java.lang.Exception- Throws:
java.lang.Exception
-
testSignVerifyWithRandomParams
public void testSignVerifyWithRandomParams() throws java.lang.Exception- Throws:
java.lang.Exception
-
testSignVerifyWithDefaultParams
public void testSignVerifyWithDefaultParams() throws java.lang.Exception- Throws:
java.lang.Exception
-
getPublicKey
public java.security.PublicKey getPublicKey(java.lang.String file) throws java.lang.Exception- Throws:
java.lang.Exception
-
getBytesFromFile
public byte[] getBytesFromFile(java.io.File file) throws java.io.IOException- Throws:
java.io.IOException
-
-