I used the wallet.change_gap_limit command in the electrum console in order to generate some 20.000 public keys. Would I be able to recover all of these using my seed after completely removing electrum from my system, reinstalling it and running the change_gap_limit command again?



As a plan B if that fails, you should be able to use piped bitcoin explorer bx commands offline. This is because Electrum v2.0 and above uses the same BIP 32 Hierarchical Deterministic (HD) technology that bx supports.

However, the Electrum HD paths are different from the BIP 44 convention. See It appears Electrum uses: m/0/0 for wallet addresses and m/1/0 for change addresses. Additionally, the English Electrum Seed Word List is quite different from the newer English BIP 39 Seed Word List, and I don't believe Electrum uses a PBKDF2 stretching function that is not invertible. See stretch->passlib.pbkdf2 for high level details for what bx mnemonic-to-seed is doing. Unlike BIP 39, an Electrum private key should be invertible to a group of Electrum seed words.

For the synthesis of BIP 44 paths for Bitcoin m/44'/0'/0'/0/0 private key and M/44'/0'/0'/0/0 public address using bx, see Example 7. See BIP 44 path-levels. The change level is set to 0 for external addresses that you share with others to receive funds. The change level is set to 1 for a wallet's internal return addresses.

If the information above is too pedantic, read Chapter 5 of the Mastering Bitcoin Book. Albeit, details about Electrum are scarce.

  • Thank you so much for your input and the valuable information you've shared with me. – cpe871 Jul 28 '18 at 5:17

Yes. This is the way HD wallets work - the "deterministic" part means that you will get the same exact keys when you run it again. For verification purposes, you can try it yourself and see before you deposit any money.

  • @cpe871 Note however that electrum doesn't handle such large wallets very well. You may want to create multiple wallets if you want a lot of addresses. File > new/restore, enter a unique filename and proceed with on-screen instructions to create a new wallet. file > open will let you switch between them. – Abdussamad Jul 27 '18 at 18:10
  • Thank you so much for your input and the valuable information you've shared with me. Do you think someone who played around with the source code would be able to generate large datasets of public keys that are identical and circumvent electron's inability to handle such massive sets? I would like to generate at least one million public keys for one address. Do you know of any other services capable of this? – cpe871 Jul 28 '18 at 5:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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