Bitcoin Forum
December 13, 2024, 10:21:27 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Electrum and Ian Coleman's BiP39  (Read 402 times)
Sidney986 (OP)
Member
**
Offline Offline

Activity: 81
Merit: 31


View Profile
June 24, 2020, 08:57:32 AM
Merited by Halab (2), OmegaStarScream (1), mocacinno (1), hugeblack (1), o_e_l_e_o (1)
 #1

Not able to get my Electrum addresses replicated in Ian Coleman's BiP39.  Any ideas?

I have setting as follows,

BIP39 Mnemonic                                Electrum 12 seed words entered
BIP39 Passphrase (optional)                Electrum extended seed words entered
Derivation Path                                   set to BIP141
BIP32 Derivation Path                         set to m/0'/0
Script Semantics                                 set to P2WPKH

 Huh
NeuroticFish
Legendary
*
Offline Offline

Activity: 3878
Merit: 6623


Looking for campaign manager? Contact icopress!


View Profile
June 24, 2020, 09:01:33 AM
Merited by hugeblack (2), OmegaStarScream (1)
 #2

It was discussed here too in the past multiple times. Electrum's seed system also uses a version number. https://electrum.readthedocs.io/en/latest/seedphrase.html
This means that Electrum's seed only works in Electrum.
If you want to make a seed that works anywhere (and also in Electrum!, just you'll have to perform one extra step at importing), then use Ian Coleman's.

Edit: topics on similar subject:
https://bitcointalk.org/index.php?topic=5111828
https://bitcointalk.org/index.php?topic=5203955 (yes, I had the same surprise in the past)
https://bitcointalk.org/index.php?topic=5253904

███████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████

███████████████████████
.
BC.GAME
▄▄▀▀▀▀▀▀▀▄▄
▄▀▀░▄██▀░▀██▄░▀▀▄
▄▀░▐▀▄░▀░░▀░░▀░▄▀▌░▀▄
▄▀▄█▐░▀▄▀▀▀▀▀▄▀░▌█▄▀▄
▄▀░▀░░█░▄███████▄░█░░▀░▀▄
█░█░▀░█████████████░▀░█░█
█░██░▀█▀▀█▄▄█▀▀█▀░██░█
█░█▀██░█▀▀██▀▀█░██▀█░█
▀▄▀██░░░▀▀▄▌▐▄▀▀░░░██▀▄▀
▀▄▀██░░▄░▀▄█▄▀░▄░░██▀▄▀
▀▄░▀█░▄▄▄░▀░▄▄▄░█▀░▄▀
▀▄▄▀▀███▄███▀▀▄▄▀
██████▄▄▄▄▄▄▄██████
.
..CASINO....SPORTS....RACING..


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
nc50lc
Legendary
*
Offline Offline

Activity: 2632
Merit: 6512


Self-proclaimed Genius


View Profile
June 24, 2020, 09:43:59 AM
 #3

Any particular reason why you'd want to restore your addresses despite having Electrum?
That's for members to be able to answer straight to the point.

BTW, you can follow this post from the third link above: /index.php?topic=5253904 Post#19
But that requires you to restore the wallet to Electrum if you didn't have a backup of the master private key.

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
hosseinimr93
Legendary
*
Offline Offline

Activity: 2618
Merit: 5741



View Profile
June 24, 2020, 10:22:53 AM
 #4

If you want to have a seed phrase generating same addresses in Electrum and iancoleman, instead of generating the seed phrase using Electrum, you can generate the seed phrase in iancoleman and import it into Electrum. You only need to check "BIP39" when importing the seed phrase generated by iancoleman in Electrum.
The seed generated by Electrum doesn't work in iancoleman. But Electrum can generate same addresses as iancoleman.

▄▄███████▄▄
▄██████████████▄
▄██████████████████▄
▄████▀▀▀▀███▀▀▀▀█████▄
▄█████████████▄█▀████▄
███████████▄███████████
██████████▄█▀███████████
██████████▀████████████
▀█████▄█▀█████████████▀
▀████▄▄▄▄███▄▄▄▄████▀
▀██████████████████▀
▀███████████████▀
▀▀███████▀▀
.
 MΞTAWIN  THE FIRST WEB3 CASINO   
.
.. PLAY NOW ..
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2504



View Profile WWW
June 24, 2020, 04:40:29 PM
 #5

Electrum does not use BIP 39.
It has its own mnemonic code derivation. Once the root key (BIP 38) is obtained, the derivation of the keys is the same. But the step from the mnemonic to the root key is different.

You won't be able to recreate your private keys from an electrum mnemonic using a BIP 39 software.

igor72
Legendary
*
Offline Offline

Activity: 2044
Merit: 2100


Crypto Swap Exchange


View Profile
June 25, 2020, 10:00:12 AM
 #6

https://bitcointalk.org/index.php?topic=4595261.msg41815678#msg41815678

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18771


View Profile
June 25, 2020, 01:12:00 PM
 #7

The iancoleman code has been updated since those changes were suggested by HCP, so although those are still the changes you need to make, you will no longer find that code at the same places.

Download the repository from here: https://github.com/iancoleman/bip39
Navigate to the folder BIP39/src/js
Open the file jsbip39.js
The string return h == nh; is at line 116, and the string passphrase = "mnemonic" + passphrase; is at line 144.

The other instructions OP has given are correct. Make these code changes and repeat those steps, and you will be able to replicate your Electrum addresses.
igor72
Legendary
*
Offline Offline

Activity: 2044
Merit: 2100


Crypto Swap Exchange


View Profile
June 25, 2020, 03:54:09 PM
Merited by o_e_l_e_o (1)
 #8

The iancoleman code has been updated since those changes were suggested by HCP, so although those are still the changes you need to make, you will no longer find that code at the same places.
Right, I didn't think it was so important to specify the exact line. In the current version of the file, you have to change the lines 35217 and 35245.

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
igor72
Legendary
*
Offline Offline

Activity: 2044
Merit: 2100


Crypto Swap Exchange


View Profile
June 27, 2020, 11:13:39 AM
Merited by Captain-Cryptory (1)
 #9

Line 35217 is "return h == nh;" while 35245 is "passphrase = "mnemonic" + passphrase;" If I make the proposed changes,  the resulting file would be suitable solely  for Electrum or it can be used to generate data relevant to traditional BIP 39 scheme?
For Electrum only.

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Pages: [1]
  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!