Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ZenGo-X/gotham-city

Gotham city is a fully functional project to demonstrate real-life example of minimalist Bitcoin decentralized HD wallet using 2 party ECDSA
https://github.com/ZenGo-X/gotham-city

bitcoin cryptocurrency cryptography ecdsa rust wallet

Last synced: 4 days ago
JSON representation

Gotham city is a fully functional project to demonstrate real-life example of minimalist Bitcoin decentralized HD wallet using 2 party ECDSA

Awesome Lists containing this project

README

        

[![Build Status](https://travis-ci.org/KZen-networks/gotham-city.svg?branch=master)](https://travis-ci.org/KZen-networks/gotham-city)

Gotham City
=====================================
Gotham city is a fully functional client/server application for issuing two party ECDSA signatures.

-------
### Server
Gotham **server** is an ECDSA agnostic signing machine.
List of supported Curve(s):

* secp256k1

### Client
You can see a full fledged example of a client which connects to gotham server under: [integration-tests/test_ecdsa_key_signing](https://github.com/ZenGo-X/gotham-city/blob/master/integration-tests/tests/ecdsa.rs#L109)

[//]: # (List of supported Coin(s):)

[//]: # ()
[//]: # ( * BTC)

[//]: # ()
[//]: # (**Extending the client to support more coin(s) is easy as long as the Elliptic Curve and signing scheme of the new blockchain are supported. In the case a blockchain is using secp256k1 together with ECDSA, the same keygen and signing code can be reused.**)

[//]: # ()
[//]: # (| ![Demo](misc/demo.gif) |)

[//]: # (|-----------------------------|)

[//]: # (Elements)

[//]: # (-------)

[//]: # ()
[//]: # (| | Gotham Server | Gotham Client |)

[//]: # (| -------------------------------------------- | -------------------------------------------- |--------------------------------------------)

[//]: # (| Description | RESTful web service exposing APIs for two party ECDSA key generation and signing | Bitcoin minimalist decentralized wallet CLI app |)

[//]: # (| Instructions | [View](gotham-server/README.md) | [View](gotham-client/README.md) |)

Project Description
-------

### Design Overview

#### ECDSA Keygen and Signing
![ECDSA](misc/ecdsa-illustration.png)
* For details on Threshold Signatures see [Threshold Signatures: The Future of Private Keys](https://medium.com/kzen-networks/threshold-signatures-private-key-the-next-generation-f27b30793b)

#### Cryptographic libraries
* [secp256k1](https://github.com/rust-bitcoin/rust-secp256k1/): Rust language bindings for Bitcoin secp256k1 library.
* [two-party-ecdsa](https://github.com/ZenGo-X/two-party-ecdsa): Rust implelemtation of Lindell's Crypto17 paper: [Fast Secure Two-Party ECDSA Signing](https://eprint.iacr.org/2017/552)

[//]: # (### White paper overview)

[//]: # (#### Abstract)

[//]: # (We demonstrate a Bitcoin wallet that utilizes two party ECDSA (2P-ECDSA).)

[//]: # (Our architecture relies on a simple client-server communication)

[//]: # (model. We show support for 2 party deterministic child derivation)

[//]: # ((2P-HD), secret share rotation and verifiable recovery. We discuss the)

[//]: # (opportunities and challenges of using a multi-party wallet.)

[//]: # ()
[//]: # (#### Background)

[//]: # (For end-users, cryptocurrencies and blockchain-based assets are hard to store and manage.)

[//]: # (One of the reasons is the tradeoff between security and availability.)

[//]: # (Storing private keys safely requires dedicated hardware or extreme security measures which make using the coins)

[//]: # (on a daily basis difficult. Threshold cryptography provides ways to distribute the private key and digital signing.)

[//]: # (This can potentially benefit security but at the same time reveal new challenges such as availability, ownership and recovery.)

[//]: # (Bitcoin is utilizing ECDSA as the signing scheme. There is an active line of research for practical and efficient multi-party ECDSA schemes.)

**For more information, see our [white paper](white-paper/white-paper.pdf)**.

# Benchmarks
In a local networking setup, with a MacBook Air M2, 8GB RAM and macOS 13.5:
* `cargo bench --bench keygen_bench` reports **762ms**
* `cargo bench --bench sign_bench` reports **151ms**

[//]: # (### Comperative Performance)

[//]: # (The comparison was done on an Intel i9-8950HK (2.9GHz) using localhost for server (no real network). The numbers are mean for 20 runs of 2P-ECDSA KeyGen and 50 runs for 2P-ECDSA Signing. Standard deviation is inconsistent but for both implementations it is order of magnitude smaller than mean value.)

[//]: # ()
[//]: # (| Implementation | Gotham city (this repo) | [Unbound](https://github.com/unbound-tech/blockchain-crypto-mpc) | )

[//]: # (|-------------------------------|------------------------|------------------------|)

[//]: # (| 2P-ECDSA KeyGen | 1.05 s | **0.813** s |)

[//]: # (| 2P-ECDSA Signing | **0.153** s | 0.206 s |)

Disclaimer
-------
### **USE AT YOUR OWN RISK, we are not responsible for software/hardware and/or any transactional issues that may occur while using Gotham city.The project is currently work in progress.**

License
-------
See [LICENSE](LICENSE) for more information.

Contact
-------
For any questions, feel free to [email us](mailto:[email protected]) or join ZenGo X [Telegram](https://t.me/joinchat/ET1mddGXRoyCxZ-7).