Author

Topic: HD Wallet (Read 185 times)

sr. member
Activity: 476
Merit: 299
Learning never stops!
November 03, 2024, 06:10:29 PM
#10
It's also worth noting that usually to my knowledge all hardware wallets (HW) internally use an HD key derivation to produce private keys, public keys and corresponding public addresses. I don't know though if this could confuse wallet newbies, when they read something like: a hardware wallet is effectively an HD wallet. Of course not necessarily vice-versa: an HD wallet isn't always a hardware wallet.
It's still worth noting actually.... since almost every modern wallets uses the  Hierarchical Deterministic derivation, then Hardware wallet shouldn't be an exemption as it's part of modern wallets (2014+). i already added it to the note aspect i don't think it should be a confusion, what really matter is to differentiate what HD{Hierarchical Deterministic} wallet means to HW{Hardware wallet} even though HW{Hardware wallet} is a typical example of  HD{Hierarchical Deterministic} wallet.. sounds like a tongue twister hahaha.
hero member
Activity: 714
Merit: 1010
Crypto Swap Exchange
November 03, 2024, 04:23:25 PM
#9
It's also worth noting that usually to my knowledge all hardware wallets (HW) internally use an HD key derivation to produce private keys, public keys and corresponding public addresses. I don't know though if this could confuse wallet newbies, when they read something like: a hardware wallet is effectively an HD wallet. Of course not necessarily vice-versa: an HD wallet isn't always a hardware wallet.
sr. member
Activity: 476
Merit: 299
Learning never stops!
November 01, 2024, 03:59:29 PM
#8
~
In other words you can't derive the hardened child keys using the master public key (without private key).
Thanks for this..  i just added it.
Probably it is worth to mention that the generally accepted acronym for hardware wallet is HW which defers from that one accepted for   Hierarchical Deterministic wallet (HD)
Added that too

Quote
I would refine your definition by pointing out that all those keys (and addresses, respectively) can be layered   to hierarchical structure  where each  upper  level determines the lower one.
Quoted as note Smiley.. thanks!

hero member
Activity: 714
Merit: 1298
November 01, 2024, 02:58:48 AM
#7
Firstly, what is HD wallet:
I've always seen people confuse HD wallet to hardware wallet...some of us might know it but for the newbies and those that does not
i think this should explain little...
HD wallet [Hierarchical Deterministic wallet]  is a type of wallet that generates its private keys
and addresses from a single seed .

I'm also open to any addition and correction...your corrections are welcome.



Probably it is worth to mention that the generally accepted acronym for hardware wallet is HW which defers from that one accepted for   Hierarchical Deterministic wallet (HD)



..
HD wallet [Hierarchical Deterministic wallet]  is a type of wallet that generates its private keys and addresses from a single seed .

I'm also open to any addition and correction...your corrections are welcome.



I would refine your definition by pointing out that all those keys (and addresses, respectively) can be layered   to hierarchical structure  where each  upper  level determines the lower one.

Quote from: BIP32

BIP32

legendary
Activity: 3472
Merit: 10611
October 31, 2024, 10:12:57 PM
#6
Hence, with the master public keys, new child public keys can be generated which doesn't need a private key
There are two types of child keys that are derived from the master keys: hardened and non-hardened.

Their type is determined based on the derivation path. If the index is ≥ 0x80000000 the derived child key is considered hardened and the only way you can derive it is from the master private key to derive a child private key and then compute its public key from that.
In other words you can't derive the hardened child keys using the master public key (without private key).

https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki
sr. member
Activity: 476
Merit: 299
Learning never stops!
October 31, 2024, 06:19:08 PM
#5
~
Here:
You've forgotten to mention the master public keys I think, it's the same than the extented private key xpriv ypriv, zpriv, but those keys can't be used to move your funds. They can be used to easily create watch-only wallet instead  with xpub, ypub and zpub keys. It's an important feature from the Hierarchical Deterministic (BIP32) wallet scheme.
I can add it too... thanks for this  Smiley
legendary
Activity: 2604
Merit: 2353
October 31, 2024, 05:49:10 PM
#4
Each address has it's own private keys which means it's all derived from an extended private key,
the extended private key can be called ( “xprv”/“yprv”/“zprv”) but this depends on the address type since your wallet needs to generate a particular  type of address you choose/need .

 address that starts with 1--Legacy  (P2PKH) => extended private key (“xprv”)

 address that  starts with 3 --Wrapped Segwit (Nested-P2WPKH) => extended private key (“yprv”)

 address that starts with bc1--Segwit (P2WPKH)=>extended private key (“zprv”)...


Now you can choose to recover your Segwit HD wallet anytime if you have the  zprv  by just  importing it to a new wallet, if you tried to use a single private key you will only be importing a single address which is not going to form an HD wallet.
You've forgotten to mention the master public keys I think, it's the same than the extented private key xprv, yprv, zprv, but those keys can't be used to move your funds. They can be used to easily create watch-only wallet instead  with xpub, ypub and zpub keys. It's an important feature from the Hierarchical Deterministic (BIP32) wallet scheme.
sr. member
Activity: 966
Merit: 306
October 31, 2024, 02:10:40 AM
#3
Source: https://learnmeabitcoin.com/technical/keys/hd-wallets/#hmac-sha512-tool
you can learn more from the source above
One more source for your thread about Bitcoin wallets including HD wallets.
Mastering Bitcoin, chapter 5: Wallets.

Maybe this could let me relate on how some have truly misinterpreted the HD wallet for Hardware wallet.
HD wallets are Hierarchical Deterministic (HD) wallets, not Hardware wallets. These wallets use hierarchical deterministic (HD) key generation.

https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch05_wallets.adoc#hierarchical-deterministic-hd-key-generation-bip32
sr. member
Activity: 672
Merit: 416
stead.builders
October 30, 2024, 05:16:46 PM
#2
Maybe this could let me relate on how some have truly misinterpreted the HD wallet for Hardware wallet.

learning never stops, this also could be another source to help someone know more better on the importance of the use of the wallet type, you have made it more explanatory and if i could remember, am not coming across related topic for the first time, but on each occasion i do find something more interesting to hold onto about HD wallet.
sr. member
Activity: 476
Merit: 299
Learning never stops!
October 30, 2024, 04:31:46 PM
#1
Firstly, what is HD wallet:
I've always seen people confuse HD wallet to hardware wallet...some of us might know it but for the newbies and those that does not
i think this should explain little...
 HD => Hierarchical Deterministic Wallet .
 HW => Hardware Wallet .

HD wallet [Hierarchical Deterministic wallet]  is a type of wallet that generates its private keys
and addresses from a single seed .
Thus, a single seed can generate a master private key which can also generate an extended master public key(i.e the master private key generate a master public key) now with the master private key, new child private keys and public keys can be generated. Hence, with the master public keys, new child public keys can be generated which doesn't need a private key

  A brief illustration on how it works:

when you create a wallet you generate a seed ~ 64 random bytes which go through the HMAC hash function to generate a Master extended private key,
the Master extended private key is still  having the master private key but the reason it's uses the word "extended" as the keyword is because it contains the private key and the chaincode,both the private key and the chaincode is use in the generation of child keys in their corresponding indexes(0,1,2.....).

Thus, this private key(i.e the private key in our master extended private key or extended key) is being use to generate the master public key, to create child public keys it needs to go through the HMAC hash along with the chain code in the master private key and this form a extended public key ( i.e master public key  + chain code).
In summary, we have an an extended private key or extended key ( private key and chaincode) to create child keys(private and public ),extended public key ( public key and chain code) to create child public keys.

The extended keys (private and public) can create two types of child keys which are

 * Non-Hardened or Normal => both exended keys can generate same public keys whcih means you can stil use the only the extended public key to generate the child keys...
   it index range from 0d0 to 0d2147483647 [in decimal]... same as 0 to 2147483647
   it index range from 0x0  to 0x7fffffff [in hex(base16)].. hex is a short for hexadecimal

 *Hardened=> to create these child keys there is need for private key unlike normal where you can generate public child keys only  without the need of extended private key
   it index  ranges from 0d2147483648 to 0d4294967295[in decimal]
   it index  ranges from 0x80000000 to 0xffffffff[in hex]

Each address has it's own private keys which means it's all derived from an extended private key,
the extended private key can be called ( “xprv”/“yprv”/“zprv”) but this depends on the address type since your wallet needs to generate a particular  type of address you choose/need .

Extended Private Key (xprv,yprv,zprv)

 address that starts with 1--Legacy  (P2PKH) => extended private key (“xprv”)

 address that  starts with 3 --Wrapped Segwit (Nested-P2WPKH) => extended private key (“yprv”)

 address that starts with bc1--Segwit (P2WPKH)=>extended private key (“zprv”)...


Extended Public Key (xpub,ypub,zpub)

 address that starts with 1--Legacy  (P2PKH) => extended public key (“xpub”)

 address that  starts with 3 --Wrapped Segwit (Nested-P2WPKH) => extended public key (“ypub”)

 address that starts with bc1--Segwit (P2WPKH)=> extended public key (“zpub”)...



Now you can choose to recover your Segwit HD wallet anytime if you have the  zprv  by just  importing it to a new wallet, if you tried to use a single private key you will only be importing a single address which is not going to form an HD wallet.
On the other hand, you can import your zpub on a different wallet to create a view only wallet(watch only  wallet),watch only wallet is a wallet  shows all your available funds, addresses and transactions but inform of a view only mode, to make any transaction(output) happen you need the private key to sign the ownership of the public key

Note:
* "The keys (and addresses, respectively) can be layered   to hierarchical structure  where each  upper  level determines the lower one."
* "Hardware wallets (HW) internally use an HD key derivation to produce private keys, public keys and corresponding public addresses"


Source: https://learnmeabitcoin.com/technical/keys/hd-wallets/#hmac-sha512-tool
you can learn more from the source above

I'm also open to any addition and correction...your corrections are welcome.

Jump to: