Bitcoin Forum
August 01, 2024, 02:09:46 AM *
News: Help 1Dq create 15th anniversary forum artwork.
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: What is the extended private key in WIF format for? BIP32 root key (WIF)  (Read 81 times)
Forsyth Jones (OP)
Hero Member
*****
Offline Offline

Activity: 1246
Merit: 746


Duelbits - Play for Free | Win for Real


View Profile WWW
July 30, 2024, 02:39:22 PM
Merited by ABCbits (3), vapourminer (1)
 #1

There is a way to convert an extended root private key to WIF format. Some tools do this, but I haven't found any use cases yet. Can it be used to recover the same wallet calculated by the extended private key? If not, what is its use?



I don't know of any wallet or tool that restores or derives addresses from a wallet using only the extended private key in WIF format, except for Bitcoin Core in the legacy wallet format.

Remember that an extended private key in WIF format is also a single common private key, so it can derive a common address.

In my opinion, if it's possible to restore a wallet using the WIF extended private key, it'd be much more practical to use an xpriv to restore, as it's an additional option.

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits.
..........UNLEASH..........
THE ULTIMATE
GAMING EXPERIENCE
DUELBITS
FANTASY
SPORTS
████▄▄█████▄▄
░▄████
███████████▄
▐███
███████████████▄
███
████████████████
███
████████████████▌
███
██████████████████
████████████████▀▀▀
███████████████▌
███████████████▌
████████████████
████████████████
████████████████
████▀▀███████▀▀
.
▬▬
VS
▬▬
████▄▄▄█████▄▄▄
░▄████████████████▄
▐██████████████████▄
████████████████████
████████████████████▌
█████████████████████
███████████████████
███████████████▌
███████████████▌
████████████████
████████████████
████████████████
████▀▀███████▀▀
/// PLAY FOR  FREE  ///
WIN FOR REAL
..PLAY NOW..
Charles-Tim
Legendary
*
Offline Offline

Activity: 1624
Merit: 5058


Leading Crypto Sports Betting & Casino Platform


View Profile
July 30, 2024, 02:53:31 PM
Merited by pooya87 (2), vapourminer (1), apogio (1)
 #2

The private key that starts from 05, K or L are referred to as wallet import format (WIF). They are private keys that a single address is derived from. So in HD wallet, they are child keys that generate their responding addresses.

BIP32 Root Key generates child keys while the child keys generate their corresponding addressed. It is the BIP32 which was used before BIP44 and others. BIP32 defines the path to HD wallet.

You can use it on Electrum.

..Stake.com..   ▄████████████████████████████████████▄
   ██ ▄▄▄▄▄▄▄▄▄▄            ▄▄▄▄▄▄▄▄▄▄ ██  ▄████▄
   ██ ▀▀▀▀▀▀▀▀▀▀ ██████████ ▀▀▀▀▀▀▀▀▀▀ ██  ██████
   ██ ██████████ ██      ██ ██████████ ██   ▀██▀
   ██ ██      ██ ██████  ██ ██      ██ ██    ██
   ██ ██████  ██ █████  ███ ██████  ██ ████▄ ██
   ██ █████  ███ ████  ████ █████  ███ ████████
   ██ ████  ████ ██████████ ████  ████ ████▀
   ██ ██████████ ▄▄▄▄▄▄▄▄▄▄ ██████████ ██
   ██            ▀▀▀▀▀▀▀▀▀▀            ██ 
   ▀█████████▀ ▄████████████▄ ▀█████████▀
  ▄▄▄▄▄▄▄▄▄▄▄▄███  ██  ██  ███▄▄▄▄▄▄▄▄▄▄▄▄
 ██████████████████████████████████████████
▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
█  ▄▀▄             █▀▀█▀▄▄
█  █▀█             █  ▐  ▐▌
█       ▄██▄       █  ▌  █
█     ▄██████▄     █  ▌ ▐▌
█    ██████████    █ ▐  █
█   ▐██████████▌   █ ▐ ▐▌
█    ▀▀██████▀▀    █ ▌ █
█     ▄▄▄██▄▄▄     █ ▌▐▌
█                  █▐ █
█                  █▐▐▌
█                  █▐█
▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▀█
▄▄█████████▄▄
▄██▀▀▀▀█████▀▀▀▀██▄
▄█▀       ▐█▌       ▀█▄
██         ▐█▌         ██
████▄     ▄█████▄     ▄████
████████▄███████████▄████████
███▀    █████████████    ▀███
██       ███████████       ██
▀█▄       █████████       ▄█▀
▀█▄    ▄██▀▀▀▀▀▀▀██▄  ▄▄▄█▀
▀███████         ███████▀
▀█████▄       ▄█████▀
▀▀▀███▄▄▄███▀▀▀
..PLAY NOW..
Forsyth Jones (OP)
Hero Member
*****
Offline Offline

Activity: 1246
Merit: 746


Duelbits - Play for Free | Win for Real


View Profile WWW
July 30, 2024, 10:30:21 PM
 #3

The private key that starts from 05, K or L are referred to as wallet import format (WIF). They are private keys that a single address is derived from. So in HD wallet, they are child keys that generate their responding addresses.

BIP32 Root Key generates child keys while the child keys generate their corresponding addressed. It is the BIP32 which was used before BIP44 and others. BIP32 defines the path to HD wallet.

You can use it on Electrum.
Thank you.

I would also like to know if it is possible to convert an extended private key in WIF format to xpriv. If so, what tool or code allows you to do this?

We know that it is possible to convert an xpriv to WIF format.

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits.
..........UNLEASH..........
THE ULTIMATE
GAMING EXPERIENCE
DUELBITS
FANTASY
SPORTS
████▄▄█████▄▄
░▄████
███████████▄
▐███
███████████████▄
███
████████████████
███
████████████████▌
███
██████████████████
████████████████▀▀▀
███████████████▌
███████████████▌
████████████████
████████████████
████████████████
████▀▀███████▀▀
.
▬▬
VS
▬▬
████▄▄▄█████▄▄▄
░▄████████████████▄
▐██████████████████▄
████████████████████
████████████████████▌
█████████████████████
███████████████████
███████████████▌
███████████████▌
████████████████
████████████████
████████████████
████▀▀███████▀▀
/// PLAY FOR  FREE  ///
WIN FOR REAL
..PLAY NOW..
Charles-Tim
Legendary
*
Offline Offline

Activity: 1624
Merit: 5058


Leading Crypto Sports Betting & Casino Platform


View Profile
July 30, 2024, 10:35:29 PM
Merited by vapourminer (1)
 #4

I would also like to know if it is possible to convert an extended private key in WIF format to xpriv. If so, what tool or code allows you to do this?
It is like asking if a leave can result to a tree. It is a tree that can result to leaves.

So that is not possible. I do not know how to explain this better than to tell you to read the mastering bitcoin chapter 4 which discussed about keys, addresses and wallet.

https://www.oreilly.com/library/view/mastering-bitcoin/9781491902639/ch04.html

..Stake.com..   ▄████████████████████████████████████▄
   ██ ▄▄▄▄▄▄▄▄▄▄            ▄▄▄▄▄▄▄▄▄▄ ██  ▄████▄
   ██ ▀▀▀▀▀▀▀▀▀▀ ██████████ ▀▀▀▀▀▀▀▀▀▀ ██  ██████
   ██ ██████████ ██      ██ ██████████ ██   ▀██▀
   ██ ██      ██ ██████  ██ ██      ██ ██    ██
   ██ ██████  ██ █████  ███ ██████  ██ ████▄ ██
   ██ █████  ███ ████  ████ █████  ███ ████████
   ██ ████  ████ ██████████ ████  ████ ████▀
   ██ ██████████ ▄▄▄▄▄▄▄▄▄▄ ██████████ ██
   ██            ▀▀▀▀▀▀▀▀▀▀            ██ 
   ▀█████████▀ ▄████████████▄ ▀█████████▀
  ▄▄▄▄▄▄▄▄▄▄▄▄███  ██  ██  ███▄▄▄▄▄▄▄▄▄▄▄▄
 ██████████████████████████████████████████
▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
█  ▄▀▄             █▀▀█▀▄▄
█  █▀█             █  ▐  ▐▌
█       ▄██▄       █  ▌  █
█     ▄██████▄     █  ▌ ▐▌
█    ██████████    █ ▐  █
█   ▐██████████▌   █ ▐ ▐▌
█    ▀▀██████▀▀    █ ▌ █
█     ▄▄▄██▄▄▄     █ ▌▐▌
█                  █▐ █
█                  █▐▐▌
█                  █▐█
▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▀█
▄▄█████████▄▄
▄██▀▀▀▀█████▀▀▀▀██▄
▄█▀       ▐█▌       ▀█▄
██         ▐█▌         ██
████▄     ▄█████▄     ▄████
████████▄███████████▄████████
███▀    █████████████    ▀███
██       ███████████       ██
▀█▄       █████████       ▄█▀
▀█▄    ▄██▀▀▀▀▀▀▀██▄  ▄▄▄█▀
▀███████         ███████▀
▀█████▄       ▄█████▀
▀▀▀███▄▄▄███▀▀▀
..PLAY NOW..
odolvlobo
Legendary
*
Offline Offline

Activity: 4396
Merit: 3303



View Profile
July 31, 2024, 05:32:32 PM
Last edit: July 31, 2024, 05:56:09 PM by odolvlobo
 #5

You answered your own question. It is used to set/restore the seed value for a Bitcoin Core HD wallet. The BIP32 Root WIF holds the 256-bit seed. It is not an extended key. The extended keys are derived from it.

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
Forsyth Jones (OP)
Hero Member
*****
Offline Offline

Activity: 1246
Merit: 746


Duelbits - Play for Free | Win for Real


View Profile WWW
Today at 12:21:27 AM
 #6

I would also like to know if it is possible to convert an extended private key in WIF format to xpriv. If so, what tool or code allows you to do this?
It is like asking if a leave can result to a tree. It is a tree that can result to leaves.

So that is not possible. I do not know how to explain this better than to tell you to read the mastering bitcoin chapter 4 which discussed about keys, addresses and wallet.

https://www.oreilly.com/library/view/mastering-bitcoin/9781491902639/ch04.html
I think you haven't gotten my point yet, the point here is that it is possible to generate an HD wallet, that is, derive receiving and change addresses using a single WIF key as an HD seed, the only wallet that did this was Bitcoin Core.

According to this post, Achow explains that in Bitcoin Core (bdb - legacy) the hdseed (WIF-key) is used to derive the extended private key (root master key) and then generate new keys using the new seed. Bitcoin Core used the BIP32 method to generate the master private key from a seed, the seed used was a WIF private key and not the common mnemonic in BIP39.

Today with the new descriptor format, this method is no longer necessary to derive an HD wallet using the WIF private key with the sethdseed command.

You answered your own question. It is used to set/restore the seed value for a Bitcoin Core HD wallet. The BIP32 Root WIF holds the 256-bit seed. It is not an extended key. The extended keys are derived from it.

I see, so why in the bitcoin core dumpfile, both the WIF key (which produces the keys from the WIF key seed value) and the xpriv master private key, but both generate the same keys?

I always thought that the WIF private key that contains the value hdseed=1 represented the same value as the xpriv, just converted to WIF.

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits.
..........UNLEASH..........
THE ULTIMATE
GAMING EXPERIENCE
DUELBITS
FANTASY
SPORTS
████▄▄█████▄▄
░▄████
███████████▄
▐███
███████████████▄
███
████████████████
███
████████████████▌
███
██████████████████
████████████████▀▀▀
███████████████▌
███████████████▌
████████████████
████████████████
████████████████
████▀▀███████▀▀
.
▬▬
VS
▬▬
████▄▄▄█████▄▄▄
░▄████████████████▄
▐██████████████████▄
████████████████████
████████████████████▌
█████████████████████
███████████████████
███████████████▌
███████████████▌
████████████████
████████████████
████████████████
████▀▀███████▀▀
/// PLAY FOR  FREE  ///
WIN FOR REAL
..PLAY NOW..
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!