BIP32
BIP32 is HD Wallet
bips/bip-0032.mediawiki at master · bitcoin/bips
bitcoinbook/ch05_wallets.adoc at develop · bitcoinbook/bitcoinbook
Bitcoin 以外の 暗号通貨の拡張鍵のバージョンバイトを定義した SLIP132 がある
Jonathan Underwood 🟩 ☂さんはTwitterを使っています 「Test case for common BIP32 bug. mnemonic: shoot hill hand utility mercy write foot knife tank random panther all BIP84: tb1qcxqk62apgfxraw38fr5e8gkfajlqj0a885sf8u BIP49: 2MsjGcwTVyueVm9FZWu9epvu9vDU8paYE4s BIP44: mqi9HaZTc22eA6R5YqAaJt4UR4iRQYMjyt」 / Twitter
なぜ chain code が必要か?
security - Why is a chain code needed for entropy in HD wallets? - Bitcoin Stack Exchange
ある private key が知られたら、その private key から導出される private key がすべて知られてしまう
pubkey の場合も同様で、pubkey が知られるのは通常のこと
key + chain code + index にすることで、key に加えて chain code も知らないといけない
hardened derivation
bitcoinbook/ch05_wallets.adoc at third_edition_print1 · bitcoinbook/bitcoinbook
However, because the xpub contains the chain code, if a child private key is known, or somehow leaked, it can be used with the chain code to derive all the other child private keys. A single leaked child private key, together with a parent chain code, reveals all the private keys of all the children. Worse, the child private key together with a parent chain code can be used to deduce the parent private key.
https://gyazo.com/824fc5fde8eddb72259bad5341cccc90
hardened key の場合は
https://gyazo.com/4b18db562592cb95d6e18b66739eeded
Extended key is a set of a key + a chain code
0x00 || ser256(k) for private keys これはなぜ?
Key recovery attack on BIP32-Ed25519 - Web 3 Research - Web3 Foundation Forum