blob: 263b9e5d4ac4852a04a0ee947b02f04eb59da24c (
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
44
45
46
47
|
package org.spongycastle.pqc.jcajce.provider.test;
import java.security.KeyPairGenerator;
import javax.crypto.Cipher;
import org.spongycastle.pqc.jcajce.spec.ECCKeyGenParameterSpec;
public class McEliecePKCSCipherTest
extends AsymmetricBlockCipherTest
{
protected void setUp()
{
super.setUp();
try
{
kpg = KeyPairGenerator.getInstance("McEliecePKCS");
cipher = Cipher.getInstance("McEliecePKCSwithSHA256");
}
catch (Exception e)
{
e.printStackTrace();
}
}
public void testEnDecryption_9_33()
throws Exception
{
ECCKeyGenParameterSpec params = new ECCKeyGenParameterSpec(9, 33);
kpg.initialize(params);
performEnDecryptionTest(2, 10, params);
}
public void testEnDecryption_11_50()
throws Exception
{
ECCKeyGenParameterSpec params = new ECCKeyGenParameterSpec(11, 50);
kpg.initialize(params);
performEnDecryptionTest(2, 10, params);
}
}
|