xpub न Bitcoin address है, न signing key। यह BIP32 tree का एक node export करता है ताकि watch-only wallet या receiving server उसके नीचे public keys और addresses बना सके। Holder सामान्यतः खर्च नहीं कर सकता, पर पूरी derived branch देख सकता है; addresses का अर्थ derivation path और script policy पर भी निर्भर है।
BIP32 extended public key को public point K और 32-byte chain code c की जोड़ी मानता है। Serialization में version bytes, depth, parent fingerprint और child number भी होते हैं। इसलिए xpub अकेला address या सामान्य public key नहीं, बल्कि hierarchy node और उसकी public branch जारी रखने का data है।
CKDpub parent public key, chain code और index को HMAC-SHA512 से जोड़ती है। 0 से 2³¹−1 index के लिए child public key और नया chain code बनते हैं, जिससे online wallet signing secret के बिना receive और change addresses बनाता है। केवल exported node के descendants निकाले जाते हैं, siblings या ancestors नहीं।
Hardened indexes 2³¹ से शुरू होते और apostrophe या h से लिखे जाते हैं। उनके लिए private data चाहिए, इसलिए parent xpub से CKDpub विफल होती है। Wallets आम तौर पर purpose, coin type और account को hardened करके account xpub export करते हैं, जिससे दूसरे hardened accounts अलग रहते हैं।
BIP32 serialization 78 bytes की है: version, depth, parent fingerprint, child number, chain code और 33-byte key material। Base58Check इसे 111 characters बनाता है; mainnet public xpub और testnet tpub से शुरू होता है। Prefix version bytes का परिणाम है, अलग cryptographic key type नहीं।
xpub यह नहीं बताता कि keys P2PKH, wrapped SegWit, native SegWit, Taproot या multisig script बनाएँगी, और key origin न हो तो path अस्पष्ट रहता है। SLIP-0132 ने ypub, zpub जैसे hints दिए; descriptor script, fingerprint, path, xpub, wildcard और checksum स्पष्ट लिखता है।
account xpub वाला व्यक्ति branch की सभी non-hardened receive और change public keys निकालकर transactions और balances जोड़ सकता है। इसे tax software को देना या public block explorer में डालना account का स्थायी view बनाता और network या identity data को on-chain history से जोड़ सकता है।
xpub अकेला सामान्यतः sign नहीं करता। BIP32 का महत्वपूर्ण exception: parent xpub और उसके किसी non-hardened descendant की private key मिलें तो parent private key और बाकी branch निकाली जा सकती है। इसलिए xpub sensitive data है और account boundaries hardened रखी जाती हैं।
Watch-only wallet xpub को monitor करके unsigned transaction बनाती और signing device को देती है। Shop server xprv रखे बिना unique receive addresses बना सकता है। इससे server compromise पर सीधी चोरी घटती है, surveillance नहीं; receive address trusted device display पर verify करना चाहिए।
Multisig में अपना seed पूरा wallet configuration नहीं है; सही recovery के लिए cosigner public keys, threshold, script type और derivation data चाहिए। Descriptor loose xpubs से policy बेहतर बचाता है। आठ-character master fingerprint matching में मदद करता है, identity proof नहीं और collide कर सकता है।
Import से पहले network, account, derivation path, expected script type, receive/change branches और index range तय करें। Trusted device पर xpub या descriptor मिलाएँ, कई addresses derive करके source wallet से जाँचें; privacy loss समझे बिना third-party explorer को xpub न दें। स्रोत: BIP 32 — Hierarchical Deterministic Wallets; BIP 380 — Output Script Descriptors General Operation; SLIP-0132 — Registered HD Version Bytes; Bitcoin Core — Output Descriptors; Trezor — What Is a Public Key (XPUB)?.
पूरी तस्वीर के लिए इस प्रविष्टि के साथ यह भी पढ़ें HD Wallet, Watch-only Wallet, Bitcoin में गोपनीयता, Derivation Path, Bitcoin, Output Descriptor. इस प्रविष्टि का उल्लेख यहाँ भी है HD Wallet, Cold Storage, Watch-only Wallet, Output Descriptor.