30 / 691BIP32

HD Wallet

HDウォレット

HD walletは1つのmaster extended keyから鍵ツリーを再現する。BIP32はbackup更新を減らしwatch-only branchを可能にするが、mnemonic、script、account、完全なrecovery policyは定義しない。

BIP32は各keyに256-bit chain codeを組み合わせ、HMAC-SHA512と番号付きpathでchildを導出する。xpubはnormal public descendantsを作れるがhardenedにはprivate materialが必要で、この境界がdelegationと漏洩範囲を決める。

Pieter WuilleがBIP32を執筆し2012-02-11にassigned。階層によりaccount/receive branchだけを委任できる。consensusではなく、mnemonic、passphrase、script、discoveryはBIP39・path規格・descriptorの別layer。 [BIP 32 — Hierarchical deterministic wallets] [BIP 39 — Mnemonic code for deterministic keys] [Bitcoin Developer Guide — Wallets]

Extended private keyはsecp256k1 scalar kと32-byte chain code c、public形はK=point(k)。key ‘Bitcoin seed’のHMAC-SHA512でILがmaster候補、IRがchain code。IL=0またはIL≥nならseedは無効。 [BIP 32 — Hierarchical deterministic wallets]

CKDprivはparse256(IL)をparent scalarへmod nで加算しIRをchild codeにする。normalはserP(Kpar)||ser32(i)、hardenedは0x00||ser256(kpar)||ser32(i), i≥2^31。CKDpubはnormal public childのみ。 [BIP 32 — Hierarchical deterministic wallets]

xpubはnormal public descendantsを生成する。しかしparent xpubと漏洩したnon-hardened child private keyが1つあればparent private keyとsiblingsを復元できる。hardenedはこの逆算だけを防ぎ、seed theftや誤承認は防がない。 [BIP 32 — Hierarchical deterministic wallets]

78-byte serializationはversion、depth、4-byte parent fingerprint、child number、chain code、key dataにBase58Check。mainnet xprv/xpubは通常111文字。fingerprintは強い認証でなく、SLIP132 ypub/zpub対応も不統一。 [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規約でseed内データやnode ruleではない。'は+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を可能にするが、過去未来address・balance・timingを結ぶ。compromised hostはaddressを差し替えられるため重要な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を結ぶ。1つのmultisig seedは他xpub、順序、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で各keyのbackupは不要だが、recoveryにはpassphrase、format、network、purpose/script、coin type、account、receive/change、gap policy、multisig descriptorが必要。zero 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非対応、wrong depthが多い。xprvはspend authority、xpubはfinancial metadata、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.

DOC · 001BIP 32 — Hierarchical deterministic wallets仕様 ↗DOC · 002BIP 43 — Purpose field for deterministic wallets仕様 ↗DOC · 003BIP 44 — Multi-account hierarchy仕様 ↗DOC · 004BIP 48 — Multi-script hierarchy for multisig wallets仕様 ↗DOC · 005BIP 84 — Native SegWit derivation仕様 ↗DOC · 006BIP 86 — Single-key Taproot derivation仕様 ↗DOC · 007BIP 380 — Output script descriptors仕様 ↗DOC · 008BIP 389 — Multipath descriptor key expressions仕様 ↗DOC · 009SLIP 132 — Registered HD version bytes仕様 ↗DOC · 010Bitcoin Core — Output descriptors文書 ↗DOC · 011BIP 39 — Mnemonic code for deterministic keys仕様 ↗DOC · 012Bitcoin Developer Guide — Wallets文書 ↗DOC · 013Bitcoin Optech — Output script descriptors文書 ↗DOC · 014Trezor Learn — Hierarchical deterministic wallets文書 ↗
2026年8月1日確認一次資料を優先 · 投資助言ではありません