What is an HD Wallet?
An HD wallet, or Hierarchical Deterministic wallet, uses a single seed phrase from which all private and public key pairs can be derived. This structure allows for secure storage and generation of multiple addresses without needing to store each individual key.
HD wallets are widely used in cryptocurrency systems due to their security features and ease of management.
Key Derivation Paths
In an HD wallet, a master seed is derived from the user's mnemonic phrase. From this master key, child keys are generated using a deterministic algorithm. The path used to derive these child keys can be either hardened or non-hardened.
A hardened derivation path ensures that the private key of a parent node cannot be derived from its child nodes, enhancing security.
Hardened vs Non-Hardened Paths
In a non-hardened path, if an attacker gains access to a child private key, they can potentially work backwards through the derivation process to find the parent's private key. This is known as a brute-force attack.
A hardened path prevents this by ensuring that only public information is used in the derivation of subsequent keys, making it impossible for attackers to derive private keys from public ones.
Implications and Best Practices
The choice between hardened and non-hardened paths can significantly impact the security of an HD wallet. Hardened paths are generally recommended as they provide a higher level of protection against attacks.
Users should always ensure that their wallets use hardened derivation paths, especially when dealing with sensitive information such as cryptocurrency.
Frequently asked questions
What is the difference between hardened and non-hardened keys?
Hardened keys prevent an attacker from deriving a parent key from its child keys, while non-hardened keys do not provide this protection, making them more vulnerable to attacks.
Why are hardened paths recommended in HD wallets?
Hardened paths enhance security by ensuring that private keys cannot be derived from public information, thus protecting against potential brute-force attacks on child keys.
Can a non-hardened key ever be secure?
Non-hardened keys can still be secure if the wallet is properly managed and no child keys are compromised. However, hardened paths offer a higher level of security by design.
How does an attacker gain access to a child private key in a non-hardened path?
An attacker could potentially use a brute-force attack on the child private key, and then work backwards through the derivation process using public information to find the parent's private key.
Try it live
Everything above runs in your browser — open HD Wallet Key Derivation: Hardened vs. Non-Hardened Security and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.
▶ Open HD Wallet Key Derivation: Hardened vs. Non-Hardened Security simulation