BIP32 поєднує ключ із 256-бітним chain code. HMAC-SHA512 та числовий шлях створюють дочірні ключі; xpub виводить звичайних публічних нащадків, а hardened потребує приватного матеріалу. Ця межа дає делегування і визначає наслідки витоку.
Pieter Wuille написав BIP32, призначений 11.02.2012. Ієрархія дозволяє делегувати account або receive-гілку. Це не consensus; слова, passphrase, scripts і discovery задають BIP39, path-стандарти та descriptors. [BIP 32 — Hierarchical deterministic wallets] [BIP 39 — Mnemonic code for deterministic keys] [Bitcoin Developer Guide — Wallets]
Extended private key — scalar secp256k1 k і 32-byte chain code c; public форма має K=point(k). HMAC-SHA512 з ключем ‘Bitcoin seed’ дає IL як master candidate та IR як chain code. IL=0 або IL≥n робить seed недійсним. [BIP 32 — Hierarchical deterministic wallets]
CKDpriv додає parse256(IL) до parent scalar modulo n, IR стає child code. Normal використовує serP(Kpar)||ser32(i), hardened — 0x00||ser256(kpar)||ser32(i), i≥2^31. CKDpub працює лише для normal public children. [BIP 32 — Hierarchical deterministic wallets]
xpub створює normal public descendants. Але parent xpub і витік одного non-hardened child private key відновлюють parent private key та sibling branches. Hardened блокує саме це, не крадіжку seed, слабку ентропію чи помилкове підтвердження. [BIP 32 — Hierarchical deterministic wallets]
78-byte serialization містить version, depth, 4-byte fingerprint, child number, chain code і key data та Base58Check. Mainnet xprv/xpub зазвичай 111 символів. Fingerprint не є надійною автентифікацією; ypub/zpub SLIP132 підтримуються нерівномірно. [BIP 32 — Hierarchical deterministic wallets] [SLIP 132 — Registered HD version bytes]
BIP43 вводить purpose'. BIP44: m/44'/coin_type'/account'/change/index, 0/1 і gap limit 20; BIP48 — multisig, BIP84 — SegWit, BIP86 — Taproot. Це wallet conventions, не дані seed і не правила nodes; ' означає +2^31. [BIP 43 — Purpose field for deterministic wallets] [BIP 44 — Multi-account hierarchy] [BIP 48 — Multi-script hierarchy for multisig wallets] [BIP 84 — Native SegWit derivation] [BIP 86 — Single-key Taproot derivation]
Scoped xpub дає watch-only без підпису, але витік пов’язує старі й майбутні адреси, balances та час. Скомпрометований host може підмінити адресу; важливі receive-address перевіряйте на trusted signer. [BIP 32 — Hierarchical deterministic wallets] [Bitcoin Developer Guide — Wallets] [Trezor Learn — Hierarchical deterministic wallets]
xpub не задає script. Descriptor додає origin [fingerprint/path], wpkh(), multisig threshold/cosigners, wildcard і checksum. Один multisig seed не відновить інші xpubs, порядок і threshold; збережіть протестований descriptor. [BIP 380 — Output script descriptors] [BIP 389 — Multipath descriptor key expressions] [Bitcoin Core — Output descriptors] [Bitcoin Optech — Output script descriptors]
Root seed усуває backup кожної адреси, але recovery потребує passphrase, format, network, purpose/script, coin type, accounts, receive/change, gap policy і multisig descriptor. Нульовий balance часто означає неправильне дерево. Тестуйте UTXO і signing. [BIP 44 — Multi-account hierarchy] [BIP 380 — Output script descriptors] [Bitcoin Core — Output descriptors] [BIP 39 — Mnemonic code for deterministic keys]
Рідкісні IL≥n, zero scalar або infinity point переходять до наступного index. Частіші втрати: origin, інший discovery, ypub/zpub, пропущений change, Taproot або неправильна depth. xprv дає витрати, xpub — фінансове спостереження, descriptor — policy map. [BIP 32 — Hierarchical deterministic wallets] [BIP 380 — Output script descriptors] [SLIP 132 — Registered HD version bytes] [Bitcoin Core — Output descriptors]
Для повної картини прочитайте також Гаманець, Seed Phrase, Extended Public Key (xpub), Derivation Path, Gap Limit, Bitcoin. На цю статтю також посилаються Біткоїн-адреса, BIP 39, Cold Storage, Watch-only Wallet.