Since BIP32 child keys are derived from a master xpub key, and child addresses are the pubkey hash of the child private keys, so is it possible/anyway to correlate that two address are derived from the same master key and belonging to the same hd wallet?

pseudo code to illustrate the problem using NBitcoin:

ExtKey masterKey = new ExtKey();
ExtKey user1Key = masterKey.Derive(new KeyPath("m/100'/1"));
ExtKey user2Key = masterKey.Derive(new KeyPath("m/100'/2"));
string addr1 = user1Key.PrivateKey.PubKey.GetAddress(Network.Main);
string addr2 = user2Key.PrivateKey.PubKey.GetAddress(Network.Main);

If an outsider have the addresses addr1 and addr2(and those addresses have transactions on the blockchain), but nothing else, can he work out that the two address are in the same hd wallet?

1 Answer 1


No, from the outside all addresses look completely unrelated, there is no way to work out if two addresses have any relationship to each other, including if one is the parent of the other or sibling of the other, without the chaincode as well. That's because all derivations involve hashing, and hashing is designed to have an apparently randomly distributed output, regardless of the relationship between two inputs to the hash function the outputs should appear unrelated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.