{"id":22799973,"url":"https://github.com/tangle-network/cggmp-threshold-ecdsa","last_synced_at":"2025-04-19T16:53:21.898Z","repository":{"id":60383575,"uuid":"541233863","full_name":"tangle-network/cggmp-threshold-ecdsa","owner":"tangle-network","description":"MPC protocols for threshold ECDSA","archived":false,"fork":false,"pushed_at":"2024-02-06T15:11:34.000Z","size":1863,"stargazers_count":45,"open_issues_count":12,"forks_count":10,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-10-10T05:29:14.640Z","etag":null,"topics":["cryptography","mpc","multi-party-computation","threshold-cryptography","threshold-ecdsa"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tangle-network.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","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":"2022-09-25T16:23:22.000Z","updated_at":"2024-08-19T13:07:36.000Z","dependencies_parsed_at":"2023-10-02T02:24:55.846Z","dependency_job_id":"5dc2e2a8-e662-4f21-a043-2f587c3408dd","html_url":"https://github.com/tangle-network/cggmp-threshold-ecdsa","commit_stats":null,"previous_names":["tangle-network/cggmp-threshold-ecdsa"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fcggmp-threshold-ecdsa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fcggmp-threshold-ecdsa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fcggmp-threshold-ecdsa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fcggmp-threshold-ecdsa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tangle-network","download_url":"https://codeload.github.com/tangle-network/cggmp-threshold-ecdsa/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229345342,"owners_count":18058474,"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":["cryptography","mpc","multi-party-computation","threshold-cryptography","threshold-ecdsa"],"created_at":"2024-12-12T07:10:39.660Z","updated_at":"2024-12-12T07:10:40.253Z","avatar_url":"https://github.com/tangle-network.png","language":"Rust","readme":"\u003cdiv align=\"center\"\u003e\n\u003ca href=\"https://www.webb.tools/\"\u003e\n    \n![Webb Logo](./assets/webb_banner_light.png#gh-light-mode-only)\n![Webb Logo](./assets/webb_banner_dark.png#gh-dark-mode-only)\n  \u003c/a\u003e\n  \u003c/div\u003e\n\u003ch1 align=\"left\"\u003e\n    \u003cstrong\u003e🚀 CGGMP Threshold ECDSA Distributed Key Generation Protocol 🔑 \u003c/strong\u003e\n\u003c/h1\u003e\n\n[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/webb-tools/cggmp-threshold-ecdsa/check?style=flat-square)](https://github.com/webb-tools/cggmp-threshold-ecdsa/actions) [![Codecov](https://img.shields.io/codecov/c/gh/webb-tools/cggmp-threshold-ecdsa?style=flat-square\u0026token=HNT1CEZ01E)](https://codecov.io/gh/webb-tools/cggmp-threshold-ecdsa) [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) [![Twitter](https://img.shields.io/twitter/follow/webbprotocol.svg?style=flat-square\u0026label=Twitter\u0026color=1DA1F2)](https://twitter.com/webbprotocol) [![Telegram](https://img.shields.io/badge/Telegram-gray?logo=telegram)](https://t.me/webbprotocol) [![Discord](https://img.shields.io/discord/833784453251596298.svg?style=flat-square\u0026label=Discord\u0026logo=discord)](https://discord.gg/cv8EfJu3Tn)\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003ch2 id=\"table-of-contents\"\u003e 📖 Table of Contents\u003c/h2\u003e\n\n\u003cdetails open=\"open\"\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003cul\u003e\n    \u003cli\u003e\u003ca href=\"#start\"\u003e Getting Started\u003c/a\u003e\u003c/li\u003e\n    \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#prerequisites\"\u003ePrerequisites\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#installation-\"\u003eInstallation\u003c/a\u003e\u003c/li\u003e\n    \u003c/ul\u003e\n    \u003cli\u003e\u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\u003c/li\u003e\n    \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#substrate-integration\"\u003eIntegration into Substrate\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#external-networking\"\u003eExternal Networking\u003c/a\u003e\u003c/li\u003e\n    \u003c/ul\u003e\n    \u003cli\u003e\u003ca href=\"#test\"\u003eTesting\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contribute\"\u003eContributing\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n  \u003c/ul\u003e  \n\u003c/details\u003e\n\n\u003ch1 id=\"start\"\u003e Getting Started  🎉 \u003c/h1\u003e\n\n**This repo is research-oriented software and should not be considered SAFE to use in production. It has not been audited and/or tested rigorously yet. Please use caution.**\n\nThis is an implementation of the threshold ECDSA signature multi-party-computation from [UC Non-Interactive, Proactive, Threshold ECDSA with Identifiable Aborts](https://eprint.iacr.org/2021/060) with slight modifications. We implement this MPC using the key generation protocol originally from [GG20](https://eprint.iacr.org/2020/540) and implemented by [Zengo](https://github.com/ZenGo-X) in [multi-party-ecdsa](https://github.com/ZenGo-X/multi-party-ecdsa).\n\nFor the key refresh protocol we opt for a fork of Zengo's [fs-dkr](https://github.com/webb-tools/fs-dkr) maintained by us. Together, these complete the key generation and key refreshing protocol. From here, we implement the pre-signing and signing protocols outlined in the aforementioned CGGMP paper. This implementation leverages the infrastructure built by Zengo, namely [round-based-protocol](https://github.com/ZenGo-X/round-based-protocol). We detail how this can be used in a blockchain's gossip network environment such as Substrate, as that motivates this work.\n\nParticularly, we have implemented the **4-round $O(n^2)$ identifiable abort** version of CGGMP. The **remaining work to be done is testing** our implementation, particularly the `presign` and `sign`. \n\nImplementation checklist\n- [x] Key generation [multi-party-ecdsa](https://github.com/ZenGo-X/multi-party-ecdsa).\n- [x] Key generation tests\n- [x] Key refresh [fs-dkr](https://github.com/webb-tools/fs-dkr)\n- [x] Key refresh tests\n- [x] Adding Ring Pedersen parameters to `fs-dkr`.\n- [x] Implementing all ZKPs for **4-round $O(n^2)$ identifiable abort**\n- [ ] Implementing **4-round $O(n^2)$ identifiable abort** `presign` and `sign`.\n  - [ ] Properly zeroizing the `PresignOutput` [link to code](https://github.com/webb-tools/cggmp-threshold-ecdsa/blob/main/src/presign/mod.rs#L66).\n  - [ ] Properly implement identifiable abort proof 2c) in both `presign` and `sign` [link to presign code](https://github.com/webb-tools/cggmp-threshold-ecdsa/blob/main/src/presign/rounds.rs#L939) [link to sign code](https://github.com/webb-tools/cggmp-threshold-ecdsa/blob/main/src/sign/rounds.rs#L318).\n- [ ] Testing **4-round $O(n^2)$ identifiable abort** `presign` and `sign`.\n- [ ] Implementing all ZKPs for **7-round $O(n)$ identifiable abort**\n  - [ ] `aff-p`\n  - [ ] `enc-elg`\n  - [ ] `aff-p`\n  - [ ] `elog`\n  - [ ] `Nth`\n  - [ ] `log`\n- [ ] Implementing **7-round $O(n)$ identifiable abort** `presign` and `sign`.\n  - [ ] Entire protocol unimplemented (refer to CGGMP paper for details + taurus-group implementation)[taurus group code](https://github.com/taurusgroup/multi-party-sig/tree/main/protocols/cmp).\n- [ ] Testing **7-round $O(n)$ identifiable abort** `presign` and `sign`.\n\n## Prerequisites\n\nThis guide uses \u003chttps://rustup.rs\u003e installer and the `rustup` tool to manage the Rust toolchain.\n\nFirst install and configure `rustup`:\n\n```bash\n# Install\ncurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n# Configure\nsource ~/.cargo/env\n```\n\nConfigure the Rust toolchain to default to the latest stable and nightly versions:\n\n```bash\nrustup update\nrustup update nightly\n```\n\nGreat! Now your Rust environment is ready! 🚀🚀\n\n## Installation 💻\n\nOnce the development environment is set up, build the repo. This command will build the MPC protocol:\n```bash\ncargo build --release\n```\n\n\u003e NOTE: You _do not need_ to use the release builds! Debug builds can work here as well.\n\n\u003ch1 id=\"usage\"\u003e Usage \u003c/h1\u003e\n\n\u003ch2 style=\"border-bottom:none\"\u003e Quick Start ⚡ \u003c/h2\u003e\n\nCheck out the tests for examples on how to utilise the library!\n\n\u003ch3 id=\"substrate-integration\"\u003e Integration into Substrate \u003c/h3\u003e\n\nA main motivation for Webb is integrating this protocol into a blockchain environment such as Substrate. Our intention is to leverage both a blockchain's proof of stake / proof of authority selection mechanism as well as the underlying system's gossip network to bootstrap and execute this multi-party computation offchain. Throughout the lifecycle of the protocol, the participating MPC authorities will post data on-chain to keep the system in sync, such as to select the participating authorities, to govern the thresholds `t` and `n` and more.\n\nAn example of how this is possible using the same primitives provided in this repo can be found in our [dkg-substrate](https://github.com/webb-tools/dkg-substrate) repo. Currently the GG20 protocol is being executed. There are wrappers in place for executing any protocol using the [round-based-protocol](https://github.com/ZenGo-X/round-based-protocol) architecture. Slight modifications might be necessary and we aim to have this repo integrated into Substrate once it is working and tested here.\n\n\u003ch3 id=\"external-networking\"\u003e External Networking \u003c/h3\u003e\n\nNot included in this library is a server-oriented execution protocol. There are examples of how this can be done using GG20 in [multi-party-ecdas](https://github.com/ZenGo-X/multi-party-ecdsa/tree/master/examples). We welcome contributions to add a similar example here, but at the moment it will not be prioritized.\n\nThere are a variety of other external networking options one can choose between such as point-to-point channels, gossip networks, and or gRPC server coordinators. Each has different trade-offs. Point-to-point channels and gRPC server coordination allow one to run this protocol in the most simple manner, since the network topology is effectively decided on startup. In a gossip network environment this isn't always the case, therefore gossiping and re-gossiping messages using a method such as [gossipsub](https://github.com/libp2p/specs/blob/master/pubsub/gossipsub/gossipsub-v1.1.md) from [libp2p](https://libp2p.io/) is recommended.\n\n\u003ch2 id=\"test\"\u003e Testing 🧪 \u003c/h2\u003e\n\nThe following instructions outlines how to run dkg-substrate's base test suite and E2E test suite.\n\n### To run base tests\n\n```\ncargo test\n```\n\n\u003ch2 id=\"contribute\"\u003e Contributing \u003c/h2\u003e\n\nInterested in contributing to the Webb's MPC research? Thank you so much for your interest! We are always appreciative for contributions from the open-source community!\n\nIf you have a contribution in mind, please check out our [Contribution Guide](./.github/CONTRIBUTING.md) for information on how to do so. We are excited for your first contribution!\n\n\u003ch2 id=\"license\"\u003e License \u003c/h2\u003e\n\nLicensed under \u003ca href=\"LICENSE\"\u003eGNU General Public License v3.0\u003c/a\u003e.\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the GNU General Public License v3.0 license, shall be licensed as above, without any additional terms or conditions.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftangle-network%2Fcggmp-threshold-ecdsa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftangle-network%2Fcggmp-threshold-ecdsa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftangle-network%2Fcggmp-threshold-ecdsa/lists"}