diff --git a/java/com/google/security/wycheproof/testcases/AesGcmTest.java b/java/com/google/security/wycheproof/testcases/AesGcmTest.java index 68c5f0f..37045d2 100644 --- a/java/com/google/security/wycheproof/testcases/AesGcmTest.java +++ b/java/com/google/security/wycheproof/testcases/AesGcmTest.java @@ -409,6 +409,10 @@ public class AesGcmTest { } /** Encryption and decryption with large arrays should be copy-safe. */ + @NoPresubmitTest( + providers = {ProviderType.BOUNCY_CASTLE}, + bugs = {"b/64378943"} + ) @Test public void testLargeArrayAlias() throws Exception { byte[] ptVector = new byte[8192]; @@ -484,6 +488,10 @@ public class AesGcmTest { * * @see https://bugs.openjdk.java.net/browse/JDK-8181386 */ + @NoPresubmitTest( + providers = {ProviderType.BOUNCY_CASTLE, ProviderType.OPENJDK}, + bugs = {"b/64378943"} + ) @Test public void testByteBufferShiftedAlias() throws Exception { byte[] ptVector = new byte[8192]; diff --git a/java/com/google/security/wycheproof/testcases/DhTest.java b/java/com/google/security/wycheproof/testcases/DhTest.java index a908e0f..41e504f 100644 --- a/java/com/google/security/wycheproof/testcases/DhTest.java +++ b/java/com/google/security/wycheproof/testcases/DhTest.java @@ -349,6 +349,10 @@ public class DhTest { * https://docs.oracle.com/javase/7/docs/api/java/security/KeyPairGenerator.html an implementation * of the Java platform is only required to support 1024 bit keys. */ + @NoPresubmitTest( + providers = {ProviderType.OPENJDK, ProviderType.BOUNCY_CASTLE}, + bugs = {"b/33190860", "b/33190677"} + ) @SlowTest(providers = {ProviderType.BOUNCY_CASTLE, ProviderType.SPONGY_CASTLE}) @Test public void testDefaultKeyPairGenerator() throws Exception { diff --git a/java/com/google/security/wycheproof/testcases/DhiesTest.java b/java/com/google/security/wycheproof/testcases/DhiesTest.java index c004022..10e9693 100644 --- a/java/com/google/security/wycheproof/testcases/DhiesTest.java +++ b/java/com/google/security/wycheproof/testcases/DhiesTest.java @@ -187,10 +187,19 @@ public class DhiesTest { *
  • CVE-2016-1000344 BouncyCaslte before v.1.56 used ECB mode as a default. * */ + @NoPresubmitTest( + providers = {ProviderType.BOUNCY_CASTLE}, + bugs = {"b/31101111: won't fix, all BC DHIES modes are banned"} + ) @Test public void testSemanticSecurityDhiesWithAes() throws Exception { testNotEcb("DHIESWithAES"); } + + @NoPresubmitTest( + providers = {ProviderType.BOUNCY_CASTLE}, + bugs = {"b/31101111: won't fix, all BC DHIES modes are banned"} + ) @Test public void testSemanticSecurityDhiesWithDesede() throws Exception { testNotEcb("DHIESWITHDESEDE"); diff --git a/java/com/google/security/wycheproof/testcases/DsaTest.java b/java/com/google/security/wycheproof/testcases/DsaTest.java index ccf60ed..3e602c1 100644 --- a/java/com/google/security/wycheproof/testcases/DsaTest.java +++ b/java/com/google/security/wycheproof/testcases/DsaTest.java @@ -917,6 +917,10 @@ public class DsaTest { * https://docs.oracle.com/javase/7/docs/api/java/security/KeyPairGenerator.html only requires * that 1024 bits are supported. */ + @NoPresubmitTest( + providers = {ProviderType.OPENJDK, ProviderType.BOUNCY_CASTLE}, + bugs = {"b/33190860", "b/33190677"} + ) @Test public void testDefaultKeySize() throws Exception { KeyPairGenerator keyGen = KeyPairGenerator.getInstance("DSA"); diff --git a/java/com/google/security/wycheproof/testcases/EcdhTest.java b/java/com/google/security/wycheproof/testcases/EcdhTest.java index 8737066..8fb438b 100644 --- a/java/com/google/security/wycheproof/testcases/EcdhTest.java +++ b/java/com/google/security/wycheproof/testcases/EcdhTest.java @@ -1888,6 +1888,11 @@ public static final EcPublicKeyTestVector EC_VALID_PUBLIC_KEY = } } } + + @NoPresubmitTest( + providers = {ProviderType.BOUNCY_CASTLE}, + bugs = {"BouncyCastle uses long encoding. Is this a bug?"} + ) @Test public void testEncode() throws Exception { KeyFactory kf = KeyFactory.getInstance("EC"); @@ -2209,6 +2214,11 @@ public static final EcPublicKeyTestVector EC_VALID_PUBLIC_KEY = // testLargePrivateKey(EcUtil.getNistP521Params()); testLargePrivateKey(EcUtil.getBrainpoolP256r1Params()); } + + @NoPresubmitTest( + providers = {ProviderType.OPENJDK}, + bugs = {"CVE-2017-10176"} + ) @Test public void testLargePrivateKeyNoPresubmit() throws Exception { testLargePrivateKey(EcUtil.getNistP521Params()); diff --git a/java/com/google/security/wycheproof/testcases/EciesTest.java b/java/com/google/security/wycheproof/testcases/EciesTest.java index 0daf04e..b22e1d2 100644 --- a/java/com/google/security/wycheproof/testcases/EciesTest.java +++ b/java/com/google/security/wycheproof/testcases/EciesTest.java @@ -208,6 +208,11 @@ public class EciesTest { public void testEciesCorruptDefault() throws Exception { testExceptions("ECIES"); } + + @NoPresubmitTest( + providers = {ProviderType.BOUNCY_CASTLE}, + bugs = {"b/30424901: won't fix, all BC ECIES modes are banned"} + ) @Test public void testEciesCorruptAesCbc() throws Exception { testExceptions("ECIESWithAES-CBC"); @@ -283,11 +288,19 @@ public class EciesTest { } /** BouncyCastle v1.52 uses ECB as default for ECIES with AES. */ + @NoPresubmitTest( + providers = {ProviderType.BOUNCY_CASTLE}, + bugs = {"b/30424901: won't fix, all BC ECIES modes are banned"} + ) @Test public void testDefaultEciesWithAes() throws Exception { testNotEcb("ECIESWithAES"); } /** BouncyCastle v1.52 uses ECB as default for ECIES with DESede. */ + @NoPresubmitTest( + providers = {ProviderType.BOUNCY_CASTLE}, + bugs = {"b/30424901: won't fix, all BC ECIES modes are banned"} + ) @Test public void testDefaultEciesWithDESede() throws Exception { testNotEcb("ECIESwithDESede"); @@ -341,6 +354,10 @@ public class EciesTest { * Encryption with ByteBuffers. This currently fails with BouncyCastle. Possibly this is the same * bug as http://www.bouncycastle.org/jira/browse/BJA-577 and should be fixed in version 1.53. */ + @NoPresubmitTest( + providers = {ProviderType.BOUNCY_CASTLE}, + bugs = {"b/30424901: won't fix, all BC ECIES modes are banned"} + ) @Test public void testByteBuffer() throws Exception { ECGenParameterSpec ecSpec = new ECGenParameterSpec("secp256r1"); @@ -375,6 +392,10 @@ public class EciesTest { * *

    This test tries to verify this. */ + @NoPresubmitTest( + providers = {ProviderType.BOUNCY_CASTLE}, + bugs = {"b/30424901: won't fix, all BC ECIES modes are banned"} + ) @Test public void testByteBufferAlias() throws Exception { byte[] message = "Hello".getBytes("UTF-8"); diff --git a/java/com/google/security/wycheproof/testcases/JsonKeyWrapTest.java b/java/com/google/security/wycheproof/testcases/JsonKeyWrapTest.java index ef940ec..a1ddcb1 100644 --- a/java/com/google/security/wycheproof/testcases/JsonKeyWrapTest.java +++ b/java/com/google/security/wycheproof/testcases/JsonKeyWrapTest.java @@ -233,10 +233,20 @@ public class JsonKeyWrapTest { assertEquals(1, exceptions.size()); } } + + @NoPresubmitTest( + providers = {ProviderType.BOUNCY_CASTLE}, + bugs = {"b/77572633"} + ) @Test public void testAesWrap() throws Exception { testKeywrap("kw_test.json", "AESWRAP", "HMACSHA256", false); } + + @NoPresubmitTest( + providers = {ProviderType.BOUNCY_CASTLE}, + bugs = {"b/77572633"} + ) @Test public void testAesRFC5649Wrap() throws Exception { testKeywrap("kwp_test.json", "AESRFC5649WRAP", "HMACSHA256", false); diff --git a/java/com/google/security/wycheproof/testcases/JsonSignatureTest.java b/java/com/google/security/wycheproof/testcases/JsonSignatureTest.java index e907891..38dcb4f 100644 --- a/java/com/google/security/wycheproof/testcases/JsonSignatureTest.java +++ b/java/com/google/security/wycheproof/testcases/JsonSignatureTest.java @@ -332,6 +332,10 @@ public class JsonSignatureTest { } // Testing DSA signatures. + @NoPresubmitTest( + providers = {ProviderType.OPENJDK}, + bugs = {"b/33446454"} + ) @ExcludedTest( providers = {ProviderType.CONSCRYPT}, comment = "Conscrypt does not support DSA.") diff --git a/java/com/google/security/wycheproof/testcases/RsaKeyTest.java b/java/com/google/security/wycheproof/testcases/RsaKeyTest.java index 3eecc70..f208e42 100644 --- a/java/com/google/security/wycheproof/testcases/RsaKeyTest.java +++ b/java/com/google/security/wycheproof/testcases/RsaKeyTest.java @@ -1536,6 +1536,10 @@ public class RsaKeyTest { * implementation of the Java platform is required to implement RSA with both 1024 and 2048 bit * key sizes. Hence a 2048 bit default should not lead to compatibility problems. */ + @NoPresubmitTest( + providers = {ProviderType.OPENJDK}, + bugs = {"b/33190530"} + ) @Test public void testDefaultKeySize() throws Exception { KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA"); @@ -1640,6 +1644,10 @@ public class RsaKeyTest { }; // TODO(bleichen): This test is only needed as long as there are open issues. + @NoPresubmitTest( + providers = {ProviderType.OPENJDK}, + bugs = {"b/32656910"} + ) @Test public void testProblematicPublicKeyDecoding() throws Exception { KeyFactory kf = KeyFactory.getInstance("RSA");