EdDsaKeyGenerator implements KeyGenerator { @Override public KeyPair generateKeyPair() { PrivateKey privateKey = schemeProvider.generatePrivateKey(); return generateKeyPair(privateKey); } EdDsaKeyGenerator(SchemeProvider schemeProvider); @Override EdKeyAnalyzer getKeyAnalyzer(); @Override KeyPair generateKeyPair(); @Override KeyPair generateKeyPair(PrivateKey privateKey); @Override PublicKey derivePublicKey(PrivateKey privateKey);  }
@Test public void success_GenerateKeyPair_Curve25519() { KeyGenerator generator = new Edwards().getKeyGenerator(); KeyPair keyPair = generator.generateKeyPair(); assertNotNull(keyPair); assertNotNull(keyPair.getPrivateKey()); assertNotNull(keyPair.getPublicKey()); }
@Test public void success_GenerateKeyPair_Curve448() { SchemeProvider schemeProvider = new Ed448SchemeProvider(HashAlgorithm.SHAKE_256); KeyGenerator generator = new Edwards(schemeProvider).getKeyGenerator(); KeyPair keyPair = generator.generateKeyPair(); assertNotNull(keyPair); assertNotNull(keyPair.getPrivateKey()); assertNotNull(keyPair.getPublicKey()); }