class KeyPair {

  public static KeyPair fromPrivate(final PrivateKey privateKey, final CryptoEngine engine) {
    PublicKey publicKey = engine.createKeyGenerator().derivePublicKey(privateKey);
    return new KeyPair(Optional.of(privateKey), publicKey, engine);
  }

  private  KeyPair(
      final Optional<PrivateKey> privateKey, final PublicKey publicKey, CryptoEngine engine);

}