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

Wrong tweaking in the new musig2 crate #415

Closed
ceyhunsen opened this issue Jan 15, 2025 · 3 comments
Closed

Wrong tweaking in the new musig2 crate #415

ceyhunsen opened this issue Jan 15, 2025 · 3 comments
Assignees

Comments

@ceyhunsen
Copy link
Member

Proposal Description

Secp256k1's musig implementation's tweaking methods doesn't act the same with the previous version. It might be because there are differences inside the library or wrong usage of the library.

WIP PR: #405

Looks like the new module sorts public keys regardless. See: rust-bitcoin/rust-secp256k1#716 (comment)

@ozankaymak
Copy link
Contributor

ozankaymak commented Jan 15, 2025

#[derive(Debug, Clone)]
pub enum MuSig2Mode {
  OnlyKeySpend(XOnlyPublicKey),
  OnlyScriptSpend(TapNodeHash),
  BothKeyAndScriptSpend(XOnlyPublicKey, TapNodeHash),
  None,
}

It makes sense to use something like this now since we have new use cases.

@ceyhunsen
Copy link
Member Author

#[derive(Debug, Clone)]
pub enum MuSig2Mode {
  OnlyKeySpend(XOnlyPublicKey),
  OnlyScriptSpend(TapNodeHash),
  BothKeyAndScriptSpend(XOnlyPublicKey, TapNodeHash),
  None,
}

It makes sense to use something like this now since we have new use cases.

Added to the PR.

@ekrembal ekrembal added this to the Deposit Signature Collection milestone Jan 15, 2025
@ozankaymak
Copy link
Contributor

Closing this because #405 is merged. Check #427 .

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

No branches or pull requests

3 participants