0

I am attempting to understand Bitcoin Core and its use of BIP32 HD hardened keys -

https://developer.bitcoin.org/devguide/wallets.html

The article explains that the HD protocol uses different index numbers to determine whether a hardened key should be used or not.

My question is does the default Bitcoin Core implementation (HD wallet) always generate hardened keys in all cases? Say I want a legacy address and run 'getnewaddress "test" "legacy"' at the console -- will it be HD generated and will it always be hardened? Is there a way to check?

If the private key of that specific generated address was later compromised, can anything be leaked about the Bitcoin Core HD wallet from which it came? Is each private key as independent as keys in a "loose keys" wallet? (as mentioned in the article)

1

My question is does the default Bitcoin Core implementation (HD wallet) always generate hardened keys in all cases?

HD wallets of the default wallet type, known as the legacy wallet, always uses hardened derivation. It cannot be changed to use unhardened derivation nor can it be changed to use other derivation paths. So it will always be hardened. There are no known issues with hardened derivation. Even knowing child private keys cannot result in learning a parent private key.

Say I want a legacy address and run 'getnewaddress "test" "legacy"' at the console -- will it be HD generated and will it always be hardened? Is there a way to check?

If the wallet is a legacy wallet and is set to use HD, then use, it will always use hardened derivation. You can check this by using getaddressinfo to get the derivation path used. To verify the derivation path, you can use dumpwallet to get the master private key and do the derivation yourself.

If the private key of that specific generated address was later compromised, can anything be leaked about the Bitcoin Core HD wallet from which it came? Is each private key as independent as keys in a "loose keys" wallet? (as mentioned in the article)

Hardened derivation means that it is not possible to learn anything about parent or sibling private keys given a child private key. It is, for all intents and purposes, the same as a set of randomly generated private keys.

However Bitcoin Core now supports BIPs 44, 49, and 84 which specify a set of standard derivation paths which happen to use unhardened derivation. There are used in the experimental descriptor wallets added to introduced in Bitcoin Core 0.21. Unhardened derivation has an issue where it is possible to learn the parent private key if the parent public key and a child private key is known. This can result in the compromise of an entire wallet. It is because of this that descriptor wallets do not support exporting individual private keys, and currently does not have any form of export at all.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.