Some documentation and extra information (#50)

* Add more information about the used Java Runtime and the tested provider version

* Added some recent information about SunEC and Utimaco HSM problems
This commit is contained in:
Juraj Somorovsky
2018-04-27 23:36:45 +02:00
committed by Thai Duong
parent 933e2e10aa
commit 0329f5b751
4 changed files with 14 additions and 2 deletions
@@ -93,4 +93,10 @@ public class TestUtil {
Provider provider = (Provider) Class.forName(className).getConstructor().newInstance();
Security.insertProviderAt(provider, 1);
}
public static void printJavaInformation() {
System.out.println("Running with: ");
System.out.println(" java.runtime.name: " + System.getProperty("java.runtime.name"));
System.out.println(" java.runtime.version: " + System.getProperty("java.runtime.version"));
}
}
@@ -190,6 +190,7 @@ public class WycheproofRunner extends Suite {
public WycheproofRunner(Class<?> runnerClass, RunnerBuilder builder) throws InitializationError {
super(runnerClass, builder);
addFilter(new ExcludeTestFilter(runnerClass));
TestUtil.printJavaInformation();
}
private void addFilter(Filter filter) {
@@ -29,7 +29,7 @@ public class BasicTest {
public void testListAllAlgorithms() {
for (Provider p : Security.getProviders()) {
System.out.println();
System.out.println("Provider:" + p.getName());
System.out.println("Provider: " + p.getName() + " " + p.getVersion());
// Using a TreeSet here, because the elements are sorted.
TreeSet<String> list = new TreeSet<String>();
for (Object key : p.keySet()) {
@@ -57,6 +57,10 @@ import org.junit.runners.JUnit4;
* <p>Adrian Antipa, Daniel Brown, Alfred Menezes, Rene Struik, and Scott Vanstone, "Validation of
* Elliptic Curve Public Keys", PKC 2003, https://www.iacr.org/archive/pkc2003/25670211/25670211.pdf
*
* <p>Tibor Jager, Jörg Schwenk, Juraj Somorovsky, "Practical Invalid Curve Attacks on TLS-ECDH",
* ESORICS'15, https://www.nds.rub.de/research/publications/ESORICS15/
* (describes attacks on BouncyCastle and SunEC)
*
* <p><b>Bugs:</b> CVE-2015-7940: BouncyCastle before 1.51 does not validate a point is on the
* curve. BouncyCastle v.1.52 checks that the public key point is on the public key curve but does
* not check whether public key and private key use the same curve. BouncyCastle v.1.53 is still
@@ -64,7 +68,8 @@ import org.junit.runners.JUnit4;
* used by the public key. ECDHC would then reduce the private key modulo this order, which can be
* used to find the private key.
*
* <p>SunEC had similar problem. CVE ?
* <p>CVE-2015-6924: Utimaco HSMs vulnerable to invalid curve attacks, which made the private key
* extraction possible.
*
* <p>CVE-2015-7940: Issue with elliptic curve addition in mixed Jacobian-affine coordinates
*