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

Add Schnorr wizardry cheat sheet #15

Merged
merged 2 commits into from
Oct 22, 2021
Merged

Add Schnorr wizardry cheat sheet #15

merged 2 commits into from
Oct 22, 2021

Conversation

t-bast
Copy link
Owner

@t-bast t-bast commented Oct 21, 2021

  • Schnorr signatures
  • Adaptor signatures
  • Musig2

* Schnorr signatures
* Adaptor signatures
* Musig2
schnorr.md Outdated
PA = pa*G -> public key of participant A
PB = pb*G -> public key of participant B
L = sorted(PA, PB) -> sorted list of participants public keys
P = H(L || PA)*PA + H(L || PB)*PB -> combined public key
Copy link
Owner Author

Choose a reason for hiding this comment

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

Looking at BlockstreamResearch/secp256k1-zkp#131, it looks like the public key coefficients aren't what I use (which I took from the Musig2 paper).

@jonasnick could you briefly explain why that changed and provide the formula that's currently used?

Choose a reason for hiding this comment

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

You can find the formula being used in the key aggregation spec draft. There's no material difference to what you use, but according to the spec draft the combined public key would be

P = H(H(L) || PA)*PA + PB

Hashing the set L first is an optimization when this hash is used multiple times to compute a key aggregation coefficient. The second public key gets coefficient 1 which is another optimization. This is described in the MuSig2* section in the appendix of the MuSig2 paper.

Copy link
Owner Author

@t-bast t-bast Oct 22, 2021

Choose a reason for hiding this comment

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

Thanks, I did miss that section of the paper indeed!
I now see the corresponding code here, all good.

@t-bast t-bast merged commit fd76376 into master Oct 22, 2021
@t-bast t-bast deleted the schnorr-adaptor-musig branch October 22, 2021 06:41
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