Coder Social home page Coder Social logo

coblox / multi-party-ecdsa Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zengo-x/multi-party-ecdsa

0.0 3.0 0.0 603 KB

Rust implementation of {t,n}-threshold ECDSA (elliptic curve digital signature algorithm).

License: GNU General Public License v3.0

Rust 99.84% Shell 0.16%

multi-party-ecdsa's Introduction

Build Status License: GPL v3

Multi-party ECDSA

This project is a Rust implementation of {t,n}-threshold ECDSA (elliptic curve digital signature algorithm).

Threshold ECDSA includes two protocols:

  • Key Generation for creating secret shares.
  • Signing for using the secret shares to generate a signature.

ECDSA is used extensively for crypto-currencies such as Bitcoin, Ethereum (secp256k1 curve), NEO (NIST P-256 curve) and much more. This library can be used to create MultiSig and ThresholdSig crypto wallet.

Project Status

  • The library supports 2p-ecdsa based on Lindell's crypto 2017 paper [1]. Project Gotham-city is a proof of concept for a full two-party Bitcoin wallet that uses this library. See benchmarks and white paper there.

  • The library supports Gennaro and Goldfeder CCS 2018 protocol [2] for {t,n}-threshold ECDSA.

Run

The following steps are for setup, key generation with n parties and signing with t+1 parties.

Setup

  1. We use shared state machine architecture (see white city). The parameters parties and threshold can be configured by changing the file: param. a keygen will run with parties parties and signing will run with any subset of threshold + 1 parties. param file should be located in the same path of the client softwares.
  2. Install Rust,Nightly Rust. Run cargo build --release ( it will build into /target/release)
  3. Run the shared state machine: ./sm_manager. Currently configured to be in 127.0.0.1:8001, this can be changed in Rocket.toml file. The Rocket.toml file should be in the same folder you run sm_manager from.

KeyGen

run gg18_keygen_client as follows: ./gg18_keygen_client http://127.0.0.1:8001 keys.store. Replace IP and port with the ones configured in setup. Once n parties join the application will run till finish. At the end each party will get a local keys file keys.store (change filename in command line). This contain secret and public data of the party after keygen. The file therefore should remain private.

Sign

Run ./gg18_sign_client. The application should be in the same folder as the keys.store file (or custom filename generated in keygen). the application takes three arguments: IP:port as in keygen, filename and message to be signed: ./gg18_sign_client http://127.0.0.1:8001 keys.store "KZen Networks". The same message should be used by all signers. Once t+1 parties join the protocol will run and will output to screen signatue (R,s).

Full demo

Run ./run.sh (located in /demo folder) in the same folder as the excutables (usually /target/release). It will spawn a shared state machine, clients in the number of parties and signing requests for the threshold + 1 first parties.

Demo
A 5 parties setup with 3 signers (threshold = 2)

Contributions & Development Process

The contribution workflow is described in CONTRIBUTING.md, in addition the Rust utilities wiki contains information on workflow and environment set-up.

License

Multi-party ECDSA is released under the terms of the GPL-3.0 license. See LICENSE for more information.

Contact

Feel free to reach out or join the KZen Research Telegram for discussions on code and research.

References

[1] https://eprint.iacr.org/2017/552.pdf

[2] https://eprint.iacr.org/2019/114.pdf

multi-party-ecdsa's People

Contributors

gbenattar avatar k1rill-fedoseev avatar llfourn avatar oleiba avatar omershlo avatar romanz avatar talbeerysec avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.