Bitcoin Forum
April 30, 2024, 11:42:36 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Derivation Path on electrum  (Read 133 times)
canudinho (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 8


View Profile
November 03, 2023, 06:42:44 PM
 #1

Being brief:

-> Let's say that I've generated my normal account electrum wallet without paying attention on the derivation path (i dunno). If i do lost the access to this wallet, and I put the seeds on other machine to recover my wallet and the funds are 0, this might be because I haven't inserted the derivation path... so I should put m/0'/n' on it (considering it is a standard wallet) and then my problem is solved? If not, what should I do? What are the concerns about it?

Thank you Srs, best regards
1714477356
Hero Member
*
Offline Offline

Posts: 1714477356

View Profile Personal Message (Offline)

Ignore
1714477356
Reply with quote  #2

1714477356
Report to moderator
1714477356
Hero Member
*
Offline Offline

Posts: 1714477356

View Profile Personal Message (Offline)

Ignore
1714477356
Reply with quote  #2

1714477356
Report to moderator
1714477356
Hero Member
*
Offline Offline

Posts: 1714477356

View Profile Personal Message (Offline)

Ignore
1714477356
Reply with quote  #2

1714477356
Report to moderator
Whoever mines the block which ends up containing your transaction will get its fee.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
Zaguru12
Hero Member
*****
Offline Offline

Activity: 672
Merit: 866



View Profile
November 03, 2023, 06:51:16 PM
 #2

Let’s leave the derivation path out first, when you create a wallet with electrum, you can’t restore that seed phrase gotten from it on another wallet, because electrum seed phrase isn’t generated by BIP 39 although it follows similar procedure like the other wallets. Although you can generate the master private key from the seed phrase gotten from electrum.

To check for which derivation path you use you can use the https://iancoleman.io/bip39/ you can use the BIP that corresponds to the address type you have and then when you see address that holds the bitcoin you have then the derivation path on it is the one used to generate it.

Use this tool on offline device when importing your seed phrase

.BEST..CHANGE.███████████████
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
███████████████
..BUY/ SELL CRYPTO..
BitMaxz
Legendary
*
Offline Offline

Activity: 3234
Merit: 2955


Block halving is coming.


View Profile WWW
November 03, 2023, 07:02:08 PM
 #3

That's not the default derivation path if you are using legacy wallet the default derivation path is m/44'/0'/0' for segwit wallet is m/84'/0'/0' and honestly you don't need to change anything on the derivation path.

If you know what type of your wallet is just choose any of these 3 legacy, p2sh segwit and native segwith or you can just " Detect existing accounts" and let the Electrum find the used derivation path for you.

█▀▀▀











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











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

Activity: 1484
Merit: 1358



View Profile
November 03, 2023, 07:46:51 PM
 #4

Restoring your Electrum wallet on a different machine is easy. Just go with the "I already have a seed" option. In the next step, you will be able to choose the seed type: Electrum, BIP39, or SLIP39. If you stick with the default, Electrum will assume you are importing an Electrum seed.  You do not need to choose the derivation path.

█████████████████████████
██
█████▀▀███████▀▀███████
█████▀░░▄███████▄░░▀█████
██▀░░██████▀░▀████░░▀██
██▀░░▀▀▀████████████░░▀██
██░░█▄████▀▀███▀█████░░██
██░░███▄▄███████▀▀███░░██
██░░█████████████████░░██
██▄░░████▄▄██████▄▄█░░▄██
██▄░░██████▄░░████░░▄██
█████▄░░▀███▌░░▐▀░░▄█████
███████▄▄███████▄▄███████
█████████████████████████
.
.ROOBET 2.0..██████.IIIIIFASTER & SLEEKER.██████.
|

█▄█
▀█▀
████▄▄██████▄▄████
█▄███▀█░░█████░░█▀███▄█
▀█▄▄░▐█████████▌▄▄█▀
██▄▄█████████▄▄████▌
██████▄▄████████
█▀▀████████████████
██████
█████████████
██
█▀▀██████████████
▀▀▀███████████▀▀▀▀
|.
    PLAY NOW    
hosseinimr93
Legendary
*
Online Online

Activity: 2380
Merit: 5235



View Profile
November 03, 2023, 08:28:44 PM
 #5

Electrum uses a fixed derivation path when generating a seed phrase and that's why you are not asked to enter the derivation path when you recover your wallet using electrum's seed phrase.

You need to know the derivation path when you have a BIP39 seed phrase. Of course, since most wallets use common derivation paths like m/84'/0'/0', m/44'/0'/0' and m/49'/0'/0', you still don't need to save or write down the derivation path.

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

Activity: 2394
Merit: 5568


Self-proclaimed Genius


View Profile
November 04, 2023, 04:35:36 AM
 #6

If i do lost the access to this wallet, and I put the seeds on other machine to recover my wallet and the funds are 0, this might be because I haven't inserted the derivation path... so I should put m/0'/n' on it (considering it is a standard wallet) and then my problem is solved? If not, what should I do? What are the concerns about it?
If you restore it to Electrum, it wont ask you for a derivation path just like when you created the wallet.

But if you restore it to another wallet, that depends on the wallet and its restore options.
Some wallets directly support the seed phrase; some wallets that accept descriptors can import the master private key with the correct derivation path.

Some useful info:
Under the hood, Electrum derives a "master private key" (m) from the seed and derive external and internal chains at (m/0 and m/1) for receiving and change address parent extended keys.
Then, the addresses which at (m/0/0~19 and m/1/0~9) for the initial 20 receiving and 10 change addresses.
This is only useful for deriving the keys and addresses from the master private key using tools like IanColeman's BIP39 tool or for import via "descriptors".

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

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

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

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

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

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











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











▄▄▄▄█
pooya87
Legendary
*
Offline Offline

Activity: 3430
Merit: 10517



View Profile
November 04, 2023, 05:58:30 AM
 #7

If i do lost the access to this wallet, and I put the seeds on other machine to recover my wallet
The thing about Electrum mnemonics is that unlike BIP39 they have a hidden version inside of them that tells your wallet what type of addresses and at what derivation path to derive from the seed. That means you do not need to know this two important information (address type and path).

So if you use another Electrum software on any other device or if you use another wallet software that supports the same algorithm (like Bluewallet) it should derive the correct addresses for you without needing any additional steps.

However if you want to know the derivation paths, here they are:
Standard: m/0/
SegWit: m/0'/0/
2FA (legacy and SegWit): m/1'/0/

I believe change addresses are derived at /1/ instead of /0/ meaning for example SegWit change address is derived at m/0'/1/

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18509


View Profile
November 04, 2023, 08:50:45 AM
Merited by pooya87 (2), nc50lc (1)
 #8

Under the hood, Electrum derives a "master private key" (m) from the seed and derive external and internal chains at (m/0 and m/1) for receiving and change address parent extended keys.
Then, the addresses which at (m/0/0~19 and m/1/0~9) for the initial 20 receiving and 10 change addresses.
This is only the case for legacy wallets. Electrum uses m/0' (rather than just m) for single-sig segwit wallets, which has obviously been the default wallet type for some time.

2FA (legacy and SegWit): m/1'/0/
This is not quite right either. Electrum uses the following:

Legacy: m
Segwit: m/0'
Legacy multi-sig: m
Segwit multi-sig: m/1'

It will then append /x/y to the above derivation paths, with x being 0 or 1 for receiving or change, and y being the address index. For 2FA wallets, your three master keys are derived at m/0', m/1', and m, respectively. The final key at m is the one which is derived from your previous two keys and the hardcoded TrustedCoin key.
nc50lc
Legendary
*
Offline Offline

Activity: 2394
Merit: 5568


Self-proclaimed Genius


View Profile
November 04, 2023, 01:34:09 PM
 #9

Under the hood, Electrum derives a "master private key" (m) from the seed and derive external and internal chains at (m/0 and m/1) for receiving and change address parent extended keys.
Then, the addresses which at (m/0/0~19 and m/1/0~9) for the initial 20 receiving and 10 change addresses.
This is only the case for legacy wallets. Electrum uses m/0' (rather than just m) for single-sig segwit wallets, which has obviously been the default wallet type for some time.
Okay, I checked and the output of getmasterprivate() command with SegWit wallets is indeed already at m/0' and the master public key in "Wallet->Information" is its pair.


So they instead used the hardened child extended private key as SegWit master private key.
They probably just stick to calling it "master key" instead of "extended key". (well, that caused some confusion)

But with it, my post is still applicable to SegWit when it comes with deriving the private keys or addresses from the "master private key" - output of getmasterprivate() command.

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

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

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

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

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

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











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











▄▄▄▄█
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18509


View Profile
November 04, 2023, 02:08:48 PM
 #10

They probably just stick to calling it "master key" instead of "extended key". (well, that caused some confusion)
Yeah, it's a bugbear of mine and something that pretty much all wallets (and most users) do. The term "master private key" should be reserved for the key at path m. Anything at a lower level than that is an "extended private key". The "extended private key" unique to a specific wallet is the "account extended private key".

In the case of Electrum segwit wallets, then m is the master private key and m/0' is the account extended private key.
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!