To kick things off: what are these “hardened” and “extended” terms? Well, let’s start with the basics. In HD (Hierarchical Deterministic) wallets, private keys are generated using an algorithm called BIP32. This allows for easy management of multiple addresses without having to store each one separately.
Now, when we talk about “hardened” keys, what we’re referring to is a specific type of key that has been protected by adding extra security measures. These hardened keys are generated using an index number from 0x80000000 to 0xffffffff (which is the range for generating hardened keys).
So, what makes these “hardened” keys so special? Well, they’re designed to be more secure than regular private keys. This is because they use a different algorithm when generating their child keys, which makes it much harder for attackers to guess or brute force them.
These hardened extended private keys are also used in HD wallets to create what we call “grandchild” and even “great-grandchild” keys. This means that you can generate multiple layers of child keys without having to store each one separately which is a huge time saver for those who manage large numbers of addresses!
So, how do these hardened extended private keys work exactly? Well, let’s take a look at an example:
Let’s say you have a parent key with the index number 0x80000001. This would generate a child key using the algorithm we mentioned earlier (which is called HMAC-SHA512). The resulting child key would then be used to create another layer of keys, which are known as “grandchild” keys.
Now, let’s say you want to access one of these grandchild keys. To do this, you would use the parent key (0x80000001) and a specific index number for that particular grandchild key. This would generate another layer of child keys using HMAC-SHA512, which would then be used to create your final “grandchild” key.
Hardened extended private keys in HD wallets made simple (or as simple as possible) for all you crypto enthusiasts out there.