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

[musig2] use plain points as inputs #100

Merged
merged 8 commits into from
Aug 17, 2022
Merged

[musig2] use plain points as inputs #100

merged 8 commits into from
Aug 17, 2022

Conversation

LLFourn
Copy link
Owner

@LLFourn LLFourn commented Jul 1, 2022

Experimenting with the idea I put forward here: jonasnick/bips#32.

Since this PR builds upon #97 it already has two phase key aggregation so the change is very simple. The other thing to note is that we were already "pre-negating" the secret keys of keypairs so we don't get any reduction in the number of negation flags we have to keep around (we were down to one already).

Since we do the negation check when we create them
so that before finalizing into an "AggKey" you can apply ordinary b32
type tweaks. After finalization you apply only "XOnly" taproot style tweaks.
nickfarrow added a commit to nickfarrow/secp256kfun that referenced this pull request Aug 16, 2022
@LLFourn LLFourn force-pushed the musig2-ordinary-points branch 2 times, most recently from 0f4c055 to a7e1655 Compare August 16, 2022 07:22
So other crates can use it.
@LLFourn LLFourn force-pushed the musig2-ordinary-points branch from a7e1655 to 5ccf590 Compare August 16, 2022 07:23
@LLFourn LLFourn changed the title [musig2] use ordinary points as inputs [musig2] use plain points as inputs Aug 16, 2022
@LLFourn
Copy link
Owner Author

LLFourn commented Aug 16, 2022

I've just pushed large changes making this compatible with and passing the tests from jonasnick/bips#37

@LLFourn LLFourn force-pushed the musig2-ordinary-points branch from 5ccf590 to 1c7cb23 Compare August 16, 2022 07:25
PR is here: jonasnick/bips#37
Notes:

- It required allowing for binonce::Nonces with zero points
- We now do the "replace by G" if the agg nonce is infinity from the spec
- I replaced the keypair types with the new ones from main lib
- We can't pass all the test vectors because we don't have the same APIs
@LLFourn LLFourn force-pushed the musig2-ordinary-points branch from 1c7cb23 to 54c59d8 Compare August 16, 2022 07:26
Add a method to `NonceKeyPair` so we can use it in FROST in future.
@LLFourn LLFourn force-pushed the musig2-ordinary-points branch from de73d37 to a1d25d7 Compare August 16, 2022 09:57
nickfarrow added a commit to nickfarrow/secp256kfun that referenced this pull request Aug 17, 2022
nickfarrow added a commit to nickfarrow/secp256kfun that referenced this pull request Aug 17, 2022
nickfarrow added a commit to nickfarrow/secp256kfun that referenced this pull request Aug 17, 2022
@LLFourn LLFourn merged commit f8250a2 into master Aug 17, 2022
@LLFourn LLFourn deleted the musig2-ordinary-points branch August 17, 2022 09:02
nickfarrow added a commit to nickfarrow/secp256kfun that referenced this pull request Aug 22, 2022
nickfarrow added a commit to nickfarrow/secp256kfun that referenced this pull request Aug 22, 2022
LLFourn pushed a commit to nickfarrow/secp256kfun that referenced this pull request Sep 6, 2022
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.

1 participant