Author

Topic: Is there any recovery tool similar to iancoleman for electrum seed version? (Read 328 times)

hero member
Activity: 1120
Merit: 540
Duelbits - Play for Free | Win for Real
Hmm, but your screenshot shows that the addresses are the same.

Do you mean the WIF private keys are wrong?
It's working in HCP's version of that edited IanColeman BIP39 tool, here: github.com/HardCorePawn/electrumBIP39
Yes, they are correct, because in the images I used an electrum seedphrase without a passphrase.

I used the correct derivation path, the problem I described below:

In the version that I changed, the code also worked as described, see that you used common spaced words as passphrases, I tried the same here and it worked, it generated the same private keys as in the Electrum software, but if you use alphanumeric characters and special characters in BIP39 Passphrase, will never generate the same addresses in electrum software with an extended seedphrase containing special characters.

Seedphrase electrum without passphrase matched:





Seedphrase electrum with passphrase (spaced words) matched:








Seedphrase electrum with passphrase (complex passphrase with special characters) not matched:




legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
But it doesn't work if you have extended the words (added passphrase to a seedphrase created in Electrum), generating totally different keys, has anyone done the test? Does anyone know how to get around this?
Hmm, but your screenshot shows that the addresses are the same.

Do you mean the WIF private keys are wrong?
It's working in HCP's version of that edited IanColeman BIP39 tool, here: github.com/HardCorePawn/electrumBIP39



If there's an issue in your version, just use his code since it does all that was instructed in the linked old topic.

Or do you mean the master public key in Electrum?
If so, it's equivalent to the "BIP32 Extended Public Key" at m/0'
hero member
Activity: 1120
Merit: 540
Duelbits - Play for Free | Win for Real
I changed a few lines of code from the iancoleman BIP39 website following the instructions from @HCP and @o_e_l_e_o (here) and tested an Electrum seedphrase after the modification and it worked, generating the same electrum wallet addresses.

But it doesn't work if you have extended the words (added passphrase to a seedphrase created in Electrum), generating totally different keys, has anyone done the test? Does anyone know how to get around this?

hero member
Activity: 1120
Merit: 540
Duelbits - Play for Free | Win for Real
You can do so (for testing purposes only) by following the same derivation path used in the descriptor and using your master private key as "BIP32 Root Key" in IanColeman's BIP39 Tool.
You can set the derivation path in "BIP32" tab, Custom Derivation path; "m" represents that master private key, the ' signs or "h" (in Core) represent hardened derivation.

The prvikeys are derived same way as other address types, the derivation path may differ depending on the client.
The address generation however is different, here's the spec: https://github.com/bitcoin/bips/blob/master/bip-0350.mediawiki
Following @nc50lc's tip I did the following:

Quote
!!!Attention!!!, for Satoshi's sake, NEVER DO THE PROCEDURES BELOW IF YOU DON'T ABSOLUTELY KNOW WHAT YOU ARE DOING[/b], unless it is strictly necessary or for technical learning purposes.

Never send coins if you created a wallet using the procedures below without knowing what you are doing, no one here will be responsible any losses or any user error made.

The entire wallet generation procedure on the IanColeman page must be done Offline on an airgapped computer.

I created a new test mnemonic:



With the corresponding keys/addresses BIP44, BIP49 and BIP84:







To obtain the P2TR address keys, I just copy the BIP86 derivation path below and paste it into the BIP32 tab under BIP32 Derivation Path:

Quote
m/86'/0'/0'/0/0



Below we'll see the private keys of the taproot addresses, however we'll see them with the legacy addresses.

Explanation: for those who don't know, a compressed private key can generate addresses for different scripts such as P2PKH, P2SH-P2WPKH and P2WPKH), iancoleman does not support P2TR, which is why it's showing addresses for other scripts.



We can do the same process in the BIP141 tab only, again, replacing the Derivation Path to: m/86'/0'/0'/0

Note that the script is different, but the WIF private keys will be the same.



Using another tool, you will see that these BIP86 keys are actually taproot addresses:



If you created your wallet in Core or Electrum, you'll not be able to use this tool, as it only accepts inserting mnemonics, not mater private keys, so only in the iancoleman tool will you be able to obtain your Core private keys (if your wallet is descriptor). For wallets created in Electrum, the derivation path is another, as electrum does not create bip39 wallets).

Attention: as the Core does not create mnemonics, the procedure must be done with xpriv, inserting it in BIP32 RootKey on IanColeman. Other than that, the procedure is the same.

Thank you @pooya87 and  @nc50lc!
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
> I created a wallet on Electrum
> I imported this wallet into the core using "tr(xpriv/0*)#checksum..." descriptors so that the core generated taproot addresses, but using the Electrum masterkey.
> Final question: I can access the private keys of the p2pkh, p2wpkh-p2sh and p2wpkh addresses in iancoleman, but I cannot access the WIF keys of the bech32m taproot addresses. Iancoleman does not have that option.

This question would be easier if I asked: how to get the private keys of the core's taproot addresses?
You can do so (for testing purposes only) by following the same derivation path used in the descriptor and using your master private key as "BIP32 Root Key" in IanColeman's BIP39 Tool.
You can set the derivation path in "BIP32" tab, Custom Derivation path; "m" represents that master private key, the ' signs or "h" (in Core) represent hardened derivation.

The address may be legacy but the WIF private key should match the private keys of your TapRoot addresses at the given derivation path.
You can confirm it by checking the address' public key (without the 02 or 03 prefix) in the address' descriptor in getaddressinfo
command,
while you're at it, confirm if the derivation path is the same as the legacy address' derivation path in BIP39 tool, if didn't matched, the entered path is incorrect.

BTW, is the descriptor actually "tr(xpriv/0*)" and not "tr(xpriv/0/*)" or others?
Check it by entering listdescriptors true command, requires walletpassphrase if the wallet is encrypted.

Quote from: Forsyth Jones
I just want to learn about how taproot addresses are generated and their respective keys.
The prvKeys are derived same way as other address types, the derivation path may differ depending on the client.
The address generation however is different, here's the spec: https://github.com/bitcoin/bips/blob/master/bip-0350.mediawiki
hero member
Activity: 1120
Merit: 540
Duelbits - Play for Free | Win for Real
Electrum does not include Taproot address generation, so I'd recommend you be careful and make a better question, so we can understand what you're trying to accomplish.
> I created a wallet on Electrum
> I imported this wallet into the core using "tr(xpriv/0*)#checksum..." descriptors so that the core generated taproot addresses, but using the Electrum masterkey.
> Final question: I can access the private keys of the p2pkh, p2wpkh-p2sh and p2wpkh addresses in iancoleman, but I cannot access the WIF keys of the bech32m taproot addresses. Iancoleman does not have that option.

This question would be easier if I asked: how to get the private keys of the core's taproot addresses?

I just want to learn about how taproot addresses are generated and their respective keys.

If your tests are from anything after the mnemonic to BIP32 seed conversion (like generating P2TR addresses at a certain derivation path) you can skip that step and still use the same iancoleman tool by simply using the xprv key that Electrum generates from your "test seed".

Try the "getmasterprivate()" command in your Electrum console to get the xprv then enter that in https://iancoleman.io/bip39/ where it says "BIP32 Root Key".
Yes, I already did that, thank you.
legendary
Activity: 3472
Merit: 10611
I'm doing some tests, and to complete my tests, I need a tool similar to iancoleman to generate p2tr addresses.
If your tests are from anything after the mnemonic to BIP32 seed conversion (like generating P2TR addresses at a certain derivation path) you can skip that step and still use the same iancoleman tool by simply using the xprv key that Electrum generates from your "test seed".

Try the "getmasterprivate()" command in your Electrum console to get the xprv then enter that in https://iancoleman.io/bip39/ where it says "BIP32 Root Key".
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
This is most certainly an XY problem. Why would you want any other software than Electrum itself to verify that the private keys from Electrum seed phrases can be properly recovered?

I know that. I'm doing some tests, and to complete my tests, I need a tool similar to iancoleman to generate p2tr addresses.
Electrum does not include Taproot address generation, so I'd recommend you be careful and make a better question, so we can understand what you're trying to accomplish.
legendary
Activity: 3374
Merit: 3095
Playbet.io - Crypto Casino and Sportsbook
I can't find any tools that can extract all private keys from the seed phrase generated from Electrum but if you still want to extract you can try the export button suggested by SamReomo but you can only get 30 private keys if you want to increase this then change the gap limit to the number of keys you want.
You can change the gap limit by using this command below

Code:
wallet.change_gap_limit(300)

300 is the keys generated on Electrum as a sample you can replace it with how many private keys you want to export.
hero member
Activity: 1120
Merit: 540
Duelbits - Play for Free | Win for Real
Why not just use Electrum?

Electrum can generate your master private key, master public key, the child private keys and the child public keys. So why bothering to use another tool?
I know that. I'm doing some tests, and to complete my tests, I need a tool similar to iancoleman to generate p2tr addresses.
legendary
Activity: 1512
Merit: 4795
Leading Crypto Sports Betting & Casino Platform
Electrum uses a different standard than bip39 to generate wallets. I would like to know if there is a tool for recovering the private keys from seeds generated by Electrum similar to what iancoleman does.
Why not just use Electrum?

Electrum can generate your master private key, master public key, the child private keys and the child public keys. So why bothering to use another tool?
hero member
Activity: 784
Merit: 672
Top Crypto Casino
Electrum uses a different standard than bip39 to generate wallets. I would like to know if there is a tool for recovering the private keys from seeds generated by Electrum similar to what iancoleman does.
You can easily save your keys via Electrum without even having to rely on a tool like that. All you need is your seed phrase. Make sure you have your seed phrase try to import your seed phrase after selecting standard wallet.

Once your seed is imported then you should click on wallet, and then scroll down to private keys, and after that click on export. Electrum will take some time and you are ready to export your keys. You can export your keys as .CSV file or .Json file. Once you selected the file type then simply click on export button, instantly your keys will be exported.
sr. member
Activity: 448
Merit: 560
Crypto Casino and Sportsbook
You can get the privatekeys from the seed phrase but you can't get the seed phrase from the privatekeys. If you have the seed phrase you can simply access the wallet with it via electrum and proceed to viewing the private keys of the addresses generated with that seed phrase.

Electrum uses a different standard than bip39 to generate wallets. I would like to know if there is a tool for recovering the private keys from seeds generated by Electrum similar to what iancoleman does.
As for this, make sure if you are generating private keys with it you do it without an internet connection ( offline). Besides it's safer to just generate your private keys as you generate your wallet as it is the normal process.
hero member
Activity: 1120
Merit: 540
Duelbits - Play for Free | Win for Real
Electrum uses a different standard than bip39 to generate wallets. I would like to know if there is a tool for recovering the private keys from seeds generated by Electrum similar to what iancoleman does.

Doing my research, I found a tool that says recover, but when downloading it it says that the seed format is not compatible, it only runs bip39.

Edit: I changed a few lines of code from the iancoleman BIP39 website following the instructions from @HCP and @o_e_l_e_o (here) and tested an Electrum seedphrase after the modification and it worked, generating the same electrum wallet addresses.

But it doesn't work if you have extended the words (added passphrase to a seedphrase created in Electrum), generating totally different keys, has anyone done the test? Does anyone know how to get around this?
Jump to: