|
| 1 | +# Multi-party ECDSA |
| 2 | + |
1 | 3 | [](https://travis-ci.com/KZen-networks/multi-party-ecdsa)
|
2 | 4 | [](https://www.gnu.org/licenses/gpl-3.0)
|
3 | 5 |
|
4 |
| -Multi-party ECDSA |
5 |
| -===================================== |
6 |
| - |
7 | 6 | This project is a Rust implementation of {t,n}-threshold ECDSA (elliptic curve digital signature algorithm).
|
8 | 7 |
|
9 | 8 | Threshold ECDSA includes two protocols:
|
10 | 9 |
|
11 |
| -* Key Generation for creating secret shares. |
12 |
| -* Signing for using the secret shares to generate a signature. |
| 10 | +- Key Generation for creating secret shares. |
| 11 | +- Signing for using the secret shares to generate a signature. |
13 | 12 |
|
14 |
| -ECDSA is used extensively for crypto-currencies such as Bitcoin, Ethereum (secp256k1 curve), NEO (NIST P-256 curve) and much more. |
| 13 | +ECDSA is used extensively for crypto-currencies such as Bitcoin, Ethereum (secp256k1 curve), NEO (NIST P-256 curve) and much more. |
15 | 14 | This library can be used to create MultiSig and ThresholdSig crypto wallet.
|
16 | 15 |
|
17 |
| -Project Status |
18 |
| -------- |
19 |
| -* The library supports **2P-ECDSA** based on Lindell's crypto 2017 paper [1]. Project [Gotham-city](https://github.com/KZen-networks/gotham-city) is a proof of concept for a full two-party Bitcoin wallet that uses this library. See benchmarks and white paper there. |
| 16 | +## Project Status |
20 | 17 |
|
21 |
| -* The library supports Gennaro and Goldfeder CCS 2018 protocol [2] for **{t,n}-threshold ECDSA**. |
| 18 | +- The library supports **2P-ECDSA** based on Lindell's crypto 2017 paper [1]. Project [Gotham-city](https://github.com/KZen-networks/gotham-city) is a proof of concept for a full two-party Bitcoin wallet that uses this library. See benchmarks and white paper there. |
22 | 19 |
|
23 |
| -* The library supports **2P-ECDSA** based on Castagnos et. al. crypto 2019 paper [3]. To Enable build with `--features=cclst`. |
| 20 | +- The library supports Gennaro and Goldfeder CCS 2018 protocol [2] for **{t,n}-threshold ECDSA**. |
24 | 21 |
|
25 |
| -Run Demo |
26 |
| -------- |
27 |
| -The following steps are for setup, key generation with `n` parties and signing with `t+1` parties. |
| 22 | +- The library supports **2P-ECDSA** based on Castagnos et. al. crypto 2019 paper [3]. To Enable build with `--features=cclst`. |
28 | 23 |
|
29 |
| -**Setup** |
30 |
| -1) We use shared state machine architecture (see [white city](https://github.com/KZen-networks/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. |
31 |
| -2) Install [Rust](https://www.rust-lang.org/en-US/install.html),[Nightly Rust](https://doc.rust-lang.org/1.5.0/book/nightly-rust.html). Run `cargo build --release --examples` ( it will build into `/target/release/examples`) |
32 |
| -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. |
| 24 | +## Run Demo |
33 | 25 |
|
34 |
| -**KeyGen** |
| 26 | +The following steps are for setup, key generation with `n` parties and signing with `t+1` parties. |
35 | 27 |
|
36 |
| -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. |
| 28 | +### Setup |
37 | 29 |
|
38 |
| -**Sign** |
| 30 | +1. We use shared state machine architecture (see [white city](https://github.com/KZen-networks/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. |
39 | 31 |
|
40 |
| -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). |
| 32 | +2. Install [Rust](https://rustup.rs/). Run `cargo build --release --examples` (it will build into `/target/release/examples/`) |
41 | 33 |
|
42 |
| -**Full demo** |
| 34 | +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. |
43 | 35 |
|
44 |
| -Run `./run.sh` (located in `/demo` folder) in the same folder as the excutables (usually `/target/release/examples`). It will spawn a shared state machine, clients in the number of parties and signing requests for the `threshold + 1` first parties. |
| 36 | +### KeyGen |
| 37 | + |
| 38 | +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. |
| 39 | + |
| 40 | +### Sign |
45 | 41 |
|
| 42 | +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). |
46 | 43 |
|
| 44 | +### Full demo |
47 | 45 |
|
48 |
| -|| |
49 |
| -|:--:| |
50 |
| -| *A 5 parties setup with 3 signers (threshold = 2)* | |
| 46 | +Run `./run.sh` (located in `/demo` folder) in the same folder as the excutables (usually `/target/release/examples`). It will spawn a shared state machine, clients in the number of parties and signing requests for the `threshold + 1` first parties. |
| 47 | + |
| 48 | +| !["Multiparty ECDSA Demo"][demo] | |
| 49 | +| :------------------------------------------------: | |
| 50 | +| _A 5 parties setup with 3 signers (threshold = 2)_ | |
| 51 | + |
| 52 | +[demo]: https://raw.githubusercontent.com/KZen-networks/multi-party-ecdsa/master/demo/MP-ECDSA%20demo.gif |
51 | 53 |
|
| 54 | +## Contributions & Development Process |
52 | 55 |
|
53 |
| -Contributions & Development Process |
54 |
| -------------------- |
55 | 56 | The contribution workflow is described in [CONTRIBUTING.md](CONTRIBUTING.md), in addition **the [Rust utilities wiki](https://github.com/KZen-networks/rust-utils/wiki) contains information on workflow and environment set-up**.
|
56 | 57 |
|
57 |
| -License |
58 |
| -------- |
| 58 | +## License |
| 59 | + |
59 | 60 | Multi-party ECDSA is released under the terms of the GPL-3.0 license. See [LICENSE](LICENSE) for more information.
|
60 | 61 |
|
61 |
| -Contact |
62 |
| -------------------- |
63 |
| -Feel free to [reach out](mailto: [email protected]) or join the KZen Research [Telegram]( https://t.me/kzen_research) for discussions on code and research. |
| 62 | +## Contact |
| 63 | + |
| 64 | +Feel free to [reach out](mailto: [email protected]) or join the KZen Research [Telegram](https://t.me/kzen_research) for discussions on code and research. |
64 | 65 |
|
65 |
| -References |
66 |
| -------------------- |
| 66 | +## References |
67 | 67 |
|
68 |
| -[1] https://eprint.iacr.org/2017/552.pdf |
| 68 | +[1] <https://eprint.iacr.org/2017/552.pdf> |
69 | 69 |
|
70 |
| -[2] https://eprint.iacr.org/2019/114.pdf |
| 70 | +[2] <https://eprint.iacr.org/2019/114.pdf> |
71 | 71 |
|
72 |
| -[3] https://eprint.iacr.org/2019/503.pdf |
| 72 | +[3] <https://eprint.iacr.org/2019/503.pdf> |
0 commit comments