Bitcoin Forum
April 27, 2024, 07:42:47 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: Ian Coleman BIP39 / Derive P2SH addresses from Electrum generated Seed  (Read 741 times)
21sats (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 10


View Profile
June 07, 2020, 12:24:34 PM
Last edit: June 07, 2020, 08:28:32 PM by 21sats
Merited by LoyceV (6), o_e_l_e_o (2), vapourminer (1)
 #1

Hello,

I've been playing around with Ian Colemans BIP39 tool trying to generate the same associated p2sh-segwit (p2wpkh-p2sh) addresses from a 12 word seed phrase with it that Electrum generated from said seed.

My problem is that I just can't get it to work properly, the addresses generated by Ians tool do not match the Electrum derived addresses:
https://i.imgur.com/w68rD3d.png https://i.imgur.com/0Wb7Isr.png

What I've done to get to this point so far...

As Electrum dosen't generate standard seed phrases (12th word isn't a cheksum),
to get addresses generated at all, I needed to edit the source code of Ians tool following the Instructions from here:
https://bitcointalk.org/index.php?topic=2373020.msg24316954#msg24316954

Used the 2017 version of the tool as I don't understand coding at all and the latest release didn't have the same code so I did not know what to replace.
Replaced the code in the jsbip39.js file of the 2017 ( 0.2.8 ) release and the tool let me put in the seed without giving me an error:
https://i.imgur.com/yINtzxz.png

Addresses didn't match the Electrum derived addresses so I tried with the latest version.

Replaced the jsbip39.js file from the latest release with the edited one from 2017 so I was able to generate addresses in the latest version too:
https://i.imgur.com/J5vREGP.png

Addresses do match the ones from the older version but not the ones from Electrum.

If anyone knows what I am doing wrong or is just generally interested to find out how it would work too, I'd appreciate any solutions or ideas regarding the topic Smiley
Thanks for reading

Link to the online tool: https://iancoleman.io/bip39/
Link to the latest source code: https://github.com/iancoleman/bip39/archive/master.zip
Link to the 2017 version: https://github.com/iancoleman/bip39/archive/0.2.8.zip
1714246967
Hero Member
*
Offline Offline

Posts: 1714246967

View Profile Personal Message (Offline)

Ignore
1714246967
Reply with quote  #2

1714246967
Report to moderator
1714246967
Hero Member
*
Offline Offline

Posts: 1714246967

View Profile Personal Message (Offline)

Ignore
1714246967
Reply with quote  #2

1714246967
Report to moderator
1714246967
Hero Member
*
Offline Offline

Posts: 1714246967

View Profile Personal Message (Offline)

Ignore
1714246967
Reply with quote  #2

1714246967
Report to moderator
Even in the event that an attacker gains more than 50% of the network's computational power, only transactions sent by the attacker could be reversed or double-spent. The network would not be destroyed.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714246967
Hero Member
*
Offline Offline

Posts: 1714246967

View Profile Personal Message (Offline)

Ignore
1714246967
Reply with quote  #2

1714246967
Report to moderator
1714246967
Hero Member
*
Offline Offline

Posts: 1714246967

View Profile Personal Message (Offline)

Ignore
1714246967
Reply with quote  #2

1714246967
Report to moderator
Pffrt
Sr. Member
****
Offline Offline

Activity: 1372
Merit: 322


View Profile
June 07, 2020, 01:33:00 PM
Merited by vapourminer (1)
 #2

To generate p2sh-segwit, you can follow the simple trick with Electrum.
1. Install Electrum.
2. Generate Seed.
3. When you verify seed, click on option and mark the box with bip39
4. It will warn you as not valid but will allow you to proceed.
5. Enjoy p2sh-segwit.

Learn more here- https://bitcoinelectrum.com/creating-a-p2sh-segwit-wallet-with-electrum/
21sats (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 10


View Profile
June 07, 2020, 02:09:01 PM
 #3

To generate p2sh-segwit, you can follow the simple trick with Electrum.
1. Install Electrum.
2. Generate Seed.
3. When you verify seed, click on option and mark the box with bip39
4. It will warn you as not valid but will allow you to proceed.
5. Enjoy p2sh-segwit.

Learn more here- https://bitcoinelectrum.com/creating-a-p2sh-segwit-wallet-with-electrum/

I'm aware of the steps to generate p2sh-segwit with Electrum (see second picture).

I'll try to rephrase my question/explain what I am trying:

I've Generated p2sh-segwit wallet with Electrum.
Got a Seed, got addresses.
Now I want Ians tool to show me the same addresses Electrum dervied from that seed.

[Why am I trying to do this? If the tool is able to derive the correct addresses (Like it normaly does with other address types and the correct settings) I am able to automatically bruteforce the 1-2 missing/wrong written words from a slightly incorrect remembered 12 word seed. But to do this I first need to make sure that Ians Tool and Electrum are deriving the same addresses to a correct seed (the one I created with Electrum just for testing purposes) or the brute force won't work. The address derivation from seed works well with other seed / address types, but I haven't figured out the settings/code changes to make it work with p2sh-segwit addresses.]

LoyceMobile
Hero Member
*****
Offline Offline

Activity: 1653
Merit: 686


LoyceV on the road. Or couch.


View Profile WWW
June 07, 2020, 02:22:27 PM
 #4


Quoting for images.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
21sats (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 10


View Profile
June 07, 2020, 02:34:09 PM
 #5

Quote
Quoting for images.
Thanks!  Smiley
hosseinimr93
Legendary
*
Offline Offline

Activity: 2380
Merit: 5214



View Profile
June 07, 2020, 03:06:07 PM
Merited by vapourminer (1)
 #6

You can easily have a seed phrase generating same p2wpkh-p2sh addresses in Electrum and iancoleman without any need to change the source code. (Maybe I am missing something?)
Go to iancoleman. Select BIP49.



Generate a seed. iancoleman will give you some p2wpkh-p2sh addresses.

Then go to Electrum. Create a new wallet. Select "Standard Wallet" and then "I already have a seed". Enter the seed phrase generated by iancoleman. Don't forget to click on  "options" and check "BIP39".
Click on "next" and select "p2wpkh-p2sh" as the "script type". Electrum will give you same addresses.


.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
DireWolfM14
Copper Member
Legendary
*
Offline Offline

Activity: 2170
Merit: 4237


Join the world-leading crypto sportsbook NOW!


View Profile WWW
June 07, 2020, 03:27:36 PM
Last edit: June 07, 2020, 07:55:50 PM by DireWolfM14
 #7

From what I've learned about Electrum, it uses it's own standard to generate seed phrases.  Although it may be based on Bip39, it's not 100% compatible with Bip39.  I'm not the right guy to divulge the technical details, but I believe Electrum includes a checksum that helps the software determine if the seed is for a legacy wallet, or a native segwit wallet.

The only way I know of to generate p2sh addresses using an Electrum-generated seed is to trick the software into believing it's a Bip39 seed.  The more common method for generating p2sh addresses is by using an actual Bip39 seed, like one that was generated by Ian Coleman's tool or a hardware wallet.

  ▄▄███████▄███████▄▄▄
 █████████████
▀▀▀▀▀▀████▄▄
███████████████
       ▀▀███▄
███████████████
          ▀███
 █████████████
             ███
███████████▀▀               ███
███                         ███
███                         ███
 ███                       ███
  ███▄                   ▄███
   ▀███▄▄             ▄▄███▀
     ▀▀████▄▄▄▄▄▄▄▄▄████▀▀
         ▀▀▀███████▀▀▀
░░░████▄▄▄▄
░▄▄░
▄▄███████▄▀█████▄▄
██▄████▌▐█▌█████▄██
████▀▄▄▄▌███░▄▄▄▀████
██████▄▄▄█▄▄▄██████
█░███████░▐█▌░███████░█
▀▀██▀░██░▐█▌░██░▀██▀▀
▄▄▄░█▀░█░██░▐█▌░██░█░▀█░▄▄▄
██▀░░░░▀██░▐█▌░██▀░░░░▀██
▀██
█████▄███▀▀██▀▀███▄███████▀
▀███████████████████████▀
▀▀▀▀███████████▀▀▀▀
▄▄██████▄▄
▀█▀
█  █▀█▀
  ▄█  ██  █▄  ▄
█ ▄█ █▀█▄▄█▀█ █▄ █
▀▄█ █ ███▄▄▄▄███ █ █▄▀
▀▀ █    ▄▄▄▄    █ ▀▀
   ██████   █
█     ▀▀     █
▀▄▀▄▀▄▀▄▀▄▀▄
▄ ██████▀▀██████ ▄
▄████████ ██ ████████▄
▀▀███████▄▄███████▀▀
▀▀▀████████▀▀▀
█████████████LEADING CRYPTO SPORTSBOOK & CASINO█████████████
MULTI
CURRENCY
1500+
CASINO GAMES
CRYPTO EXCLUSIVE
CLUBHOUSE
FAST & SECURE
PAYMENTS
.
..PLAY NOW!..
21sats (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 10


View Profile
June 07, 2020, 03:41:11 PM
 #8

You can easily have a seed phrase generating same p2wpkh-p2sh addresses in Electrum and iancoleman without any need to change the source code. (Maybe I am missing something?)
Go to iancoleman. Select BIP49.

https://i.imgur.com/q09RZiG.jpg

Generate a seed. iancoleman will give you some p2wpkh-p2sh addresses.

Then go to Electrum. Create a new wallet. Select "Standard Wallet" and then "I already have a seed". Enter the seed phrase generated by iancoleman. Don't forget to click on  "options" and check "BIP39".
Click on "next" and select "p2wpkh-p2sh" as the "script type". Electrum will give you same addresses.


Yep in this direction it's working properly for me too, Seed generated by Iancoleman shows same addresses when entered in Electrum.
But a seed generated by Electrum (non standard mnemonic) entered in iancoleman dosen't show the same addresses.

The source code edit is needed because the tool will give "Invalid mnemonic" error if we try to put in the Electrum generated seed.
21sats (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 10


View Profile
June 07, 2020, 03:58:45 PM
 #9

From what I've learned about Electrum, it uses it's own standard to generate seed phrases.  Although it may be based on Bip39, it's not 100% compatible with Bip39.  I'm not the right guy to divulge the technical details, but I believe Electrum includes a checksum that helps the software determine if the seed is for a legacy wallet, or a native segwit wallet.

The only way I know of to generated p2sh addresses using an Electrum generated seed is to trick the software into believing it's a Bip39 seed.  The more common method for generating p2sh addresses is by using an actual Bip39 seed, like one that was generated by Ian Coleman's tool or a hardware wallet.

Meaning as the IanColeman tool views every seed put into it as a 100% standard BIP39 seed there is no way it will derive the correct addresses from the Electrum seed as it gives wrong information due to its different structure?

Edit: Is there a way to show the exact derivation path to a specific address in the Electrum wallet? I know I chose m/49'/0'/0' when generating but im curious if it really ended up beeing this path. Tried wallet.keystore.derivation in the Electrum console but this didn't work.
DireWolfM14
Copper Member
Legendary
*
Offline Offline

Activity: 2170
Merit: 4237


Join the world-leading crypto sportsbook NOW!


View Profile WWW
June 07, 2020, 05:53:49 PM
Merited by 21sats (2)
 #10

Meaning as the IanColeman tool views every seed put into it as a 100% standard BIP39 seed there is no way it will derive the correct addresses from the Electrum seed as it gives wrong information due to its different structure?

Correct.  Again, I'm not a good technical resource, but as I understand it when Electrum creates a seed the order or selection of specific words creates a checksum for Electrum to use as an additional piece of information for address determination.

Other wallets don't include that piece of code, it's specific to Electrum.


Edit: Is there a way to show the exact derivation path to a specific address in the Electrum wallet? I know I chose m/49'/0'/0' when generating but im curious if it really ended up beeing this path. Tried wallet.keystore.derivation in the Electrum console but this didn't work.

Not that I know of.  The information may exist in the wallet file but I don't know of any way to find that information through the GUI frontend.  I'm not aware of any console command that will provide the information either.  Another thing to keep in mind, I don't believe Electrum's seed generator will create a seed specific to Bip49 standard, only Bip44 (legacy) and Bip84 (native segwit.)

  ▄▄███████▄███████▄▄▄
 █████████████
▀▀▀▀▀▀████▄▄
███████████████
       ▀▀███▄
███████████████
          ▀███
 █████████████
             ███
███████████▀▀               ███
███                         ███
███                         ███
 ███                       ███
  ███▄                   ▄███
   ▀███▄▄             ▄▄███▀
     ▀▀████▄▄▄▄▄▄▄▄▄████▀▀
         ▀▀▀███████▀▀▀
░░░████▄▄▄▄
░▄▄░
▄▄███████▄▀█████▄▄
██▄████▌▐█▌█████▄██
████▀▄▄▄▌███░▄▄▄▀████
██████▄▄▄█▄▄▄██████
█░███████░▐█▌░███████░█
▀▀██▀░██░▐█▌░██░▀██▀▀
▄▄▄░█▀░█░██░▐█▌░██░█░▀█░▄▄▄
██▀░░░░▀██░▐█▌░██▀░░░░▀██
▀██
█████▄███▀▀██▀▀███▄███████▀
▀███████████████████████▀
▀▀▀▀███████████▀▀▀▀
▄▄██████▄▄
▀█▀
█  █▀█▀
  ▄█  ██  █▄  ▄
█ ▄█ █▀█▄▄█▀█ █▄ █
▀▄█ █ ███▄▄▄▄███ █ █▄▀
▀▀ █    ▄▄▄▄    █ ▀▀
   ██████   █
█     ▀▀     █
▀▄▀▄▀▄▀▄▀▄▀▄
▄ ██████▀▀██████ ▄
▄████████ ██ ████████▄
▀▀███████▄▄███████▀▀
▀▀▀████████▀▀▀
█████████████LEADING CRYPTO SPORTSBOOK & CASINO█████████████
MULTI
CURRENCY
1500+
CASINO GAMES
CRYPTO EXCLUSIVE
CLUBHOUSE
FAST & SECURE
PAYMENTS
.
..PLAY NOW!..
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18507


View Profile
June 07, 2020, 06:33:10 PM
 #11

Can you clarify first of all how you created the Electrum wallet? Electrum will not allow you to generate a P2WPKH-P2SH wallet - you can only restore such a wallet. Further, you can not restore such a wallet from an Electrum generated seed phrase unless you force the seed through as an invalid BIP39 seed phrase. Are these the steps you took? Was the initial Electrum wallet you create legacy or segwit?
21sats (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 10


View Profile
June 07, 2020, 07:43:01 PM
Merited by DireWolfM14 (1)
 #12

Quote
Not that I know of.  The information may exist in the wallet file but I don't know of any way to find that information through the GUI frontend.  I'm not aware of any console command that will provide the information either.  Another thing to keep in mind, I don't believe Electrum's seed generator will create a seed specific to Bip49 standard, only Bip44 (legacy) and Bip84 (native segwit.)

Can you clarify first of all how you created the Electrum wallet? Electrum will not allow you to generate a P2WPKH-P2SH wallet - you can only restore such a wallet. Further, you can not restore such a wallet from an Electrum generated seed phrase unless you force the seed through as an invalid BIP39 seed phrase. Are these the steps you took? Was the initial Electrum wallet you create legacy or segwit?

Initial Electrum wallet is segwit. I think I forced it through as an invalid BIP39 seed phrase cause the checksum=failed but I was still able to proceed.

Those are the exact steps I took in Electrum:

Chose a new wallet name, next.
Standard wallet, next.
Create a new seed, next.
Segwit, next.
Copied the generated seed.
Aborted the process, restarted electrum.

Chose a new wallet name, next.
Standard wallet, next.
I already have a seed, next.
Pasted the seed, clicked options.
Check marked BIP39 seed, ok, next.
Chose p2sh-segwit(p2wpkh-p2sh), next.
Chose Password, done.


o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18507


View Profile
June 07, 2020, 08:17:07 PM
Merited by 21sats (2)
 #13

Right. In that case, in the instructions that HCP laid out in the post you linked to (https://bitcointalk.org/index.php?topic=2373020.msg24316954#msg24316954), you should ignore the second step of changing the word "mnemonic" to "electrum". Since you've done that already, change it back and reload your copy of iancoleman.

Enter your Electrum seed, and then select "BIP49" under Derivation Path. The addresses should now match those that show up in your Electrum wallet.
DireWolfM14
Copper Member
Legendary
*
Offline Offline

Activity: 2170
Merit: 4237


Join the world-leading crypto sportsbook NOW!


View Profile WWW
June 07, 2020, 08:42:12 PM
Merited by o_e_l_e_o (2), vapourminer (1)
 #14

The method you used obviously works, but it's generally not recommended.

If you're going to use this method to store your funds there are some factors of which you should make note.  Since you're relying on a specific piece of software to decipher the correct derivation path, it's a good idea to make sure you always have a verified version stored locally.  You should also make backups of your wallet files and store them on another device.  Another pitfall is if you do lose all your backups and have to restore the wallet from the seed phrase several years from now, are you going to remember the steps you took?  You may want to include instructions for yourself and store them with the seed phrase, in case you forget.

If your goal is to have multiple desktop wallets, of different address types, that are all backed-up by one seed, you are probably better off starting with a Bip39 phrase.  The advantage is you can always restore it with many desktop clients or hardware wallets, and they'll be able to determine the correct derivation path without all fuss.  And of course, that includes Electrum.

  ▄▄███████▄███████▄▄▄
 █████████████
▀▀▀▀▀▀████▄▄
███████████████
       ▀▀███▄
███████████████
          ▀███
 █████████████
             ███
███████████▀▀               ███
███                         ███
███                         ███
 ███                       ███
  ███▄                   ▄███
   ▀███▄▄             ▄▄███▀
     ▀▀████▄▄▄▄▄▄▄▄▄████▀▀
         ▀▀▀███████▀▀▀
░░░████▄▄▄▄
░▄▄░
▄▄███████▄▀█████▄▄
██▄████▌▐█▌█████▄██
████▀▄▄▄▌███░▄▄▄▀████
██████▄▄▄█▄▄▄██████
█░███████░▐█▌░███████░█
▀▀██▀░██░▐█▌░██░▀██▀▀
▄▄▄░█▀░█░██░▐█▌░██░█░▀█░▄▄▄
██▀░░░░▀██░▐█▌░██▀░░░░▀██
▀██
█████▄███▀▀██▀▀███▄███████▀
▀███████████████████████▀
▀▀▀▀███████████▀▀▀▀
▄▄██████▄▄
▀█▀
█  █▀█▀
  ▄█  ██  █▄  ▄
█ ▄█ █▀█▄▄█▀█ █▄ █
▀▄█ █ ███▄▄▄▄███ █ █▄▀
▀▀ █    ▄▄▄▄    █ ▀▀
   ██████   █
█     ▀▀     █
▀▄▀▄▀▄▀▄▀▄▀▄
▄ ██████▀▀██████ ▄
▄████████ ██ ████████▄
▀▀███████▄▄███████▀▀
▀▀▀████████▀▀▀
█████████████LEADING CRYPTO SPORTSBOOK & CASINO█████████████
MULTI
CURRENCY
1500+
CASINO GAMES
CRYPTO EXCLUSIVE
CLUBHOUSE
FAST & SECURE
PAYMENTS
.
..PLAY NOW!..
21sats (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 10


View Profile
June 07, 2020, 08:50:18 PM
 #15

Right. In that case, in the instructions that HCP laid out in the post you linked to (https://bitcointalk.org/index.php?topic=2373020.msg24316954#msg24316954), you should ignore the second step of changing the word "mnemonic" to "electrum". Since you've done that already, change it back and reload your copy of iancoleman.

Enter your Electrum seed, and then select "BIP49" under Derivation Path. The addresses should now match those that show up in your Electrum wallet.

Wow, worked like a charm! Thanks for the help. High possibility that I won't get the explanation but why did I have to ignore the second step?
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18507


View Profile
June 07, 2020, 09:32:54 PM
Merited by Coding Enthusiast (3), malevolent (2), vapourminer (1)
 #16

Short answer: Electrum seed phrases and BIP39 seed phrases differ in the way they handle passphrases. Since you are entering the seed phrase as a BIP39 phrase, you use the BIP39 method, which uses the word "mnemonic" rather than the word "electrum".

Longer answer: When your seed phrase is used to generate your private keys, the first step is to pass it through a key stretching function called PBKDF2. The PBKDF2 function used has two input parameters. The first input parameter is your seed phrase. The second input parameter for BIP39 seeds is the word "mnemonic" concatenated with your passphrase. You can see this in lines 810 and 811 of the Electrum code here: https://github.com/spesmilo/electrum/blob/9d0bb295e6f55a2bff9f5b6770fa744c16af6e8a/electrum/keystore.py#L810.

Conversely, when using Electrum seeds, instead of using the word "mnemonic", it instead uses the word "electrum" concatenated with your passphrase. See line 164 here: https://github.com/spesmilo/electrum/blob/a0b096dcb2292c2826f7beae173c529d335142f0/electrum/mnemonic.py#L164.

Even although your seed was generated by Electrum, since we are using it as an (invalid) BIP39 seed we need to follow the BIP39 method. This will hold true even if you don't use a passphrase, as the word "mnemonic" will still be used as an input for PBKDF2, just without any additional characters attached.



I would echo DireWolfM14's warning above, though. This is a very non standard way to generate a wallet, and you could run in to serious problems down the line trying to recover it. If you want a P2WPKH-P2SH wallet in Electrum, then the best method is to generate a BIP39 phrase elsewhere and import it.
bartekjagoda
Jr. Member
*
Offline Offline

Activity: 87
Merit: 5


View Profile
June 08, 2020, 10:15:42 AM
 #17

Short answer: Electrum seed phrases and BIP39 seed phrases differ in the way they handle passphrases. Since you are entering the seed phrase as a BIP39 phrase, you use the BIP39 method, which uses the word "mnemonic" rather than the word "electrum".

Longer answer: When your seed phrase is used to generate your private keys, the first step is to pass it through a key stretching function called PBKDF2. The PBKDF2 function used has two input parameters. The first input parameter is your seed phrase. The second input parameter for BIP39 seeds is the word "mnemonic" concatenated with your passphrase. You can see this in lines 810 and 811 of the Electrum code here: https://github.com/spesmilo/electrum/blob/9d0bb295e6f55a2bff9f5b6770fa744c16af6e8a/electrum/keystore.py#L810.

Conversely, when using Electrum seeds, instead of using the word "mnemonic", it instead uses the word "electrum" concatenated with your passphrase. See line 164 here: https://github.com/spesmilo/electrum/blob/a0b096dcb2292c2826f7beae173c529d335142f0/electrum/mnemonic.py#L164.


Is this also used together with trezor/ledger passphrases or any other known wallets?

 Ich liebe Bitcoin
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18507


View Profile
June 08, 2020, 10:56:55 AM
 #18

Is this also used together with trezor/ledger passphrases or any other known wallets?
Trezor and Ledger seed phrases and any optional passphrases follow the standard BIP39 protocol, i.e. using the word "mnemonic". This is also true of pretty much every other hierarchical deterministic wallet which exists these days. Electrum is pretty much the only one which has its own method for generating seed phrases.

If you want to read more in depth as to how seed phrases are combined with passphrases to generate your wallet, have a read of this: https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch05.asciidoc#from-mnemonic-to-seed
nc50lc
Legendary
*
Offline Offline

Activity: 2394
Merit: 5539


Self-proclaimed Genius


View Profile
June 08, 2020, 11:05:28 AM
 #19

Initial Electrum wallet is segwit. I think I forced it through as an invalid BIP39 seed phrase cause the checksum=failed but I was still able to proceed.

Those are the exact steps I took in Electrum:
-snip-
Quote from: 21sats
Addresses didn't match the Electrum derived addresses so I tried with the latest version.
Actually, you can use iancoleman without changing the source code.
All you need to do is to get your wallet's master private key and click the right options.

Follow these steps:
  • 1. (skip if you have the wallet) Restore your Electrum wallet using the seed and the same steps you've mentioned.
  • 2. Open console tab (View->Show Console) and type getmasterprivate().
  • 3. Copy the master private key (yprv) and paste to iancoleman's "BIP32 Root Key".
  • 4. Select BIP141 tab and select "P2WPKH nested in P2SH" in the 'Script Semantics' drop-down menu.
  • 5. Check the addresses, it should be the same as Electrum's.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Chikito
Legendary
*
Offline Offline

Activity: 2366
Merit: 2054



View Profile WWW
June 08, 2020, 11:42:48 AM
 #20

Follow these steps:
  • 1. (skip if you have the wallet) Restore your Electrum wallet using the seed and the same steps you've mentioned.
  • 2. Open console tab (View->Show Console) and type getmasterprivate().
  • 3. Copy the master private key (yprv) and paste to iancoleman's "BIP32 Root Key".
  • 4. Select BIP141 tab and select "P2WPKH nested in P2SH" in the 'Script Semantics' drop-down menu.
  • 5. Check the addresses, it should be the same as Electrum's.
If @21sats used only step 1, he already has native segwit right?, step 4 must be select P2WPKH not P2WPKH nested in P2SH

another way if @21sats select legacy in begining, must be select BIP 32 to same with electrum legacy address

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Pages: [1] 2 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!