MASTERING-BITCOIN
| Formula | Name | Meaning |
|---|---|---|
| Key pair identity | Public key = private scalar times generator | |
| Linearity identity | Adding publicly equals adding to privately | |
| Child key pair | Derived (non-hardened) child from tweak | |
| Hardened tweak | Mixes parent private key into the tweak so alone cannot derive child |
The single identity is the whole trick. It says that scalar multiplication by is linear, so adding a tweak on the public side gives the same point as adding the tweak to the secret and multiplying after.
Below, is drawn as a 2D vector standing in for the elliptic-curve generator. Scalar multiplication of a vector by an integer has the same linearity property that the elliptic curve has. Watch how the public route (red then blue) and the private route (green dashed) always land on the same endpoint .
โ interactive visualization โ coming to this page format soon
Notice: No matter which values of and you pick, the gold star sits at exactly the same point whether you traveled there by the public route (red + blue) or the private route (green dashed). That single fact is the whole reason watch-only wallets and offline hardware signers can agree on addresses without ever sharing a secret.
BIP32 applies the tweak trick recursively. From a single master key (derived from a 12- or 24-word seed), an entire tree of child key pairs is generated โ accounts, receiving/change chains, and thousands of individual addresses per chain. Explore the tree below by picking an account and an address index.
โ interactive visualization โ coming to this page format soon
Reflect: The entire tree โ every account, every chain, every address โ is reproducible from the same seed phrase. One paper backup protects a lifetime of addresses. Non-hardened branches (the lower levels) allow an online machine holding only to derive child public keys; hardened branches (the top-level accounts, marked with an apostrophe) isolate sensitive segments so a leaked child reveals nothing upstream.
Question 1
Alice holds the master private key and the master public key . Bob has only . Bob picks a tweak and computes .
What does Bob's result equal?
โ Correct! This is the linearity identity with .
โ Not quite. Remember the identity .
Solution:
The linearity identity says
So with ,
The child private key is , and the child public key is . Bob computed using only public data; Alice can later compute the matching by adding to her secret .
Note why the other options are wrong:
Question 2
True or False: A web frontend that holds only the master public key (and never any private key) can still generate an unlimited supply of fresh Bitcoin receiving addresses for customers, as long as it uses non-hardened derivation.
โ Correct! This is the watch-only wallet pattern.
โ Not quite. The linearity identity lets you compute child public keys from alone along non-hardened branches.
โ Not quite. Try again โ the hints above can help.
Solution: True.
For each new payment the frontend picks a fresh tweak (often derived deterministically, e.g. from a counter or a chain code and an index) and computes
This uses only the master public key and the publicly-computable point . No secret is required on the frontend. The matching private key only needs to exist on the offline hardware signer when a spend is actually required.
This is exactly what powers watch-only wallets, exchange deposit address generation, and the hot/cold split in hardware-wallet setups.
(Note: hardened derivation breaks this trick on purpose โ but Question 3 covers that.)
Question 3
An attacker somehow learns a non-hardened child private key and also learns the tweak that produced it from the parent.
What can the attacker compute?
โ Correct! This upward leak is exactly the reason hardened derivation exists.
โ Not quite. With non-hardened derivation, , so subtracting recovers .
Solution:
Non-hardened derivation uses where is a publicly-computable tweak. If an attacker knows both and , they can simply rearrange:
This is the known downside of non-hardened derivation, and it is exactly why BIP32 also defines hardened derivation. Hardened derivation builds the tweak from a hash of the parent private key:
Because an attacker with only (or even a leaked child key) cannot invert the hash to recover , hardened derivation breaks the public-side linearity trick on purpose and isolates the branch.
Rule of thumb:
Question 4
Which property of elliptic-curve scalar multiplication is the single fact that makes HD wallets, watch-only wallets, and offline hardware signers all possible?
โ Correct! Linearity is the one property doing the heavy lifting across every HD-wallet feature.
โ Not quite. The other properties matter for Bitcoin, but the HD-wallet trick specifically depends on linearity.
Solution:
The key property is linearity:
Because adding the same tweak on each side preserves the relationship, you can derive a valid child public key on the public side (using only ) and the matching child private key on the private side (using only ), and they will line up โ with no communication required beyond the publicly-known tweak.
The other options are all true statements about EC cryptography, but they play different roles:
One line of algebra carries the entire self-custody stack.
Solved: 0 / 4