A hierarchical deterministic (HD) wallet is a digital wallet commonly used to store the digital keys for holders of cryptocurrencies such as Bitcoin and Ethereum. Anyone with a copy of both the public and password-like private key can control the cryptocurrency in the account.
To prevent hacking these keys must be randomly generated and backed up in the wallet.
HD wallets enable a series of key pairs to be created from one random seed, providing convenience and manageability as well as high-level security.
In the cryptocurrency world, wallets contain keys instead of coins. A cryptocurrency wallet has two keys: a public key or address, which acts much like an account number, and a private key that the holder uses to transfer funds to other accounts. The private key is much like a password. Someone transferring Bitcoin from their account, for example, would use their private key to authorize the transaction.
This combination of public and private keys is designed to ensure security from hackers as well as anonymity in transactions. Because the pair of keys enables the transfer of someone’s cryptocurrency, it is critical that the private key remains safe. To this end, the keys are generated randomly.
Each key must be backed up in the wallet to prevent it and the funds it is linked to from becoming irrevocably lost to the owner. But to ensure privacy–one of the purposes driving the creation of Bitcoin and other cryptocurrencies–and limit the use of public keys to one transaction each, a new pair of keys would need to be created for each transaction. This can get difficult to manage over time.
Deterministic wallets were created to offer a solution, one in which all keys can be traced back to an original random seed, usually a set of random words, and a hash function. With a deterministic wallet, the original seed is enough to recover all private and public keys, therefore requiring only a single backup at the time of creation.
HD Wallets are the most advanced type of deterministic wallet. They contain keys in a tree structure, in which parent keys can produce children keys, which can produce grandchildren keys, and so on, infinitely. The cryptocurrency holder can use the tree structure to organize transactions by type of transaction or by entity involved, such as departments or subsidiaries.
Like simple deterministic wallets, all HD wallets are created from a single master root seed, usually represented by a mnemonic word sequence, which makes it easier for account holders to transcribe and store. But HD wallets also offer the option of creating public keys without having to access the corresponding private keys. This means they can be used on insecure servers or in a receive-only mode.