delvingbitcoin
Unspendable keys in descriptors
Posted on: December 28, 2023 16:38 UTC
The comparison of two methods for ensuring the unspendability of extended public keys (xpubs) is critical to understanding advancements in wallet security and descriptor protocols.
The first method, as noted by sipa, involves altering the 'chaincode' part of an xpub during the unspend()
process. This approach is lauded for its simplicity; one can easily verify the unspendability of an xpub by inspecting the associated public key directly.
In contrast, the method described in the sender's notes necessitates regenerating a different public key to achieve the same end. While both methods share equivalent security properties, the computational effort required to confirm an xpub's generation makes the latter less straightforward. As a result, sipa's method is favored for its ease of verification, which aligns it closely with the design principles of descriptors—a concept integral to the organization and management of wallet addresses.
Further integration into wallet infrastructure is addressed through wallet policies, currently crystallizing into a formal proposal known as BIP-0388. This proposal could potentially incorporate a deterministic way to compute the 'HEXCHAINCODE' from the remaining keys. Such a mechanism would further streamline wallet operations by providing a consistent method to derive essential components of the wallet's addressing structure. AntoineP’s suggestion thus contributes to this ongoing discussion, aiming to refine the interaction between wallet policies and their implementation within the broader Bitcoin Improvement Proposal framework.