{"id":13617739,"url":"https://github.com/conduition/musig2","last_synced_at":"2025-04-05T18:05:51.075Z","repository":{"id":204544065,"uuid":"704262564","full_name":"conduition/musig2","owner":"conduition","description":"Flexible Rust implementation of the MuSig2 multisignature protocol, compatible with Bitcoin.","archived":false,"fork":false,"pushed_at":"2025-02-18T20:11:22.000Z","size":150,"stargazers_count":34,"open_issues_count":2,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-29T17:07:15.782Z","etag":null,"topics":["bip340","bitcoin","blockchain","multisig","multisignature","musig","musig2","schnorr-signatures"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/conduition.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-12T22:24:57.000Z","updated_at":"2025-03-18T18:14:58.000Z","dependencies_parsed_at":"2023-11-24T08:25:24.454Z","dependency_job_id":"8f7e07e1-c2ba-4506-aa35-7ae4d87da989","html_url":"https://github.com/conduition/musig2","commit_stats":{"total_commits":58,"total_committers":4,"mean_commits":14.5,"dds":"0.18965517241379315","last_synced_commit":"3fe9ab01663cfe565b2b4b8c484c32b864f636ad"},"previous_names":["conduition/musig2"],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conduition%2Fmusig2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conduition%2Fmusig2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conduition%2Fmusig2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conduition%2Fmusig2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/conduition","download_url":"https://codeload.github.com/conduition/musig2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247378140,"owners_count":20929296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bip340","bitcoin","blockchain","multisig","multisignature","musig","musig2","schnorr-signatures"],"created_at":"2024-08-01T20:01:47.182Z","updated_at":"2025-04-05T18:05:51.042Z","avatar_url":"https://github.com/conduition.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# MuSig2\n\nThis crate provides a flexible rust implementation of [MuSig2](https://eprint.iacr.org/2020/1261), an optimized digital signature aggregation protocol, on the `secp256k1` elliptic curve.\n\nMuSig2 allows groups of mutually distrusting parties to cooperatively sign data and aggregate their signatures into a single aggregated signature which is indistinguishable from a signature made by a single private key. The group collectively controls an _aggregated public key_ which can only create signatures if everyone in the group cooperates (AKA an N-of-N multisignature scheme). MuSig2 is optimized to support secure signature aggregation with only **two round-trips of network communication.**\n\nSpecifically, this crate implements [BIP-0327](https://github.com/bitcoin/bips/blob/master/bip-0327.mediawiki), for creating and verifying signatures which validate under Bitcoin consensus rules, but the protocol is flexible and can be applied to any N-of-N multisignature use-case.\n\n## ⚠️ Beta Status ⚠️\n\nThis crate is in beta status. The latest release is a `v0.x.y` version number. Expect breaking changes and security fixes. Once this crate is stabilized, we will tag and release `v1.0.0`.\n\n## Overview\n\nIf you're not already familiar with MuSig2, the process of cooperative signing runs like so:\n\n1. All signers share their public keys with one-another. The group computes an _aggregated public key_ which they collectively control.\n2. In the **first signing round,** signers generate and share _nonces_ (random numbers) with one-another. These nonces have both secret and public versions. Only the public nonce (AKA `PubNonce`) should be shared, while the corresponding secret nonce (AKA `SecNonce`) must be kept secret.\n3. Once every signer has received the public nonces of every other signer, each signer makes a _partial signature_ for a message using their secret key and secret nonce.\n4. In the **second signing round,** signers share their partial signatures with one-another. Partial signatures can be verified to place blame on misbehaving signers (but are not themselves unforgeable).\n5. A valid set of partial signatures can be aggregated into a final signature, which is just a normal [Schnorr signature](https://en.wikipedia.org/wiki/Schnorr_signature), valid under the aggregated public key.\n\n## Choice of Backbone\n\nThis crate does not implement elliptic curve point math directly. Instead we depend on one of two reputable libraries:\n\n- C bindings to [`libsecp256k1`](https://github.com/bitcoin-core/secp256k1), via [the `secp256k1` crate](https://crates.io/crates/secp256k1), maintained by the Bitcoin Core team.\n- A pure-rust implementation via [the `k256` crate](https://crates.io/crates/k256), maintained by the [RustCrypto](https://github.com/RustCrypto) team.\n\nOne or the other can be used. By default, this crate prefers to rely on `libsecp256k1`, as this is the most vetted and publicly trusted implementation of secp256k1 curve math available anywhere. However, if you need a pure-rust implementation, you can install this crate without it, and use the pure-rust `k256` crate instead.\n\n```notrust\ncargo add musig2 --no-default-features --features k256\n```\n\nIf both `k256` and `secp256k1` features are enabled, then we default to using `libsecp256k1` bindings for the actual math, but still provide trait implementations to make this crate interoperable with `k256`.\n\nThis crate internally represents elliptic curve points (e.g. public keys) and scalars (e.g. private keys) using the [`secp` crate](https://crates.io/crates/secp) and its types:\n\n- [`secp::Scalar`](https://docs.rs/secp/struct.Scalar.html) for non-zero scalar values.\n- [`secp::Point`](https://docs.rs/secp/struct.Point.html) for non-infinity curve points\n- [`secp::MaybeScalar`](https://docs.rs/secp/enum.Point.html) for possibly-zero scalars.\n- [`secp::MaybePoint`](https://docs.rs/secp/enum.Point.html) for possibly-infinity curve points.\n\nDepending on which features of this crate are enabled, conversion traits are implemented between these types and higher-level types such as [`secp256k1::PublicKey`](https://docs.rs/secp256k1/struct.PublicKey.html) or [`k256::SecretKey`](https://docs.rs/k256/type.SecretKey.html). Generally, our API can accept or return any type that converts to/from the equivalent `secp` representations, although callers are also welcome to use `secp` directly too.\n\n## Documentation\n\n[Head on over to docs.rs to see the full API documentation and usage examples.](https://docs.rs/musig2)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconduition%2Fmusig2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconduition%2Fmusig2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconduition%2Fmusig2/lists"}