typed-io / rust-ed25519-bip32

ed25519 with bip32
Apache License 2.0
19 stars 5 forks source link

Document how to reproduce what a hardware wallet would do #2

Open Demi-Marie opened 4 years ago

Demi-Marie commented 4 years ago

Given a BIP39 mnemonic/seed, how do I derive the same keys that a Ledger (or other hardware wallet) would?

vincenthz commented 4 years ago

(oops, wrong commit message)

I am not sure how Ledger create a master key in the first place, I have vague recollection of something similar to bip39 (pbkdf2 / seed encoding). Otherwise once you have recovered the same master root key, then the V2 derivation (absolutely don't use V1) should be identical to what ledger use for ed25519 derivation. This is probably something that need to be found in the ledger SDK/documentation, I'm happy to include some pointer/example here if you manage to get some.