Skip to content

MuSig rework - API design like FROST #94

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

Merged
merged 7 commits into from
May 13, 2022

Conversation

nickfarrow
Copy link
Collaborator

@nickfarrow nickfarrow commented May 6, 2022

Make MusiG API more like FROST implementation in #84

  • Removes Party::Local and Party::Remote, now and treat local/remote public things the same.
    e.g.
let keylist = musig.new_keylist(vec![
    Party::Remote(p1_pubkey),
    Party::Local(my_keypair),
    Party::Remote(p3_pubkey),
]);

is now

let keylist = musig.new_keylist(vec![
    public_key1,
    public_key2,
    public_key3,
]);
  • Nonces are now used:
let nonces = vec![p1_nonce.public, p2_nonce.public, p3_nonce.public];

as opposed to inputting local & remote nonces separately into functions.

  • Handle nonce negation like with FROST: keylist tracks needs_negation
  • Updates to latest signing tests from secp256k1-zkp (all the reference tests in the draft BIP excluding the tweak tests).

ALSO

  • Removes deterministic signing functions
  • Removes secret.clean(), sessions can now be reused but we need to make sure nonces are not. I got rid of mentions to clean()

This PR does not include tweak tests, and is not yet compatible with the BIP. The changes and tests for the ordinary tweaks will follow in a separate PR.

@nickfarrow nickfarrow force-pushed the just-musig-rework branch 7 times, most recently from 50c8e98 to b984ed4 Compare May 10, 2022 07:48
@nickfarrow nickfarrow marked this pull request as ready for review May 10, 2022 07:54
@nickfarrow nickfarrow force-pushed the just-musig-rework branch from b984ed4 to a801a1f Compare May 12, 2022 05:07
Copy link
Owner

@LLFourn LLFourn left a comment

Choose a reason for hiding this comment

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

This LGTM only minor nits. I'll pass through again tomorrow.

@LLFourn LLFourn merged commit 3852048 into LLFourn:master May 13, 2022
@LLFourn
Copy link
Owner

LLFourn commented May 13, 2022

Nice work. I pushed a commit to fix up comments.

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