0
I've been reading about BIP32 HD wallet and it's implementation and came across a few questions regarding the possible known "attack" vector of leaked private child keys and known xpub parent key leading to the discovery of the parent private key.
Given the following path of an HD wallet:
m/b/p/c
Where m is the master node derived from a seed, b, p, c being indexed nodes in different depths.
Imagine that a server is watching and creating receiving c addresses from p's xpub. If one of c's node's private key gets leaked and the server gets hacked, thus revealing xpub to the attacker, the attack could now generate p's xpriv and with that, all of c's node's private and public address could be derived by the attacker (hardened c nodes included).
First question: If p was a hardened node, could the attacker still calculate its private key from it's xpub and a child's private key ?
Second question: Could the attacker "climb up" the depth (calculate parent's xpriv) from p all the way over to m after calculating p's xpriv from the leaked c key and p's xpub ? Would a hardened b or p make a difference here ?
Third question: If a private key from c's depth was leaked and the attacker knew m's xpub, could the attacker calculate m's private key or does the exploit only permits calculating the direct parent of a leaked child ?
Bonus question: Could anyone give actual use cases for using one or more hardened nodes in a path ?
Chaincodes are intended to be shared with others-- not published on the blockchain, but not secret data. Describing BIP32 public derivation being secure against private key relations so long as the attacker doesn't know the chain code is technically correct, but might be a little dangerously misleading. – G. Maxwell – 2018-09-04T19:12:13.260
So in the above path, if any
c'sxprivandp'sxpubwere known, onlyc's nodes would be exposed and the attacker couldn't do anything else to the rest of thec's parent nodes. In essence, hardening nodes is only useful in a scenario wheremorb'sxpubs are also known, rendering the whole tree exposed with anycprivate key, is that correct ? – Luis Pais – 2018-09-04T20:15:00.797Yes, that is correct. But as G. Maxwell points out, the chaincode is meant to be shared and sharing the chaincode will result in the entire tree be exposed. – Andrew Chow – 2018-09-04T22:21:40.943
Alright that's all I needed to know, thank you ! – Luis Pais – 2018-09-05T01:02:57.017