aboutsummaryrefslogtreecommitdiff
path: root/src/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java
diff options
context:
space:
mode:
authorJ08nY2019-07-04 01:53:38 +0200
committerJ08nY2019-07-04 01:55:34 +0200
commit19d09ebf00af0a09506ce3e7534bb658a8e999b9 (patch)
tree8bb8224d581a0f135c464db799df53c107e3d5e1 /src/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java
parent3e1e6cb5e4ee1c012346e563a630b89310799135 (diff)
downloadECTester-19d09ebf00af0a09506ce3e7534bb658a8e999b9.tar.gz
ECTester-19d09ebf00af0a09506ce3e7534bb658a8e999b9.tar.zst
ECTester-19d09ebf00af0a09506ce3e7534bb658a8e999b9.zip
Add mbedTLS support.
Diffstat (limited to 'src/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java')
-rw-r--r--src/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java b/src/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java
index 7b531f5..b098792 100644
--- a/src/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java
+++ b/src/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java
@@ -312,4 +312,25 @@ public abstract class NativeKeyAgreementSpi extends KeyAgreementSpi {
super("ECDHwithSHA512KDF(CNG)");
}
}
+
+ public abstract static class MbedTLS extends SimpleKeyAgreementSpi {
+ private String type;
+
+ public MbedTLS(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 MbedTLSECDH extends MbedTLS {
+ public MbedTLSECDH() {
+ super("ECDH");
+ }
+ }
+
}