aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md15
-rw-r--r--docs/LIBS.md5
-rw-r--r--standalone/src/main/java/cz/crcs/ectester/standalone/ECTesterStandalone.java1
-rw-r--r--standalone/src/main/java/cz/crcs/ectester/standalone/libs/MatrixsslLib.java20
-rw-r--r--standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeECPrivateKey.java7
-rw-r--r--standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeECPublicKey.java7
-rw-r--r--standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java20
-rw-r--r--standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeKeyPairGeneratorSpi.java19
-rw-r--r--standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeProvider.java11
-rw-r--r--standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeSignatureSpi.java21
-rw-r--r--standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/.gitignore3
-rw-r--r--standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/Makefile19
-rw-r--r--standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/matrixssl.c397
-rw-r--r--standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/mbedtls.c3
-rw-r--r--standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/native.h181
-rw-r--r--standalone/src/test/java/cz/crcs/ectester/standalone/LibTests.java1
16 files changed, 9 insertions, 721 deletions
diff --git a/README.md b/README.md
index 10a30b8..54f38b1 100644
--- a/README.md
+++ b/README.md
@@ -298,7 +298,6 @@ Currently supported libraries include:
- [Botan](https://botan.randombit.net/)
- [Microsoft CNG](https://msdn.microsoft.com/en-us/library/windows/desktop/aa376210(v=vs.85).aspx)
- [Intel Performance Primitives Crypto](https://github.com/intel/ipp-crypto)
- - [MatrixSSL](https://github.com/matrixssl/matrixssl)
- [MbedTLS](https://github.com/ARMmbed/mbedtls)
- [Nettle](https://www.lysator.liu.se/~nisse/nettle/)
- [LibreSSL](https://www.libressl.org/)
@@ -312,7 +311,7 @@ For more information on ECC libraries see [LIBS](docs/LIBS.md).
./gradlew :standalone:uberJar # To build the standalone tool (jar) -> "standalone/build/libs/ECTesterStandalone.jar"
```
Simply doing the above should build everything necessary to test libraries via the standalone app,
-(except the BoringSSL, LibreSSL, ipp-crypto and MatrixSSL libraries)
+(except the BoringSSL, LibreSSL, ipp-crypto, mbedTLS, and wolfCrypt libraries)
the sections below describe the details of how that works and what needs to be done if it doesn't.
To see whether your build was successful, run:
@@ -351,12 +350,12 @@ cc -fPIC -shared -O2 -o boringssl_provider.so -Wl,-rpath,'$ORIGIN/lib' boringssl
cc -fPIC -shared -O2 -o gcrypt_provider.so -Wl,-rpath,'$ORIGIN/lib' gcrypt.o c_utils.o -L. -lgcrypt -lgpg-error -l:lib_timing.so
cc -fPIC -shared -O2 -o mbedtls_provider.so -Wl,-rpath,'$ORIGIN/lib' mbedtls.o c_utils.o -L. -lmbedcrypto -l:lib_timing.so
cc -fPIC -shared -O2 -o ippcp_provider.so -Wl,-rpath,'$ORIGIN/lib' ippcp.o c_utils.o -L. -lippcp -l:lib_timing.so
-cc -fPIC -shared -O2 -o matrixssl_provider.so -Wl,-rpath,'$ORIGIN/lib' -L. matrixssl.o c_utils.o libcrypt_s.a libcore_s.a -l:lib_timing.so
g++ -fPIC -shared -O2 -o botan_provider.so -Wl,-rpath,'$ORIGIN/lib' botan.o cpp_utils.o -L. -lbotan-2 -fstack-protector -m64 -pthread -l:lib_timing.so
g++ -fPIC -shared -O2 -o cryptopp_provider.so -Wl,-rpath,'$ORIGIN/lib' cryptopp.o cpp_utils.o -L. -L/usr/local/lib -lcryptopp -l:lib_timing.so
```
-BoringSSL, LibreSSL, ipp-crypto and partially wolfCrypt are included as git submodules. Make sure you run: `git submodule update --init --recursive`
+BoringSSL, LibreSSL, ipp-crypto, mbedTLS and partially wolfCrypt are included as git submodules.
+Make sure you run: `git submodule update --init --recursive`
after checking out the ECTester repository to initialize them. To build BoringSSL do:
```shell
cd ext/boringssl
@@ -505,14 +504,6 @@ Snippet below shows how the `list-libs` command for well, listing currently supp
- KeyAgreements: ECDH
- Signatures: NONEwithECDSA
- Curves: secp112r1, secp112r2, secp128r1, secp128r2, secp160r1, secp160r2, secp192r1, secp224r1, secp256r1, secp384r1, secp521r1
-
- - MatrixSSL
- - Version: 4.100000
- - Supports native timing: [cputime-processor, cputime-thread, monotonic, monotonic-raw, rdtsc]
- - KeyPairGenerators: EC
- - KeyAgreements: ECDH
- - Signatures: NONEwithECDSA
- - Curves: brainpoolP224r1, brainpoolP256r1, brainpoolP384r1, brainpoolP512r1, secp192r1, secp224r1, secp256r1, secp384r1, secp521r1
```
Snippet below demonstrates generation of 1000 (`-n`) keys on the named curve `secp256r1` (`-nc`) using the BouncyCastle library.
diff --git a/docs/LIBS.md b/docs/LIBS.md
index 7baec65..4f10dfe 100644
--- a/docs/LIBS.md
+++ b/docs/LIBS.md
@@ -108,11 +108,6 @@ ninja
- Uses comb method for short Weierstrass curves, using (randomized) Jacobian coordinates.
- <http://www.hyperelliptic.org/EFD/g1p/auto-shortw-jacobian.html#doubling-dbl-1998-cmo-2>
- Uses Montgomery ladder with xz coordinates for Montgomery curves.
- - [MatrixSSL](https://github.com/matrixssl/matrixssl)
- - C
- - Only supports prime field curves.
- - Uses 4 bit sliding window.
- - Uses projective coordinates.
- [Intel Performance Primitives](https://software.intel.com/en-us/ipp-crypto-reference-2019)
- C
- Only supports prime field curves.
diff --git a/standalone/src/main/java/cz/crcs/ectester/standalone/ECTesterStandalone.java b/standalone/src/main/java/cz/crcs/ectester/standalone/ECTesterStandalone.java
index cfdb964..53e9024 100644
--- a/standalone/src/main/java/cz/crcs/ectester/standalone/ECTesterStandalone.java
+++ b/standalone/src/main/java/cz/crcs/ectester/standalone/ECTesterStandalone.java
@@ -121,7 +121,6 @@ public class ECTesterStandalone {
WolfCryptLib.class,
MbedTLSLib.class,
IppcpLib.class,
- MatrixsslLib.class,
NettleLib.class,
LibresslLib.class};
for (Class<?> c : libClasses) {
diff --git a/standalone/src/main/java/cz/crcs/ectester/standalone/libs/MatrixsslLib.java b/standalone/src/main/java/cz/crcs/ectester/standalone/libs/MatrixsslLib.java
deleted file mode 100644
index fcc13ea..0000000
--- a/standalone/src/main/java/cz/crcs/ectester/standalone/libs/MatrixsslLib.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package cz.crcs.ectester.standalone.libs;
-
-import java.security.Provider;
-import java.util.Set;
-
-/**
- * @author Jan Jancar johny@neuromancer.sk
- */
-public class MatrixsslLib extends NativeECLibrary {
-
- public MatrixsslLib() {
- super("matrixssl_provider");
- }
-
- @Override
- native Provider createProvider();
-
- @Override
- public native Set<String> getCurves();
-}
diff --git a/standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeECPrivateKey.java b/standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeECPrivateKey.java
index 34f04e9..a788181 100644
--- a/standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeECPrivateKey.java
+++ b/standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeECPrivateKey.java
@@ -120,13 +120,6 @@ public abstract class NativeECPrivateKey implements ECPrivateKey {
}
@SuppressWarnings("serial")
- public static class Matrixssl extends Raw {
- public Matrixssl(byte[] keyData, ECParameterSpec params) {
- super(keyData, params);
- }
- }
-
- @SuppressWarnings("serial")
public static class Libressl extends Raw {
public Libressl(byte[] keyData, ECParameterSpec params) {
super(keyData, params);
diff --git a/standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeECPublicKey.java b/standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeECPublicKey.java
index 16d903d..4761f11 100644
--- a/standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeECPublicKey.java
+++ b/standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeECPublicKey.java
@@ -121,13 +121,6 @@ public abstract class NativeECPublicKey implements ECPublicKey {
}
@SuppressWarnings("serial")
- public static class Matrixssl extends ANSIX962 {
- public Matrixssl(byte[] keyData, ECParameterSpec params) {
- super(keyData, params);
- }
- }
-
- @SuppressWarnings("serial")
public static class Libressl extends ANSIX962 {
public Libressl(byte[] keyData, ECParameterSpec params) {
super(keyData, params);
diff --git a/standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java b/standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java
index 938af73..894da27 100644
--- a/standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java
+++ b/standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java
@@ -354,26 +354,6 @@ public abstract class NativeKeyAgreementSpi extends KeyAgreementSpi {
}
}
- public abstract static class Matrixssl extends SimpleKeyAgreementSpi {
- private final String type;
-
- public Matrixssl(String type) {
- this.type = type;
- }
-
- @Override
- native byte[] generateSecret(byte[] pubkey, byte[] privkey, ECParameterSpec params);
-
- @Override
- native SecretKey generateSecret(byte[] pubkey, byte[] privkey, ECParameterSpec params, String algorithm);
- }
-
- public static class MatrixsslECDH extends Matrixssl {
- public MatrixsslECDH() {
- super("ECDH");
- }
- }
-
public abstract static class Libressl extends SimpleKeyAgreementSpi {
private final String type;
diff --git a/standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeKeyPairGeneratorSpi.java b/standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeKeyPairGeneratorSpi.java
index 4b5d652..0a9487f 100644
--- a/standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeKeyPairGeneratorSpi.java
+++ b/standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeKeyPairGeneratorSpi.java
@@ -293,25 +293,6 @@ public abstract class NativeKeyPairGeneratorSpi extends KeyPairGeneratorSpi {
@Override
native KeyPair generate(AlgorithmParameterSpec params, SecureRandom random);
}
-
- public static class Matrixssl extends NativeKeyPairGeneratorSpi {
-
- public Matrixssl() {
- initialize(256, new SecureRandom());
- }
-
- @Override
- native boolean keysizeSupported(int keysize);
-
- @Override
- native boolean paramsSupported(AlgorithmParameterSpec params);
-
- @Override
- native KeyPair generate(int keysize, SecureRandom random);
-
- @Override
- native KeyPair generate(AlgorithmParameterSpec params, SecureRandom random);
- }
public static class Libressl extends NativeKeyPairGeneratorSpi {
diff --git a/standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeProvider.java b/standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeProvider.java
index e036937..9ea1186 100644
--- a/standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeProvider.java
+++ b/standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeProvider.java
@@ -125,17 +125,6 @@ public abstract class NativeProvider extends Provider {
}
@SuppressWarnings("serial")
- public static class Matrixssl extends NativeProvider {
-
- public Matrixssl(String name, double version, String info) {
- super(name, version, info);
- }
-
- @Override
- native void setup();
- }
-
- @SuppressWarnings("serial")
public static class Libressl extends NativeProvider {
public Libressl(String name, double version, String info) {
diff --git a/standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeSignatureSpi.java b/standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeSignatureSpi.java
index fd8d5ca..571a2ee 100644
--- a/standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeSignatureSpi.java
+++ b/standalone/src/main/java/cz/crcs/ectester/standalone/libs/jni/NativeSignatureSpi.java
@@ -505,27 +505,6 @@ public abstract class NativeSignatureSpi extends SignatureSpi {
}
}
- public abstract static class Matrixssl extends SimpleSignatureSpi {
- private final String type;
-
- public Matrixssl(String type) {
- this.type = type;
- }
-
- @Override
- native byte[] sign(byte[] data, byte[] privkey, ECParameterSpec params);
-
- @Override
- native boolean verify(byte[] signature, byte[] data, byte[] pubkey, ECParameterSpec params);
- }
-
- public static class MatrixsslECDSAwithNONE extends Matrixssl {
-
- public MatrixsslECDSAwithNONE() {
- super("NONEwithECDSA");
- }
- }
-
public abstract static class Mscng extends ExtendedSignatureSpi {
private final String type;
diff --git a/standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/.gitignore b/standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/.gitignore
index 777d8e0..5b1c500 100644
--- a/standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/.gitignore
+++ b/standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/.gitignore
@@ -1,6 +1,3 @@
-libcore_s.a
-libcrypt_s.a
-matrixssl/
*.o
*.so
diff --git a/standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/Makefile b/standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/Makefile
index 08c6374..6d7906e 100644
--- a/standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/Makefile
+++ b/standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/Makefile
@@ -5,8 +5,8 @@ CC?=gcc
CXX?=g++
LFLAGS+=-fPIC -shared
-CFLAGS+=-fPIC -I"$(JNI_INCLUDEDIR)" -I"$(JNI_PLATFORMINCLUDEDIR)" -I.
-CXXFLAGS+=-fPIC -I"$(JNI_INCLUDEDIR)" -I"$(JNI_PLATFORMINCLUDEDIR)" -I.
+CFLAGS+=-fPIC -I"$(JNI_INCLUDEDIR)" -I"$(JNI_PLATFORMINCLUDEDIR)" -I. -Wno-deprecated-declarations
+CXXFLAGS+=-fPIC -I"$(JNI_INCLUDEDIR)" -I"$(JNI_PLATFORMINCLUDEDIR)" -I. -Wno-deprecated-declarations
DEBUG ?= 0
PROJECT_ROOT_PATH ?= ../../../../../../../../../..
@@ -59,7 +59,7 @@ JNI_PLATFORMINCLUDEDIR ?= $(JNI_INCLUDEDIR)/$(JNI_PLATFORM)
###############################################################################
## Targets.
-all: tomcrypt botan cryptopp openssl boringssl gcrypt mbedtls ippcp matrixssl nettle libressl
+all: tomcrypt botan cryptopp openssl boringssl gcrypt mbedtls ippcp nettle libressl
# Common utils
c_utils.o: c_utils.c
@@ -165,16 +165,6 @@ ippcp.o: ippcp.c
$(CC) -I$(PROJECT_ROOT_PATH)/ext/ipp-crypto/build/.build/RELEASE/include/ $(CFLAGS) -c $<
-# MatrixSSL shim
-matrixssl: matrixssl_provider.so
-
-matrixssl_provider.so: matrixssl.o c_utils.o | lib_timing.so
- $(CC) $(LFLAGS) -o $@ -Wl,-rpath,'$$ORIGIN/lib' -L. $^ libcrypt_s.a libcore_s.a -l:lib_timing.so
-
-matrixssl.o: matrixssl.c
- $(CC) $(CFLAGS) -Imatrixssl/ -c $<
-
-
# Nettle shim
nettle: nettle_provider.so
@@ -209,7 +199,6 @@ help:
@echo " - cryptopp"
@echo " - mbedtls"
@echo " - ippcp"
- @echo " - matrixssl"
@echo " - nettle"
@echo " - libressl"
@@ -218,4 +207,4 @@ clean:
rm -rf *.o
rm -rf *.so
-.PHONY: all help clean openssl boringssl gcrypt tomcrypt botan cryptopp mbedtls ippcp matrixssl nettle libressl
+.PHONY: all help clean openssl boringssl gcrypt tomcrypt botan cryptopp mbedtls ippcp nettle libressl
diff --git a/standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/matrixssl.c b/standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/matrixssl.c
deleted file mode 100644
index 8324dd4..0000000
--- a/standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/matrixssl.c
+++ /dev/null
@@ -1,397 +0,0 @@
-#include "native.h"
-#include <string.h>
-#include <stdio.h>
-
-#include <cryptoApi.h>
-#include <coreApi.h>
-
-#include "c_utils.h"
-#include "c_timing.h"
-
-static jclass provider_class;
-
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_MatrixsslLib_createProvider(JNIEnv *env, jobject this) {
- /* Create the custom provider. */
- jclass local_provider_class = (*env)->FindClass(env, "cz/crcs/ectester/standalone/libs/jni/NativeProvider$Matrixssl");
- provider_class = (*env)->NewGlobalRef(env, local_provider_class);
-
- jmethodID init = (*env)->GetMethodID(env, local_provider_class, "<init>", "(Ljava/lang/String;DLjava/lang/String;)V");
-
- jstring name = (*env)->NewStringUTF(env, "MatrixSSL");
- double version = 4.1;
-
- return (*env)->NewObject(env, provider_class, init, name, version, name);
-}
-
-JNIEXPORT void JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeProvider_00024Matrixssl_setup(JNIEnv *env, jobject this) {
- INIT_PROVIDER(env, provider_class);
-
- ADD_KPG(env, this, "EC", "Matrixssl");
- ADD_KA(env, this, "ECDH", "MatrixsslECDH");
- ADD_SIG(env, this, "NONEwithECDSA", "MatrixsslECDSAwithNONE");
-
- psCoreOpen(PSCORE_CONFIG);
- psOpenPrng();
-
- init_classes(env, "Matrixssl");
-}
-
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_MatrixsslLib_getCurves(JNIEnv *env, jobject this) {
- jclass hash_set_class = (*env)->FindClass(env, "java/util/TreeSet");
-
- jmethodID hash_set_ctr = (*env)->GetMethodID(env, hash_set_class, "<init>", "()V");
- jmethodID hash_set_add = (*env)->GetMethodID(env, hash_set_class, "add", "(Ljava/lang/Object;)Z");
-
- jobject result = (*env)->NewObject(env, hash_set_class, hash_set_ctr);
- size_t i = 0;
- while (eccCurves[i].size > 0) {
- jstring curve_name = (*env)->NewStringUTF(env, eccCurves[i].name);
- (*env)->CallBooleanMethod(env, result, hash_set_add, curve_name);
- i++;
- }
- return result;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Matrixssl_keysizeSupported(JNIEnv *env, jobject this, jint keysize) {
- size_t i = 0;
- while (eccCurves[i].size > 0) {
- if (eccCurves[i].size * 8 == keysize) {
- return JNI_TRUE;
- }
- i++;
- }
- return JNI_FALSE;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Matrixssl_paramsSupported(JNIEnv *env, jobject this, jobject params) {
- if (params == NULL) {
- return JNI_FALSE;
- }
-
- if ((*env)->IsInstanceOf(env, params, ec_parameter_spec_class)) {
- jmethodID get_curve = (*env)->GetMethodID(env, ec_parameter_spec_class, "getCurve", "()Ljava/security/spec/EllipticCurve;");
- jobject curve = (*env)->CallObjectMethod(env, params, get_curve);
-
- jmethodID get_field = (*env)->GetMethodID(env, elliptic_curve_class, "getField", "()Ljava/security/spec/ECField;");
- jobject field = (*env)->CallObjectMethod(env, curve, get_field);
- if ((*env)->IsInstanceOf(env, field, f2m_field_class)) {
- return JNI_FALSE;
- }
- return JNI_TRUE;
- } else if ((*env)->IsInstanceOf(env, params, ecgen_parameter_spec_class)) {
- jmethodID get_name = (*env)->GetMethodID(env, ecgen_parameter_spec_class, "getName", "()Ljava/lang/String;");
- jstring name = (*env)->CallObjectMethod(env, params, get_name);
- const char *utf_name = (*env)->GetStringUTFChars(env, name, NULL);
- size_t i = 0;
- while (eccCurves[i].size > 0) {
- if (strcasecmp(utf_name, eccCurves[i].name) == 0) {
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- return JNI_TRUE;
- }
- i++;
- }
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- return JNI_FALSE;
- } else {
- return JNI_FALSE;
- }
-}
-
-
-static jobject create_ec_param_spec(JNIEnv *env, const psEccCurve_t *curve) {
- jmethodID biginteger_init = (*env)->GetMethodID(env, biginteger_class, "<init>", "(Ljava/lang/String;I)V");
-
- jstring p_string = (*env)->NewStringUTF(env, curve->prime);
- jobject p = (*env)->NewObject(env, biginteger_class, biginteger_init, p_string, (jint) 16);
-
- jmethodID fp_field_init = (*env)->GetMethodID(env, fp_field_class, "<init>", "(Ljava/math/BigInteger;)V");
- jobject field = (*env)->NewObject(env, fp_field_class, fp_field_init, p);
-
- jstring a_string = (*env)->NewStringUTF(env, curve->A);
- jobject a = (*env)->NewObject(env, biginteger_class, biginteger_init, a_string, (jint) 16);
- jstring b_string = (*env)->NewStringUTF(env, curve->B);
- jobject b = (*env)->NewObject(env, biginteger_class, biginteger_init, b_string, (jint) 16);
-
- jmethodID elliptic_curve_init = (*env)->GetMethodID(env, elliptic_curve_class, "<init>", "(Ljava/security/spec/ECField;Ljava/math/BigInteger;Ljava/math/BigInteger;)V");
- jobject elliptic_curve = (*env)->NewObject(env, elliptic_curve_class, elliptic_curve_init, field, a, b);
-
- jstring gx_string = (*env)->NewStringUTF(env, curve->Gx);
- jstring gy_string = (*env)->NewStringUTF(env, curve->Gy);
- jobject gx = (*env)->NewObject(env, biginteger_class, biginteger_init, gx_string, (jint) 16);
- jobject gy = (*env)->NewObject(env, biginteger_class, biginteger_init, gy_string, (jint) 16);
-
- jmethodID point_init = (*env)->GetMethodID(env, point_class, "<init>", "(Ljava/math/BigInteger;Ljava/math/BigInteger;)V");
- jobject g = (*env)->NewObject(env, point_class, point_init, gx, gy);
-
- jstring n_string = (*env)->NewStringUTF(env, curve->order);
- jobject n = (*env)->NewObject(env, biginteger_class, biginteger_init, n_string, (jint) 16);
-
- jmethodID ec_parameter_spec_init = (*env)->GetMethodID(env, ec_parameter_spec_class, "<init>", "(Ljava/security/spec/EllipticCurve;Ljava/security/spec/ECPoint;Ljava/math/BigInteger;I)V");
- return (*env)->NewObject(env, ec_parameter_spec_class, ec_parameter_spec_init, elliptic_curve, g, n, (jint) 1);
-}
-
-static psEccCurve_t *create_curve(JNIEnv *env, jobject params) {
- psEccCurve_t *curve = calloc(sizeof(psEccCurve_t), 1);
-
- jmethodID get_curve = (*env)->GetMethodID(env, ec_parameter_spec_class, "getCurve", "()Ljava/security/spec/EllipticCurve;");
- jobject elliptic_curve = (*env)->CallObjectMethod(env, params, get_curve);
-
- jmethodID get_field = (*env)->GetMethodID(env, elliptic_curve_class, "getField", "()Ljava/security/spec/ECField;");
- jobject field = (*env)->CallObjectMethod(env, elliptic_curve, get_field);
-
- jmethodID get_bits = (*env)->GetMethodID(env, fp_field_class, "getFieldSize", "()I");
- jint bits = (*env)->CallIntMethod(env, field, get_bits);
- jint bytes = (bits + 7) / 8;
- curve->size = bytes;
-
- jmethodID get_p = (*env)->GetMethodID(env, fp_field_class, "getP", "()Ljava/math/BigInteger;");
- jobject p = (*env)->CallObjectMethod(env, field, get_p);
-
- jmethodID get_a = (*env)->GetMethodID(env, elliptic_curve_class, "getA", "()Ljava/math/BigInteger;");
- jobject a = (*env)->CallObjectMethod(env, elliptic_curve, get_a);
-
- jmethodID get_b = (*env)->GetMethodID(env, elliptic_curve_class, "getB", "()Ljava/math/BigInteger;");
- jobject b = (*env)->CallObjectMethod(env, elliptic_curve, get_b);
-
- jmethodID get_g = (*env)->GetMethodID(env, ec_parameter_spec_class, "getGenerator", "()Ljava/security/spec/ECPoint;");
- jobject g = (*env)->CallObjectMethod(env, params, get_g);
-
- jmethodID get_x = (*env)->GetMethodID(env, point_class, "getAffineX", "()Ljava/math/BigInteger;");
- jobject gx = (*env)->CallObjectMethod(env, g, get_x);
-
- jmethodID get_y = (*env)->GetMethodID(env, point_class, "getAffineY", "()Ljava/math/BigInteger;");
- jobject gy = (*env)->CallObjectMethod(env, g, get_y);
-
- jmethodID get_n = (*env)->GetMethodID(env, ec_parameter_spec_class, "getOrder", "()Ljava/math/BigInteger;");
- jobject n = (*env)->CallObjectMethod(env, params, get_n);
-
- //jmethodID get_h = (*env)->GetMethodID(env, ec_parameter_spec_class, "getCofactor", "()I");
- //jint h = (*env)->CallIntMethod(env, params, get_h);
-
- jmethodID get_bitlength = (*env)->GetMethodID(env, biginteger_class, "bitLength", "()I");
- jint ord_bits = (*env)->CallIntMethod(env, n, get_bitlength);
- jint ord_bytes = (ord_bits + 7) / 8;
-
- curve->prime = biginteger_to_hex(env, p, bytes);
- curve->A = biginteger_to_hex(env, a, bytes);
- curve->B = biginteger_to_hex(env, b, bytes);
- curve->Gx = biginteger_to_hex(env, gx, bytes);
- curve->Gy = biginteger_to_hex(env, gy, bytes);
- curve->order = biginteger_to_hex(env, n, ord_bytes);
- return curve;
-}
-
-static void free_curve(psEccCurve_t *curve) {
- free((char *)curve->prime);
- free((char *)curve->A);
- free((char *)curve->B);
- free((char *)curve->order);
- free((char *)curve->Gx);
- free((char *)curve->Gy);
-}
-
-static jobject generate_from_curve(JNIEnv *env, const psEccCurve_t *curve) {
- psEccKey_t *key;
- int32_t err = psEccNewKey(NULL, &key, curve);
- err = psEccInitKey(NULL, key, curve);
-
- native_timing_start();
- err = psEccGenKey(NULL, key, curve, NULL);
- native_timing_stop();
-
- if (err < 0) {
- throw_new(env, "java/security/GeneralSecurityException", "Couldn't generate key.");
- psEccClearKey(key);
- psEccDeleteKey(&key);
- return NULL;
- }
-
- jbyteArray priv = (*env)->NewByteArray(env, pstm_unsigned_bin_size(&key->k));
- jbyte *priv_data = (*env)->GetByteArrayElements(env, priv, NULL);
- pstm_to_unsigned_bin(NULL, &key->k, (unsigned char *) priv_data);
- (*env)->ReleaseByteArrayElements(env, priv, priv_data, 0);
-
- jint xlen = pstm_unsigned_bin_size(&key->pubkey.x);
- jint ylen = pstm_unsigned_bin_size(&key->pubkey.y);
- jbyteArray pub = (*env)->NewByteArray(env, 1 + xlen + ylen);
- jbyte *pub_data = (*env)->GetByteArrayElements(env, pub, NULL);
- pub_data[0] = 0x04;
- pstm_to_unsigned_bin(NULL, &key->pubkey.x, (unsigned char *) (pub_data + 1));
- pstm_to_unsigned_bin(NULL, &key->pubkey.y, (unsigned char *) (pub_data + 1 + xlen));
- (*env)->ReleaseByteArrayElements(env, pub, pub_data, 0);
-
- jobject ec_param_spec = create_ec_param_spec(env, curve);
-
- jobject ec_pub_param_spec = (*env)->NewLocalRef(env, ec_param_spec);
- jmethodID ec_pub_init = (*env)->GetMethodID(env, pubkey_class, "<init>", "([BLjava/security/spec/ECParameterSpec;)V");
- jobject pubkey = (*env)->NewObject(env, pubkey_class, ec_pub_init, pub, ec_pub_param_spec);
-
- jobject ec_priv_param_spec = (*env)->NewLocalRef(env, ec_param_spec);
- jmethodID ec_priv_init = (*env)->GetMethodID(env, privkey_class, "<init>", "([BLjava/security/spec/ECParameterSpec;)V");
- jobject privkey = (*env)->NewObject(env, privkey_class, ec_priv_init, priv, ec_priv_param_spec);
-
- jmethodID keypair_init = (*env)->GetMethodID(env, keypair_class, "<init>", "(Ljava/security/PublicKey;Ljava/security/PrivateKey;)V");
-
- psEccDeleteKey(&key);
-
- return (*env)->NewObject(env, keypair_class, keypair_init, pubkey, privkey);
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Matrixssl_generate__ILjava_security_SecureRandom_2(JNIEnv *env, jobject this, jint keysize, jobject random) {
- size_t i = 0;
- while (eccCurves[i].size > 0) {
- if (eccCurves[i].size * 8 == keysize) {
- return generate_from_curve(env, &eccCurves[i]);
- }
- i++;
- }
- return NULL;
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Matrixssl_generate__Ljava_security_spec_AlgorithmParameterSpec_2Ljava_security_SecureRandom_2(JNIEnv *env, jobject this, jobject params, jobject random) {
- if ((*env)->IsInstanceOf(env, params, ec_parameter_spec_class)) {
- psEccCurve_t *curve = create_curve(env, params);
- jobject result = generate_from_curve(env, curve);
- free_curve(curve);
- return result;
- } else if ((*env)->IsInstanceOf(env, params, ecgen_parameter_spec_class)) {
- jmethodID get_name = (*env)->GetMethodID(env, ecgen_parameter_spec_class, "getName", "()Ljava/lang/String;");
- jstring name = (*env)->CallObjectMethod(env, params, get_name);
- const char* utf_name = (*env)->GetStringUTFChars(env, name, NULL);
- size_t i = 0;
- while (eccCurves[i].size > 0) {
- if (strcasecmp(utf_name, eccCurves[i].name) == 0) {
- break;
- }
- i++;
- }
- (*env)->ReleaseStringUTFChars(env, name, utf_name);
- return generate_from_curve(env, &eccCurves[i]);
- } else {
- return NULL;
- }
-}
-
-static psEccKey_t *bytearray_to_privkey(JNIEnv *env, jbyteArray privkey, const psEccCurve_t *curve) {
- psEccKey_t *result;
- psEccNewKey(NULL, &result, curve);
- psEccInitKey(NULL, result, curve);
-
- pstm_init_for_read_unsigned_bin(NULL, &result->k, curve->size);
- jint len = (*env)->GetArrayLength(env, privkey);
- jbyte *priv_data = (*env)->GetByteArrayElements(env, privkey, NULL);
- pstm_read_unsigned_bin(&result->k, (unsigned char *) priv_data, len);
- (*env)->ReleaseByteArrayElements(env, privkey, priv_data, JNI_ABORT);
- result->type = PS_PRIVKEY;
-
- return result;
-}
-
-static psEccKey_t *bytearray_to_pubkey(JNIEnv *env, jbyteArray pubkey, const psEccCurve_t *curve) {
- psEccKey_t *result;
- psEccNewKey(NULL, &result, curve);
- psEccInitKey(NULL, result, curve);
-
- pstm_init_for_read_unsigned_bin(NULL, &result->pubkey.x, curve->size);
- pstm_init_for_read_unsigned_bin(NULL, &result->pubkey.y, curve->size);
- pstm_init_for_read_unsigned_bin(NULL, &result->pubkey.z, curve->size);
- jbyte *pubkey_data = (*env)->GetByteArrayElements(env, pubkey, NULL);
- pstm_read_unsigned_bin(&result->pubkey.x, (unsigned char *) (pubkey_data + 1), curve->size);
- pstm_read_unsigned_bin(&result->pubkey.y, (unsigned char *) (pubkey_data + 1 + curve->size), curve->size);
- (*env)->ReleaseByteArrayElements(env, pubkey, pubkey_data, JNI_ABORT);
- pstm_set(&result->pubkey.z, 1);
- result->type = PS_PUBKEY;
-
- return result;
-}
-
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Matrixssl_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2(JNIEnv *env, jobject this, jbyteArray pubkey, jbyteArray privkey, jobject params) {
- psEccCurve_t *curve = create_curve(env, params);
-
- psEccKey_t *priv = bytearray_to_privkey(env, privkey, curve);
- psEccKey_t *pub = bytearray_to_pubkey(env, pubkey, curve);
-
- jbyteArray result = (*env)->NewByteArray(env, curve->size);
- jbyte *result_data = (*env)->GetByteArrayElements(env, result, NULL);
- psSize_t outlen = curve->size;
-
- native_timing_start();
- int32_t err = psEccGenSharedSecret(NULL, priv, pub, (unsigned char *) result_data, &outlen, NULL);
- native_timing_stop();
- (*env)->ReleaseByteArrayElements(env, result, result_data, 0);
-
- psEccDeleteKey(&priv);
- psEccDeleteKey(&pub);
- free_curve(curve);
-
- if (err < 0) {
- throw_new(env, "java/security/GeneralSecurityException", "Couldn't derive secret.");
- return NULL;
- }
-
- return result;
-}
-
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Matrixssl_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2Ljava_lang_String_2(JNIEnv *env, jobject this, jbyteArray pubkey, jbyteArray privkey, jobject params, jstring algorithm) {
- throw_new(env, "java/lang/UnsupportedOperationException", "Not supported.");
- return NULL;
-}
-
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Matrixssl_sign(JNIEnv *env, jobject this, jbyteArray data, jbyteArray privkey, jobject params) {
- psEccCurve_t *curve = create_curve(env, params);
-
- psEccKey_t *priv = bytearray_to_privkey(env, privkey, curve);
-
- psSize_t siglen = 512;
- uint8_t sig[siglen];
-
- jint data_len = (*env)->GetArrayLength(env, data);
- jbyte *data_data = (*env)->GetByteArrayElements(env, data, NULL);
- native_timing_start();
- int32_t err = psEccDsaSign(NULL, priv, (unsigned char *) data_data, data_len, sig, &siglen, 0, NULL);
- native_timing_stop();
-
- psEccDeleteKey(&priv);
- free_curve(curve);
-
- if (err < 0) {
- throw_new(env, "java/security/GeneralSecurityException", "Couldn't sign data.");
- return NULL;
- }
-
- jbyteArray result = (*env)->NewByteArray(env, siglen);
- jbyte *result_data = (*env)->GetByteArrayElements(env, result, NULL);
- memcpy(result_data, sig, siglen);
- (*env)->ReleaseByteArrayElements(env, result, result_data, 0);
-
- return result;
-}
-
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Matrixssl_verify(JNIEnv *env, jobject this, jbyteArray signature, jbyteArray data, jbyteArray pubkey, jobject params) {
- psEccCurve_t *curve = create_curve(env, params);
- psEccKey_t *pub = bytearray_to_pubkey(env, pubkey, curve);
-
- jint data_len = (*env)->GetArrayLength(env, data);
- jint sig_len = (*env)->GetArrayLength(env, signature);
- jbyte *data_data = (*env)->GetByteArrayElements(env, data, NULL);
- jbyte *sig_data = (*env)->GetByteArrayElements(env, signature, NULL);
-
- int32_t result;
- native_timing_start();
- int32_t err = psEccDsaVerify(NULL, pub, (unsigned char *) data_data, data_len, (unsigned char *) sig_data, sig_len, &result, NULL);
- native_timing_stop();
- (*env)->ReleaseByteArrayElements(env, data, data_data, JNI_ABORT);
- (*env)->ReleaseByteArrayElements(env, signature, sig_data, JNI_ABORT);
-
- free_curve(curve);
- psEccDeleteKey(&pub);
-
- if (err < 0) {
- throw_new(env, "java/security/GeneralSecurityException", "Couldn't verify signature.");
- return JNI_FALSE;
- }
-
- return result < 0 ? JNI_FALSE : JNI_TRUE;
-} \ No newline at end of file
diff --git a/standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/mbedtls.c b/standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/mbedtls.c
index d618de2..f7e623e 100644
--- a/standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/mbedtls.c
+++ b/standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/mbedtls.c
@@ -1,5 +1,7 @@
#include "native.h"
#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
#include <mbedtls/ecdsa.h>
#include <mbedtls/ecdh.h>
@@ -7,7 +9,6 @@
#include <mbedtls/version.h>
#include <mbedtls/entropy.h>
#include <mbedtls/ctr_drbg.h>
-#include <stdio.h>
#include "c_utils.h"
#include "c_timing.h"
diff --git a/standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/native.h b/standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/native.h
index 8f5b521..dcaf57c 100644
--- a/standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/native.h
+++ b/standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/native.h
@@ -1680,187 +1680,6 @@ JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSigna
}
#endif
#endif
-/* Header for class cz_crcs_ectester_standalone_libs_MatrixsslLib */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_MatrixsslLib
-#define _Included_cz_crcs_ectester_standalone_libs_MatrixsslLib
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_MatrixsslLib
- * Method: createProvider
- * Signature: ()Ljava/security/Provider;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_MatrixsslLib_createProvider
- (JNIEnv *, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_MatrixsslLib
- * Method: getCurves
- * Signature: ()Ljava/util/Set;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_MatrixsslLib_getCurves
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl_serialVersionUID 1421746759512286392LL
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl_MAX_ARRAY_SIZE
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl_MAX_ARRAY_SIZE 2147483639L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl_KEYS
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl_KEYS 0L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl_VALUES
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl_VALUES 1L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl_ENTRIES
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl_ENTRIES 2L
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl_serialVersionUID 4112578634029874840LL
-#undef cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl_serialVersionUID
-#define cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl_serialVersionUID -4298000515446427739LL
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeProvider_Matrixssl
- * Method: setup
- * Signature: ()V
- */
-JNIEXPORT void JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeProvider_00024Matrixssl_setup
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Matrixssl */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Matrixssl
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Matrixssl
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Matrixssl_DEFAULT_KEYSIZE
-#define cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Matrixssl_DEFAULT_KEYSIZE 256L
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Matrixssl
- * Method: keysizeSupported
- * Signature: (I)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Matrixssl_keysizeSupported
- (JNIEnv *, jobject, jint);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Matrixssl
- * Method: paramsSupported
- * Signature: (Ljava/security/spec/AlgorithmParameterSpec;)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Matrixssl_paramsSupported
- (JNIEnv *, jobject, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Matrixssl
- * Method: generate
- * Signature: (ILjava/security/SecureRandom;)Ljava/security/KeyPair;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Matrixssl_generate__ILjava_security_SecureRandom_2
- (JNIEnv *, jobject, jint, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_Matrixssl
- * Method: generate
- * Signature: (Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)Ljava/security/KeyPair;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyPairGeneratorSpi_00024Matrixssl_generate__Ljava_security_spec_AlgorithmParameterSpec_2Ljava_security_SecureRandom_2
- (JNIEnv *, jobject, jobject, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_Matrixssl */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_Matrixssl
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPublicKey_Matrixssl
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_Matrixssl */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_Matrixssl
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeECPrivateKey_Matrixssl
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Matrixssl */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Matrixssl
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Matrixssl
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Matrixssl
- * Method: generateSecret
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Matrixssl_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_Matrixssl
- * Method: generateSecret
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;Ljava/lang/String;)Ljavax/crypto/SecretKey;
- */
-JNIEXPORT jobject JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeKeyAgreementSpi_00024Matrixssl_generateSecret___3B_3BLjava_security_spec_ECParameterSpec_2Ljava_lang_String_2
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject, jstring);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* Header for class cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Matrixssl */
-
-#ifndef _Included_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Matrixssl
-#define _Included_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Matrixssl
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Matrixssl
- * Method: sign
- * Signature: ([B[BLjava/security/spec/ECParameterSpec;)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Matrixssl_sign
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jobject);
-
-/*
- * Class: cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_Matrixssl
- * Method: verify
- * Signature: ([B[B[BLjava/security/spec/ECParameterSpec;)Z
- */
-JNIEXPORT jboolean JNICALL Java_cz_crcs_ectester_standalone_libs_jni_NativeSignatureSpi_00024Matrixssl_verify
- (JNIEnv *, jobject, jbyteArray, jbyteArray, jbyteArray, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
/* Header for class cz_crcs_ectester_standalone_libs_LibresslLib */
#ifndef _Included_cz_crcs_ectester_standalone_libs_LibresslLib
diff --git a/standalone/src/test/java/cz/crcs/ectester/standalone/LibTests.java b/standalone/src/test/java/cz/crcs/ectester/standalone/LibTests.java
index 6e11ccd..48a5d89 100644
--- a/standalone/src/test/java/cz/crcs/ectester/standalone/LibTests.java
+++ b/standalone/src/test/java/cz/crcs/ectester/standalone/LibTests.java
@@ -28,7 +28,6 @@ public class LibTests {
WolfCryptLib.class,
MbedTLSLib.class,
IppcpLib.class,
- MatrixsslLib.class,
NettleLib.class,
LibresslLib.class};
for (Class<?> c : libClasses) {