Post
Topic
Board Development & Technical Discussion
Re: How are spend and change addresses derived?
by
ranochigo
on 13/08/2024, 12:37:33 UTC
No. That was P2PK. When bitcoin can be sent to public key. Bitcoin address has not been created that time. But starting from P2PKH, the hash of the public key was derived and called the address. Also other addresses derivation path was derived which save more fees while making transaction if compared to P2PKH.
Sligh correction, P2PKH existed since the earliest version of Bitcoin-qt. It was used for peer to peer transactions rather than Bitcoins mined directly to the wallet. The derivation path is not the correct term used for the address formats, they have vastly different encoding.
[/quote]

I didn't realize that the two addresses I mentioned each have their own private key (I thought they both were generated from a single private key). So in the case of a cold wallet (eg, Ledger, Trezor), I guess it's the wallet software that is generating all the necessary private and public keys, and then keeping track of all these keys.
Addresses that are generated from the seed will have one single private key. However, hierarchical deterministic wallets, or HD wallets for short hae a master private key (and master public key). They're able to derivate the individual private-public keypair and consequently each unique addresses accordingly.