Git Product home page Git Product logo

mpc-ecdsa-js's Introduction

MPC ECDSA in Web Browser

This is a demonstration of ECDSA distributed key generation and signing protocols in a secure multi-party computation (MPC) setting. All computations are done only by browser Javascript. This is inspired by Fast Secure Multiparty ECDSA with Practical Distributed Key Generation and Applications to Cryptocurrency Custody, Y. Lindell et al, 2018. eprint, CCS'18, but in a more relaxed security.

MPC Setting

Secret Sharing

In this demo, Shamir Secret Sharing(SSS) is used for parties to have shares without revealing secret information, such as secret key of EC, nonce k in signing protocol. A prime field is used for polinomial computations. This is a k-out-of-n protocol for any n and k satisfy 2k - 1 <= n, where n is the total number of parties, and k is the minimum number of parties required to reconstruct secrets.

Security

This setting assumes Semi-Honest security model where all parties are expected to follow the protocols, but some of corrupted parties may cooperate to reveal secret information. Therefore, it should not be used for real applications. If you need a Malicious model, please check the original paper.

Demo

Instructions

  • Go to demo page for party1, and open developer console to run Javascript code.
  • Open party2, and party3 in different tabs. Now you open 3 tabs.
  • Run demos.ecdsa.party() on each party's console.
  • PublicKey, Message, Signature will show up in the outputs.
    • Public Key ... EC public key generated by MPC KeyGen protocol.
    • Message ... Message of the signature.
    • Signature ... ECDSA signature generated by MPC Sign protocol.
  • Verify the signatrue using openssl.
    • Run openssl dgst -sha256 -verify {pubkey file} -signature {signature file} message.txt
    • You will see Verified OK!

Notes

Protocols

MPC ECDSA key generation / signing protocols consits of sub MPC protocols.

See this page for more details.

Development

Setup

yarn install

Test

yarn run test

Serve

yarn serve

This command runs a local http server, and builds asserts if there are changes on the code. Open http://localhost:9000/demo.html for demos.

Build

yarn run build

This command generates assets under dist dir.

LICENSE

MIT License

Acknowledgment

This work is supported by Prof. Fujisaki at JAIST.

mpc-ecdsa-js's People

Contributors

jwata avatar dependabot[bot] 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.