BIP32 связывает каждый key с 256-битным chain code. HMAC-SHA512 и числовой path создают children; xpub выводит обычных публичных потомков, а hardened требует private material. Эта граница позволяет делегирование и определяет ущерб утечки.
Pieter Wuille написал BIP32, назначенный 11.02.2012. Иерархия делегирует account или receive branch. Это не consensus; mnemonic, passphrase, script и 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 с key ‘Bitcoin seed’ даёт IL как master candidate и IR как chain code. IL=0 либо IL≥n означает invalid 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 и siblings. Hardened блокирует этот расчёт, не кражу seed, слабый RNG или ошибочно одобренную transaction. [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 data и не node rules; ' означает +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 и время. Compromised host может подменить address; важный receive проверяйте на экране 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; сохраните tested descriptor. [BIP 380 — Output script descriptors] [BIP 389 — Multipath descriptor key expressions] [Bitcoin Core — Output descriptors] [Bitcoin Optech — Output script descriptors]
Root seed устраняет backup каждой key, но recovery требует passphrase, format, network, purpose/script, coin type, accounts, receive/change, gap policy и multisig descriptor. Нулевой balance часто значит wrong tree. Тестируйте 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. [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.