As I understand Ethereum (and Bitcoin) use the ECDSA algorithm which relies on the secp256k1 curve. The secp256k1 curve is what generates the public keys given a private key.

However, recently, I encountered a library implementing bip32, but instead of using secp256k1, it uses ed25519 (another curve I believe) to generate the public keys. Upon first glance, these public keys look the same as any generated by secp256k1. They can both be serialized to 32 byte values.

However, I'm worried this will have unintended consequences. It doesn't seem right that using a different curve to generate one of the most fundamental properties in Ethereum will yield the same results. But as the keys look the same, how can clients tell the difference anyways? Is there any danger in this?

1 Answer 1


It won't work.

Nodes expect a specific signature format to validate your transaction, if you give them a format they are not expecting their transaction will fail.

Eth inherited a lot of stuff from BTC, including it's signing algorithm secp256k1, Edwards would be marginally faster, but it's just not the one we use.

Geth (Eth's most popular node) implements compatibility for other signing algorithms but afaik that's for future protection, right now you can only use secp256k1.

Here is a cool article talking about how lucky choosing that algorithm was: http://bitcoinmagazine.com/7781/satoshis-genius-unexpected-ways-in-which-bitcoin-dodged-some-cryptographic-bullet/

  • 1
    I see. So the resulting signatures on transactions will be different. Do you know how the format may be different, and what clients are looking for? And will an ETH address be generated upon use of this curve? Or will it register as invalid somehow?
    – vw1262
    Commented Mar 23, 2022 at 15:03
  • Yes, the transactions signature will be different. You'll have to look into the algorithms themselves, secp256k1 and secp256r1 are both really similar but if you sign using one of them, you won't be able to validate with the other. It will generate an address which may look correct but if you try to send a tx with it as the sender/signer it will fail. Commented Mar 23, 2022 at 15:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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