Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: unspendable key path for multisig #1

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

kewde
Copy link
Collaborator

@kewde kewde commented Dec 18, 2024

No description provided.

</pre>

==Abstract==
This document specifies a <tt>unspendable()</tt> key expression for output script descriptors. The <tt>unspendable()</tt> expression takes multiple public keys as input and produces an unspendable public key that can be independently verified by anyone with knowledge of all the constituent public keys.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want to give keys to the expression. It should introspect the the descriptor and collect the keys itself.

It should also specify that it's constituent extended public keys.

This document introduces a mechanism to compute a NUMS (Nothing Up My Sleeve) point for use in the Taproot key path that:
* Allows active participants involved in constructing the output script to independently verify the unspendable key.
* Prevents passive observers from recognizing that the key path is unspendable.
* Enables signers with limited information, such as hardware wallets, to verify unspendability without requiring user interaction.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another motivation is having a deterministic key that can be recreated from the rest of the descriptor, so that the entropy does not have to be backed up separately.


The vector of keys is processed in the following sequence: deduplication, compression, sorting, concatenation, and finally, SHA256 hashing to generate a chaincode <tt>r</tt>.
A new unspendable key is constructed by taking the NUMS point <tt>H</tt>, suggested in BIP-0341, and attaching the chaincode <tt>r</tt> we previously computed.
<tt>H + r*G</tt> where <tt>H = lift_x(0x50929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0)</tt>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want to do this, we will use the pubkey 0x50929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0 and r is the chaincode.

<tt>H + r*G</tt> where <tt>H = lift_x(0x50929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0)</tt>

Q: should we add a prefix like the "BIPXXXX" before we SHA256 the keys to ensure the preimage was not previously leaked before this BIP?
Q: is it desireable to specify the keys in the expressions or to extract it from the script expression indirectly?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extract it I think.


Q: should we add a prefix like the "BIPXXXX" before we SHA256 the keys to ensure the preimage was not previously leaked before this BIP?
Q: is it desireable to specify the keys in the expressions or to extract it from the script expression indirectly?
Q: compress first and then sort, or sort and then compress?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should only use this with compressed public keys. So, fail if not compressed.

A new unspendable key is constructed by taking the NUMS point <tt>H</tt>, suggested in BIP-0341, and attaching the chaincode <tt>r</tt> we previously computed.
<tt>H + r*G</tt> where <tt>H = lift_x(0x50929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0)</tt>

Q: should we add a prefix like the "BIPXXXX" before we SHA256 the keys to ensure the preimage was not previously leaked before this BIP?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh yes we should probably use a tagged hash with BIPXXXX/pubkeys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants