BIP-32
2 min read
Pronunciation
[bip thur-tee too]
Analogy
Think of BIP-32 as the master blueprint for a key-making factory. You start with one secret recipe (the master seed), and this blueprint tells the factory how to produce an entire organized system of master keys for different departments, and then individual keys for many different doors (cryptocurrency addresses) within those departments, all derived from that single original recipe. This makes managing a large number of keys very organized and efficient.
Definition
Bitcoin Improvement Proposal 32 (BIP-32) is a technical standard that defines Hierarchical Deterministic (HD) wallets. It allows for the creation of a tree-like structure of key pairs (private and public keys) from a single master seed, enabling users to manage multiple accounts and addresses without needing to back up each private key individually.
Key Points Intro
BIP-32 is a foundational standard for modern cryptocurrency wallets, enabling hierarchical key derivation for simplified management and enhanced privacy.
Key Points
Hierarchical Structure: Defines how to derive child keys from parent keys in a tree-like hierarchy.
Single Seed Derivation: Allows a virtually infinite number of keys to be derived from one single master seed (usually generated from a BIP-39 mnemonic).
Normal and Hardened Derivation: Specifies two types of child key derivation; hardened derivation enhances security by preventing parent public key compromise from revealing child private keys.
Path Notation: Introduces a path notation (e.g., m/0'/0/1) to uniquely identify any key within the hierarchy.
Example
A user's hardware wallet implements BIP-32. When the user initializes the wallet, a master seed is generated. From this seed, the wallet uses BIP-32 derivation paths (often structured by BIP-44) to generate separate key trees for Bitcoin (e.g., path m/44'/0'), Ethereum (e.g., m/44'/60'), and other coins, each with its own accounts and addresses, all restorable from the single initial seed phrase.
Technical Deep Dive
BIP-32 uses a root seed (typically 128, 256, or 512 bits) to generate a master private key (m) and a master chain code. Child keys are derived using HMAC-SHA512. For a parent key (private or public) and a parent chain code, an index number is used to derive a child key. Normal derivation allows deriving a public child key from a public parent key, useful for watch-only wallets. Hardened derivation requires the parent private key and is denoted by an apostrophe in the index (e.g., 0'). It uses a different input to the HMAC-SHA512 function, ensuring that compromise of a parent public key or a normal child private key doesn't compromise other parts of the tree derived through hardened paths.
Security Warning
The security of a BIP-32 wallet system relies entirely on the secrecy of the master seed (and the mnemonic phrase it's derived from). If the master seed is compromised, all derived keys and associated funds are at risk. Also, be cautious with 'extended public keys' (xPubs), as they can reveal all public keys and addresses within their branch, impacting privacy.
Caveat
While BIP-32 provides a powerful framework for key generation, the specific derivation paths used can vary between wallets (though BIP-44 aims to standardize this for common use cases). If a wallet uses non-standard paths, migrating the seed to another wallet might not recover all funds unless that wallet supports the same paths or allows custom path input.
BIP-32 - Related Articles
No related articles for this term.