0
The below is the snippet from bip-32. I do not understand under what circumstance would 'parent extended public key' be exposed? In the case of e-commerce a 'child extended public key' is derived from 'parent extended public key'. The e-commerce website only needs to know 'child extended public key' to derive public key/addresses. In such case, will knowing 'child extended public key' expose 'parent extended private key'?
"One weakness that may not be immediately obvious, is that knowledge of a parent extended public key plus any non-hardened private key descending from it is equivalent to knowing the parent extended private key (and thus every private and public key descending from it)."
Example of code snippet in Javascript
function testXPub() {
const mnemonic = 'ddddddddddddddddddddddddddddddddddddddddddddddd'
const seed = bip39.mnemonicToSeed(mnemonic)
const node = bip32.fromSeed(seed)
const xpubNode = node.neutered()
console.log("xpubNode :%o", xpubNode)
console.log("xpubNode (string): %o", xpubNode.toBase58())
const xpub_m_0_node = xpubNode.derive(0)
console.log("xpub_m_0_node :%o", xpub_m_0_node)
console.log("xpubNode (string): %o", xpub_m_0_node.toBase58())
const xpub_m_0_0_node = xpubNode.derive(0).derive(0)
console.log("xpub_m_0_0_node :%o", xpub_m_0_0_node)
console.log("xpubNode (string): %o", xpub_m_0_0_node.toBase58())
}
So instead of sharing xpubNode, i would share xpub_m_0_0_node.
https://bitcoin.stackexchange.com/q/55383/7272 – Raghav Sood – 2018-08-14T13:18:09.923
Not sure how is related to the suggested link? I am interested to understand as per bip32, why would anyone share the 'parent extended public key'? The use case for xpub I assume will be the 'child extended public key' derive from parent extended public key. – brianinhk – 2018-08-14T14:25:50.623