Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: jiamijiang on October 06, 2021, 12:39:14 PM



Title: How does Ed25519 fit in with BIP32/44 HD wallet paths?
Post by: jiamijiang on October 06, 2021, 12:39:14 PM
From my understanding, BIP39/32/44 all use the secp256k1 elliptic curve standard from Bitcoin. But I noticed that cryptos such as Polkadot and Cardano have their own registered coin type path for BIP44, but those two cryptos use Ed25519 as their public key elliptic curve standard, so how is this possible?

Isn't those BIP39 mnemonic words all stemming from 256 bits originally? And Ed25519 uses a different private key size than 256 bits?

I am actually unfamiliar with how Ed25519 works exactly so much appreciated if someone can explain it in a high level overview, and then explain how it's compatible with BIP32/44/39. Thank you.


Title: Re: How does Ed25519 fit in with BIP32/44 HD wallet paths?
Post by: NotATether on October 06, 2021, 02:44:14 PM
Isn't those BIP39 mnemonic words all stemming from 256 bits originally? And Ed25519 uses a different private key size than 256 bits?

I'm not sure where you got this from but Ed25519 private keys are actually 256 bits long (https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/) so they should work just fine with entropy-encoding standards such as BIP39 as long as the crypto's use appropriate seed phrase lengths.


Title: Re: How does Ed25519 fit in with BIP32/44 HD wallet paths?
Post by: pooya87 on October 07, 2021, 03:44:20 AM
Ed25519 curves have key pairs that are 32 bytes long that is why they can be used in BIP32 key derivation function. I guess the only problem that one might face while using a different elliptic curve with bitcoin libraries is that if that library was buggy and weren't rejecting invalid keys. This is not an issue for bitcoin curve (secp256k1) because the number of invalid keys (bigger then N) is relatively small but for Ed25519 that has 255 bit (not 256) keys this can happen a lot more (N = 2255−19)


Title: Re: How does Ed25519 fit in with BIP32/44 HD wallet paths?
Post by: jiamijiang on October 07, 2021, 04:35:31 AM
thank u