Skip to content

Instantly share code, notes, and snippets.

@DougAnderson444
Created August 11, 2023 15:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DougAnderson444/a199ead1d610ca76cc316fbcf4bf8a09 to your computer and use it in GitHub Desktop.
Save DougAnderson444/a199ead1d610ca76cc316fbcf4bf8a09 to your computer and use it in GitHub Desktop.
Hierarchical Deterministic Wallets - Hardened versus Non-hardened Keys

Hardened vs Non-hardened

With non-hardened keys, one can derive child public keys of a given non-hardened parent key without knowing any private key.

You cannot do this with hardened keys.

Non-Hardened Security Risks

Knowledge of a parent extended public key plus any non-hardened private key descending from it is equivalent to knowing the parent extended private key (and thus every private and public key descending from it).

This means that extended public keys must be treated more carefully than regular public keys. It is also the reason for the existence of hardened keys, and why they are used for the account level in the tree. This way, a leak of account-specific (or below) private key never risks compromising the master or other accounts.

Source: BIP32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment