# Unspendable keys in descriptors

**URL:** <https://delvingbitcoin.org/t/unspendable-keys-in-descriptors/304>\
**Category:** Implementation\
**Tags:** miniscript, taproot\
**Created:** [December 19, 2023, 12:46pm UTC](https://delvingbitcoin.org/t/unspendable-keys-in-descriptors/304 "2023-12-19T12:46:39Z")\
**Posts on this page:** 1\
**Showing post:** 20

<div class="post-metadata">

**Author:** ![salvatoshi](https://delvingbitcoin.org/user_avatar/delvingbitcoin.org/salvatoshi/32/72_2.png) [@salvatoshi](https://delvingbitcoin.org/u/salvatoshi)\
**Post date:** [December 28, 2023, 4:38pm UTC](https://delvingbitcoin.org/t/unspendable-keys-in-descriptors/304/20 "2023-12-28T16:38:10Z")

</div>

sipa’s linked approach is similar but not identical to `s2`, as in his version the argument of `unspend()` alters the _chaincode_, while in the version described in my notes above I was instead generating a different pubkey.

They are identical in terms of security properties, but I think sipa’s approach is better as it’s more straightforward to verify that one such xpub is unspendable (just look at the pubkey), while in the approach in `s2` one has to explicitly redo the computation to verify how the xpub is generated.

Anyway, my current thinking is that sipa’s approach is probably the cleanest for descriptors, while wallet policies (now in the process of being finalized as [BIP-0388](https://github.com/bitcoin/bips/pull/1389)) could add a deterministic way of computing the `HEXCHAINCODE` from the remaining keys, as suggested above by @AntoineP.

---

_[View the full topic](https://delvingbitcoin.org/t/unspendable-keys-in-descriptors/304)._
