blob: 791baa1d72c2b3670fa4c4be8970ffba1c8a1e48 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
package org.bouncycastle.pqc.jcajce.provider.test;
import java.security.KeyPairGenerator;
import java.security.spec.AlgorithmParameterSpec;
import javax.crypto.Cipher;
import org.bouncycastle.pqc.jcajce.spec.ECCKeyGenParameterSpec;
public class McEliecePointchevalCipherTest
extends AsymmetricHybridCipherTest
{
protected void setUp()
{
super.setUp();
try
{
kpg = KeyPairGenerator.getInstance("McEliecePointcheval");
cipher = Cipher.getInstance("McEliecePointchevalWithSHA256");
}
catch (Exception e)
{
e.printStackTrace();
}
}
/**
* Test encryption and decryption performance for SHA256 message digest and parameters
* m=11, t=50.
*/
public void testEnDecryption_SHA256_11_50()
throws Exception
{
// initialize key pair generator
AlgorithmParameterSpec kpgParams = new ECCKeyGenParameterSpec(11, 50);
kpg.initialize(kpgParams);
// perform test
performEnDecryptionTest(1, 10, 32, null);
}
}
|