What makes an Ethereum keypair valid

cryptographypublic-keysecp256k1

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?

Best Answer

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/

Related Topic