Fixing ECDH tests.
1/ Catching unchecked exceptions to not crash the JVM. Wycheproof found that some Java security providers would throw unchecked exceptions when processing attacker-controlled input. To prevent DoS attacks, we'd catch these exceptions in Tink. 2/ Do not report errors if the shared secret is correct. Android M and N ignore the public key parameters, thus we'd stop reporting errors in tests that modify parameters if the shared secret is still correct. 3/ Skipping CVE-2017-10176 test because it's not a severe issue. PiperOrigin-RevId: 191113399 GitOrigin-RevId: b069f3af3f515b30b5cc1e2af791b226fb0635c5
Showing
- java/src/main/java/com/google/crypto/tink/subtle/EllipticCurves.java 23 additions, 11 deletions...in/java/com/google/crypto/tink/subtle/EllipticCurves.java
- java/src/test/java/com/google/crypto/tink/WycheproofTestUtil.java 14 additions, 0 deletions.../test/java/com/google/crypto/tink/WycheproofTestUtil.java
- java/src/test/java/com/google/crypto/tink/subtle/EllipticCurvesTest.java 26 additions, 8 deletions...ava/com/google/crypto/tink/subtle/EllipticCurvesTest.java
- testdata/wycheproof/ecdh_test.json 12 additions, 12 deletionstestdata/wycheproof/ecdh_test.json
Please register or sign in to comment