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/NativeKeyPairGeneratorSpi.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 'src/cz/crcs/ectester/standalone/libs/jni/NativeKeyPairGeneratorSpi.java')
| -rw-r--r-- | src/cz/crcs/ectester/standalone/libs/jni/NativeKeyPairGeneratorSpi.java | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/NativeKeyPairGeneratorSpi.java b/src/cz/crcs/ectester/standalone/libs/jni/NativeKeyPairGeneratorSpi.java index 5b8a54b..9461251 100644 --- a/src/cz/crcs/ectester/standalone/libs/jni/NativeKeyPairGeneratorSpi.java +++ b/src/cz/crcs/ectester/standalone/libs/jni/NativeKeyPairGeneratorSpi.java @@ -72,9 +72,11 @@ public abstract class NativeKeyPairGeneratorSpi extends KeyPairGeneratorSpi { native KeyPair generate(AlgorithmParameterSpec params, SecureRandom random); } - public static class Botan extends NativeKeyPairGeneratorSpi { + public static abstract class Botan extends NativeKeyPairGeneratorSpi { + private String type; - public Botan() { + public Botan(String type) { + this.type = type; initialize(256, new SecureRandom()); } @@ -90,4 +92,32 @@ public abstract class NativeKeyPairGeneratorSpi extends KeyPairGeneratorSpi { @Override native KeyPair generate(AlgorithmParameterSpec params, SecureRandom random); } + + public static class BotanECDH extends Botan { + + public BotanECDH() { + super("ECDH"); + } + } + + public static class BotanECDSA extends Botan { + + public BotanECDSA() { + super("ECDSA"); + } + } + + public static class BotanECKCDSA extends Botan { + + public BotanECKCDSA() { + super("ECKCDSA"); + } + } + + public static class BotanECGDSA extends Botan { + + public BotanECGDSA() { + super("ECGDSA"); + } + } } |
