2

Please comment on the accuracy of this explanation.

Scenario: The master public key is compromised and so all non-hardened public addresses can be generated and monitored by a third party. This negates the privacy gained from avoiding address reuse. (The third party cannot spend any bitcoins from these addresses however).

Hardened public keys cannot be generated from the master public key, and a priori cannot be attributed to the owner of the non-hardened addresses above.

Is it possible to generate such hardened keys in Electrum, and if so, how?

0

Is it possible to generate such hardened keys in Electrum, and if so, how?

It is not possible to generate hardened keys in Electrum because Electrum does not allow you to enter your own BIP 32 derivation paths. The hardening is based upon the derivation paths.

0

Electrum uses a few different derivation paths for various script types. For example for legacy p2pkh addresses (addresses beginning with 1) it uses m/n/i where m is the extended private key (xprv) derived from the seed, n is 0 for external and 1 for change addresses and i is the address index with addresses being generated sequentially starting from 0. Electrum also lets you create a wallet using any xprv and then it'll assume that xprv is m in the derivation path and generate addresses relative to that. So all you have to do is restore your wallet from a hardened xprv such m/1' and electrum will then generate addresses relative to that. These addresses will not be visible to the person who has the extended public key for m.

To generate a wallet using m/1' you can use this script like so:

electrum getmasterprivate| python3 xprv.py -m - -d "m/1'" -p|electrum -w wallet_name restore -

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.