aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md1
-rw-r--r--docs/LIBS.md2
-rw-r--r--lib/wolfcrypt-jni.jarbin0 -> 83453 bytes
-rw-r--r--nbproject/standalone/manifest.mf2
-rw-r--r--nbproject/standalone/project.properties1
-rw-r--r--src/cz/crcs/ectester/standalone/ECTesterStandalone.java13
-rw-r--r--src/cz/crcs/ectester/standalone/libs/WolfCryptLib.java18
7 files changed, 35 insertions, 2 deletions
diff --git a/README.md b/README.md
index d70ae9b..d23922d 100644
--- a/README.md
+++ b/README.md
@@ -270,6 +270,7 @@ Currently supported libraries include:
- [Sun EC](https://docs.oracle.com/javase/7/docs/technotes/guides/security/SunProviders.html#SunEC)
- [OpenSSL](https://www.openssl.org/)
- [BoringSSL](https://boringssl.googlesource.com/boringssl)
+ - [wolfSSL](https://www.wolfssl.com/)
- [Crypto++](https://cryptopp.com/)
- [libtomcrypt](http://www.libtom.net/LibTomCrypt/)
- [libgcrypt](https://www.gnupg.org/related_software/libgcrypt/)
diff --git a/docs/LIBS.md b/docs/LIBS.md
index faab84d..d41f98a 100644
--- a/docs/LIBS.md
+++ b/docs/LIBS.md
@@ -55,6 +55,8 @@ Libraries that ECTester can test.
- Uses Lopez-Dahab (Montgomery) ladder, XZ coordinates (ec2_mont.c): Fast multiplication on elliptic curves over GF(2^m) without precomputation (Algorithm 2P)
- Contains an implementation of IEEE P1363 algorithm A.10.3 using affine coordinates (ec2_aff.c)
- Has some custom arithmetic for some of the NIST primes.
+ - [WolfCrypt](https://www.wolfssl.com)
+ - C + Java
- [OpenSSL](https://www.openssl.org/)
- C
- For prime field curves:
diff --git a/lib/wolfcrypt-jni.jar b/lib/wolfcrypt-jni.jar
new file mode 100644
index 0000000..890ae14
--- /dev/null
+++ b/lib/wolfcrypt-jni.jar
Binary files differ
diff --git a/nbproject/standalone/manifest.mf b/nbproject/standalone/manifest.mf
index 5e8f5d9..ad7aacb 100644
--- a/nbproject/standalone/manifest.mf
+++ b/nbproject/standalone/manifest.mf
@@ -1,4 +1,4 @@
Manifest-Version: 1.0
-Class-Path: lib/bcprov-jdk15on-1.58.jar lib/jcardsim-3.0.4-SNAPSHOT.jar lib/commons-cli-1.4.jar lib/snakeyaml-1.19.jar
+Class-Path: lib/bcprov-jdk15on-1.58.jar lib/wolfcrypt-jni.jar lib/jcardsim-3.0.4-SNAPSHOT.jar lib/commons-cli-1.4.jar lib/snakeyaml-1.19.jar
Main-Class: cz.crcs.ectester.standalone.ECTesterStandalone
diff --git a/nbproject/standalone/project.properties b/nbproject/standalone/project.properties
index 6b6d440..29ad3cc 100644
--- a/nbproject/standalone/project.properties
+++ b/nbproject/standalone/project.properties
@@ -34,6 +34,7 @@ includes=**/common/**,**/standalone/**,**/data/**,**/applet/*
jar.compress=true
javac.classpath=\
lib/bcprov-jdk15on-1.58.jar:\
+ lib/wolfcrypt-jni.jar:\
lib/jcardsim-3.0.4-SNAPSHOT.jar:\
lib/commons-cli-1.4.jar:\
lib/snakeyaml-1.19.jar
diff --git a/src/cz/crcs/ectester/standalone/ECTesterStandalone.java b/src/cz/crcs/ectester/standalone/ECTesterStandalone.java
index 7480215..b6f5478 100644
--- a/src/cz/crcs/ectester/standalone/ECTesterStandalone.java
+++ b/src/cz/crcs/ectester/standalone/ECTesterStandalone.java
@@ -49,6 +49,7 @@ import javax.xml.parsers.ParserConfigurationException;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
+import java.lang.reflect.Field;
import java.nio.file.Files;
import java.security.*;
import java.security.interfaces.ECPrivateKey;
@@ -66,7 +67,17 @@ import java.util.stream.Collectors;
* @version v0.3.0
*/
public class ECTesterStandalone {
- private ProviderECLibrary[] libs = new ProviderECLibrary[]{new SunECLib(), new BouncyCastleLib(), new TomcryptLib(), new BotanLib(), new CryptoppLib(), new OpensslLib(), new BoringsslLib(), new GcryptLib(), new MscngLib()};
+ private ProviderECLibrary[] libs = new ProviderECLibrary[]{
+ new SunECLib(),
+ new BouncyCastleLib(),
+ new TomcryptLib(),
+ new BotanLib(),
+ new CryptoppLib(),
+ new OpensslLib(),
+ new BoringsslLib(),
+ new GcryptLib(),
+ new MscngLib(),
+ new WolfCryptLib()};
private Config cfg;
private Options opts = new Options();
diff --git a/src/cz/crcs/ectester/standalone/libs/WolfCryptLib.java b/src/cz/crcs/ectester/standalone/libs/WolfCryptLib.java
new file mode 100644
index 0000000..b58eb91
--- /dev/null
+++ b/src/cz/crcs/ectester/standalone/libs/WolfCryptLib.java
@@ -0,0 +1,18 @@
+package cz.crcs.ectester.standalone.libs;
+
+import com.wolfssl.provider.jce.WolfCryptProvider;
+
+import java.util.HashSet;
+import java.util.Set;
+
+public class WolfCryptLib extends ProviderECLibrary {
+
+ public WolfCryptLib() {
+ super(new WolfCryptProvider());
+ }
+
+ @Override
+ public Set<String> getCurves() {
+ return new HashSet<>();
+ }
+}