Deriving Extended Private Key
So, the extended private key comes from the root key using a cryptographic hash function like HMAC-SHA512. This gives us a hash that has both the chain code and the extended private key inside it.
• The hash is 512 bits long (that’s 64 bytes). The first half, 256 bits (32 bytes), is the chain code, while the other half also 256 bits (32 bytes) is the extended private key.
• With the chain code plus the parent private key, we can deterministically create child keys. By mixing the parent private key with the chain code and an index, we get a unique child key.
This way, anyone with the same parent private key and chain code can independently derive the same child key.
Also, the chain code boosts security by making it impossible to derive the parent private keys just from the child keys, adding extra protection for hierarchical deterministic wallets.
Deriving Extended Public Key
Now, the extended public key is created from the extended private key using elliptic curve cryptography (ECC). This involves taking the related private key to produce the public key, which is then combined with the chain code from the extended private key to make the extended public key. This allows for the same deterministic process for creating child keys, just like with the extended private key.
ECC is a form of asymmetric cryptography that works based on the cool math of elliptic curves over finite fields.
An elliptic curve is described by the equation y².
Check out my xpriv / xpub key derivation progress
4 replies 484 views
How is this different from what is described in BIP-32?
You're merely transscribing inconhesive bits of what is already know and described better in HD key derivation scheme cited above as BIP-32, unless I missed some important deviations you try to do or something you want to improve (somewhat unlikely).
What purpose exactly does your post has? What are you trying to achieve?
I'm trying to write a personal summary, and the above is a rough start. Thanks for the great input, though, you're especially trained in being an asshole, it seems. Typical Bitcoin Talk trash.
It's not just xpubs and xprvs that can be derived like this, you can also make ypub, zpub and so on by changing the extended key version bits.
I think you might find the full list on SLIP-32 or maybe SLIP-132, I'm not sure which one. But it also includes the values for testnet.
🤣, I keep on finding other parts of the picture... Truly a gift that keeps on giving... Bitcoin.
But is the above going in the right direction?
Related topics
- Bitcoin Core displaying coins (UTXOs) in a new tab 13
- Are you in favor of BIP-110? Let's get a Bitcoin poll going. 0
- Erlay seems to have some issues here’s a better proposal for a bitcoin protocol without invites 3
- New Optional Hourglass Implementation is Live 3
- Ways to earn some sats by contributing to bitcoin core development 5
- Exploring the Potential and Challenges of a Kardashev-Scale Bitcoin Network 3