diff options
| author | J08nY | 2017-12-09 19:12:06 +0100 |
|---|---|---|
| committer | J08nY | 2017-12-09 19:12:06 +0100 |
| commit | 26ced2ccee2c83414f7c81dfad583400be0e91af (patch) | |
| tree | f6859ecef2d1a02495e44382ffcd95f8cdb2d030 /src/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java | |
| parent | 95e1d7db217bd93d811aa7c363d87a91e67bd22e (diff) | |
| download | ECTester-26ced2ccee2c83414f7c81dfad583400be0e91af.tar.gz ECTester-26ced2ccee2c83414f7c81dfad583400be0e91af.tar.zst ECTester-26ced2ccee2c83414f7c81dfad583400be0e91af.zip | |
Add Botan library implementation of keygen and ECDH.
Diffstat (limited to '')
| -rw-r--r-- | src/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java b/src/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java index 8875948..37c9add 100644 --- a/src/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java +++ b/src/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java @@ -89,9 +89,49 @@ public abstract class NativeKeyAgreementSpi extends KeyAgreementSpi { native byte[] generateSecret(byte[] pubkey, byte[] privkey, ECParameterSpec params); } - public static class Botan extends NativeKeyAgreementSpi { + public abstract static class Botan extends NativeKeyAgreementSpi { + private String type; + public Botan(String type) { + this.type = type; + } @Override native byte[] generateSecret(byte[] pubkey, byte[] privkey, ECParameterSpec params); } + + public static class BotanECDH extends Botan { + public BotanECDH() { + super("ECDH"); + } + } + + public static class BotanECDHwithSHA1KDF extends Botan { + public BotanECDHwithSHA1KDF() { + super("ECDHwithSHA1KDF"); + } + } + + public static class BotanECDHwithSHA224KDF extends Botan { + public BotanECDHwithSHA224KDF() { + super("ECDHwithSHA224KDF"); + } + } + + public static class BotanECDHwithSHA256KDF extends Botan { + public BotanECDHwithSHA256KDF() { + super("ECDHwithSHA256KDF"); + } + } + + public static class BotanECDHwithSHA384KDF extends Botan { + public BotanECDHwithSHA384KDF() { + super("ECDHwithSHA384KDF"); + } + } + + public static class BotanECDHwithSHA512KDF extends Botan { + public BotanECDHwithSHA512KDF() { + super("ECDHwithSHA512KDF"); + } + } } |
