Alice has a secp256k1 key pair that she used some time ago when she communicated with Bob. Bob can no longer user secp256k1 but he only uses ed25519 instead.

Is there a secure algorithm that Bob can use to derive an ed25519 pubkey from original Alice's secp256k1 pub key and also Alice can derive the matching ed25519 private key from her original secp256k1 private key such that they can communicate securely via ed25519 encrypted messages?


  • $\begingroup$ You could derive a new private ed25519 key,from your secp256k1 key, however the corresponding public key will have no obvious relationship to the public key. So the only way would be to sign your new public key with your old one. $\endgroup$ – eckes Apr 16 at 2:09
  • 1
    $\begingroup$ Related (basically the inverse of this question): crypto.stackexchange.com/questions/50249/… $\endgroup$ – rmalayter Apr 16 at 2:27

No. They use different curves.

For each system the public and private keys of the same key pair are not independent. You choose a private key and that determines what your public key will be.

(Good thing it doesn't work in reverse. If you could derive someone's private key from their public key, then we wouldn't have an asymmetric algorithm.)

You can derive a private key from an old public key. (Wrong!) Or a private key from an old private key. But you cannot derive a public key directly from anything other than its corresponding private key.

Alternatively Alice can sign, using her old private key, a messages that informs others of her new public keys. When Bob wants to communicate with her, he can check the authenticity of that message using Alice's old public key. (Assuming the old private key has not been compromised.)

(Note that you should be using separate keys for signing and encrypting.)

As for Alice's private key, I recommend generating new (random) private keys. If her old private key were compromised then it would mean all new deterministically derived private keys would automatically be compromised as well.

  • $\begingroup$ The problem is not the fact the old key was compromised but the fact that they change the platform and cannot communicate using secp256k1 anymore. Thanks for the detailed explanation! $\endgroup$ – vidi Apr 16 at 2:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.