aboutsummaryrefslogtreecommitdiff
path: root/java/com/google/security/wycheproof/testcases/EcKeyTest.java
diff options
context:
space:
mode:
authorDaulet Zhanguzin <dauletz@google.com>2020-05-13 18:42:09 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-05-13 18:42:09 +0000
commitcc2d6a6687dcbf47418f238d7db396fec3fb4d99 (patch)
treec57297b903987e510265cdb231e2c78e61d359a2 /java/com/google/security/wycheproof/testcases/EcKeyTest.java
parent364cf5b6836c585634805f955c99791215739d87 (diff)
parentbe7ca6c867d0a1704cf14ee08717ab4dde5aac77 (diff)
downloadwycheproof-cc2d6a6687dcbf47418f238d7db396fec3fb4d99.tar.gz
Remove deprecated BouncyCastle algorithms am: 013daa2841 am: 2c75c3e2c1 am: 858d8e28ae am: be7ca6c867
Change-Id: I568858214844d790624037c57c171ea919e00497
Diffstat (limited to 'java/com/google/security/wycheproof/testcases/EcKeyTest.java')
-rw-r--r--java/com/google/security/wycheproof/testcases/EcKeyTest.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/java/com/google/security/wycheproof/testcases/EcKeyTest.java b/java/com/google/security/wycheproof/testcases/EcKeyTest.java
index 8d3563c..a18a8ff 100644
--- a/java/com/google/security/wycheproof/testcases/EcKeyTest.java
+++ b/java/com/google/security/wycheproof/testcases/EcKeyTest.java
@@ -21,6 +21,8 @@
package com.google.security.wycheproof;
+import com.google.security.wycheproof.WycheproofRunner.ExcludedTest;
+import com.google.security.wycheproof.WycheproofRunner.ProviderType;
import java.math.BigInteger;
import java.security.InvalidAlgorithmParameterException;
import java.security.KeyFactory;
@@ -127,6 +129,9 @@ public class EcKeyTest extends TestCase {
+ "8c0b49bbb85c3303ddb1553c3b761c2caacca71606ba9ebac8",
};
+ @ExcludedTest(
+ providers = {ProviderType.BOUNCY_CASTLE},
+ comment = "KeyFactory.EC is removed")
public void testEncodedPublicKey() throws Exception {
KeyFactory kf = KeyFactory.getInstance("EC");
for (String encodedHex : EC_INVALID_PUBLIC_KEYS) {
@@ -142,6 +147,9 @@ public class EcKeyTest extends TestCase {
}
}
+ @ExcludedTest(
+ providers = {ProviderType.BOUNCY_CASTLE},
+ comment = "KeyPairGenerator.EC is removed")
public void testEncodedPrivateKey() throws Exception {
KeyPairGenerator keyGen = KeyPairGenerator.getInstance("EC");
keyGen.initialize(EcUtil.getNistP256Params());
@@ -185,6 +193,9 @@ public class EcKeyTest extends TestCase {
// TODO(bleichen): use RandomUtil
}
+ @ExcludedTest(
+ providers = {ProviderType.BOUNCY_CASTLE},
+ comment = "KeyPairGenerator.EC is removed")
public void testKeyGenerationAll() throws Exception {
testKeyGeneration(EcUtil.getNistP224Params(), true);
testKeyGeneration(EcUtil.getNistP256Params(), true);
@@ -202,6 +213,9 @@ public class EcKeyTest extends TestCase {
* Nist recommends a minimal security strength of 112 bits for the time until 2030.
* To achieve this security strength EC keys of at least 224 bits are required.
*/
+ @ExcludedTest(
+ providers = {ProviderType.BOUNCY_CASTLE},
+ comment = "KeyPairGenerator.EC is removed")
public void testDefaultKeyGeneration() throws Exception {
KeyPairGenerator keyGen = KeyPairGenerator.getInstance("EC");
KeyPair keyPair = keyGen.generateKeyPair();