Jump to content
kanaas

recovering more accounts with BIP-0039 phrase

Recommended Posts

With a Ledger Nano X I can setup several accounts on XRPL (and other coins)
In case one has for some reason to replace those accounts to other hard or software wallets, one has only one 24Words BIP-0039 phrase for ALL those LedgerWallet accounts. Is it possible to retrieve the secrets from ALL accounts by just one single phrase?

Is it possible to give a brief technical background (for "noobs") how this works ?

 

Share this post


Link to post
Share on other sites

Yes, it's possible. BIP-39/BIP-44 defines the process of deriving multiple keys from the one phrase. So any software compatible with BIP-39/44, and that knows to look for more than one key, will be able to find them. The same keys will always be derived in the same sequence, so the recovering software would need to use logic such as:

Look at key no.1, does it have any transactions associated with it on the public ledger? If so then it's a valid wallet, and look at the next key...

Look at key no.2, does it have any transactions associated with it on the public ledger? If so then it's a valid wallet, and look at the next key...

Look at key no.3, it has no transactions associated with it, it's never been used, stop looking for more keys.

 

This assumes that the Nano uses the keys in numeric order, as per documention here https://ledger.readthedocs.io/en/latest/background/hd_use_cases.html?highlight=bip 44#how-does-my-wallet-know-which-addresses-i-ve-used

Play around with a test phrase here: https://iancoleman.io/bip39/ to get a feel for how it works.

 

edit edit: In reference to @karlos's mention of passphrase, that looks to be part of the BIP-39 standard also, which you can see on the iancoleman link. So any BIP39 recovery tool should still be able to recover all the keys as long as you have both the 24 words and the passphrase.

Edited by at3n

Share this post


Link to post
Share on other sites
20 hours ago, at3n said:

Yes, it's possible. BIP-39/BIP-44 defines the process of deriving multiple keys from the one phrase. So any software compatible with BIP-39/44, and that knows to look for more than one key, will be able to find them. The same keys will always be derived in the same sequence, so the recovering software would need to use logic such as:

Look at key no.1, does it have any transactions associated with it on the public ledger? If so then it's a valid wallet, and look at the next key...

Look at key no.2, does it have any transactions associated with it on the public ledger? If so then it's a valid wallet, and look at the next key...

Look at key no.3, it has no transactions associated with it, it's never been used, stop looking for more keys.

 

This assumes that the Nano uses the keys in numeric order, as per documention here https://ledger.readthedocs.io/en/latest/background/hd_use_cases.html?highlight=bip 44#how-does-my-wallet-know-which-addresses-i-ve-used

Play around with a test phrase here: https://iancoleman.io/bip39/ to get a feel for how it works.

 

edit edit: In reference to @karlos's mention of passphrase, that looks to be part of the BIP-39 standard also, which you can see on the iancoleman link. So any BIP39 recovery tool should still be able to recover all the keys as long as you have both the 24 words and the passphrase.

Thanks @at3n  
Two more Q (just from curiosity):
1) is there a (suppose yes, so what is the) max number of keys a phrase can hold?
2) can a phrase hold a mix of keys from different coins/ledgers?

Share this post


Link to post
Share on other sites
3 hours ago, kanaas said:

Thanks @at3n  
Two more Q (just from curiosity):
1) is there a (suppose yes, so what is the) max number of keys a phrase can hold?
2) can a phrase hold a mix of keys from different coins/ledgers?

1) Couldn't find the answer from a brief search, but using the maximum values that are accepted on the iancoleman page:

2147483647 individual "Accounts", each of which can generate 2 x 4294967295 addresses. I believe that for XRP, you would usually use only the first generated address of each account, whereas for e.g. Bitcoin you use more as Change addresses and receiving addresses. So total number of keys per phrase if you maxed it out: 18,446,744,060,824,649,730‬.

2) Yes, the above number of keys can be generated individually for each coin, and they should all be unique.

https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...