forked from BitBoxSwiss/bitbox02-firmware
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bitcoin/policies: show provably unspendable Taproot internal keys
In Taproot policies, it is a common pattern to use an unspendable internal public key if one only wants to use script path spends, e.g. tr(UNSPENDABLE,{...}) https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki#constructing-and-spending-taproot-outputs decribes that one could use the NUMS point for that: > One example of such a point is H = lift_x(0x50929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0) which is constructed by taking the hash of the standard uncompressed encoding of the secp256k1 base point G as X coordinate. Wallet policy keys however must be xpubs, and also it is not desirable to use the NUMS point, as described in https://delvingbitcoin.org/t/unspendable-keys-in-descriptors/304: > 1. unspendable keys should be indistinguishable from a random key for an external observer; > 2. in a descriptor with the range operator (like the wallet policies > compatible with most known wallet account formats), each > change/address_index combination must generate a different unspendable > pubkey, and they should not be relatable to each other (in order to > avoid fingerprinting); The proposal in https://delvingbitcoin.org/t/unspendable-keys-in-descriptors/304/21 to use an xpub with the NUMS public key and a chain_code derived as the hash from the xpubs in the descriptor was adopted by Liana wallet. This commit implements this. Note that even though this proposal it not a standard yet, it is still provably unspendable, so we can display this info to the user. A future standard to achieve the same can be included later.
- Loading branch information
Showing
2 changed files
with
200 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters