This implementation follows the GG20 protocol for threshold ECDSA signatures, allowing a group of participants to collectively sign Ethereum transactions without any single party having access to the private key.
The system consists of two main components:
- A central server that coordinates the signing ceremony and assembles the final signature
- Multiple client devices that participate in the distributed key generation (DKG) and signing process
This implementation follows the GG20 protocol (Gennaro & Goldfeder 2020) which provides:
- Threshold ECDSA signatures without trusted dealers
- Security against malicious adversaries
- No single party ever has access to the private key
- Efficient signing with minimal rounds of communication
Build and run the server:
docker build -t gg20-server -f server/Dockerfile .
docker run -p 5010:5010 gg20-server
Build and run the client:
docker build -t gg20-client -f client/Dockerfile .
docker run --network host gg20-client --test-ceremony --num-devices 3
The server acts as the coordinator and final assembler:
-
DKG Phase
- Initiates the DKG ceremony
- Provides the target EOA address to sign for
- Collects shares and commitments from all participants
- Validates the DKG process
-
Signing Phase
- Initiates signing ceremony with a specific transaction
- Collects commitments from all participants
- Manages the MtA (Multiplicative-to-Additive) protocol
- Combines partial signatures to create the final ECDSA signature
- Assembles and outputs the final Ethereum transaction
-
Transaction Management
- Stores transaction templates
- Handles proper formatting of transaction fields
- Outputs the final signed transaction in both JSON and hex formats
Each client represents a participant in the threshold signature scheme:
-
DKG Participation
- Generates polynomial coefficients
- Creates and distributes shares
- Stores key material per EOA
- Validates received shares
-
Signing Participation
- Generates partial signatures
- Participates in MtA protocol
- Never has access to complete private key
- Maintains separation of signing material
-
DKG Initialization
Server → Clients: Start DKG with target EOA Clients → Server: Submit shares and commitments -
Signing Ceremony
Server → Clients: Start signing with transaction details Clients → Server: Submit signing commitments Clients ↔ Clients: MtA protocol (via server) Server: Combines shares and generates final signature -
Final Transaction
Server: Assembles complete transaction Server: Outputs broadcastable transaction hex
| Component | What it has | What it doesn't have | Why it's secure |
|---|---|---|---|
| Server | - Final signature (r,s,v) - Transaction details - Combined public key |
- Private key shares - Individual k values - Gamma values |
- Only combines final values - Never sees raw shares - Cannot derive private key from signature |
| Client 1 | - Own private key share - Own k_i value - Own gamma_i value |
- Other clients' shares - Combined private key - Final k value |
- Polynomial sharing prevents reconstruction - MtA protocol hides intermediate values |
| Client 2 | - Own private key share - Own k_i value - Own gamma_i value |
- Other clients' shares - Combined private key - Final k value |
- Same as Client 1 |
| Client n | - Own private key share - Own k_i value - Own gamma_i value |
- Other clients' shares - Combined private key - Final k value |
- Same as Client 1 |
| Attack Vector | Protection Mechanism | Security Guarantee |
|---|---|---|
| Server Compromise | - No private key material stored - Only handles public values |
Even if compromised, attacker cannot generate new signatures |
| Single Client Compromise | - Threshold cryptography - Share distribution |
Compromised client cannot reconstruct key or generate signatures |
| Network Sniffing | - MtA protocol - Secure channels |
Intercepted communications don't reveal key material |
| Replay Attacks | - Per-transaction k values - Unique gamma values |
Each signature uses fresh randomness |
| Rogue Key Attack | - Commitment scheme - Share verification |
Clients cannot manipulate key generation |
-
Share Distribution
- Each client only has its own share
- Minimum t+1 shares needed for reconstruction
- Shares are refreshed per signing session
-
Signing Process Security
Client i: - Has: k_i, γ_i, share_i - Cannot derive: k, γ, private_key -
MtA Protocol Security
- Prevents learning of intermediate values
- Ensures multiplicative relationship
- Preserves share secrecy
-
Transaction Signing
k = Σ k_i mod n (no party knows full k) γ = Σ γ_i mod n (no party knows full γ) s = k^(-1)(m + rγ) (computed distributively) -
Key Reconstruction Prevention
- No party ever sees complete private key
- Each share is necessary but insufficient
- Polynomial degree prevents collusion
-
Network
- Secure communication channels
- Authenticated connections
- Synchronous communication
-
Adversary Model
- Malicious adversary
- Cannot control t+1 parties
- Computationally bounded
-
Cryptographic
- DDH assumption in secp256k1
- Random Oracle Model
- Discrete Log hardness
--port: Port to run server on (default: 5010)--host: Host address to bind to (default: 0.0.0.0)
--checkin: Check in with server--list-keys: List stored EOAs and their key material--show-device: Show device information and configuration--test-ceremony: Run a test signing ceremony--num-devices NUM_DEVICES: Number of test devices to simulate in ceremony-h, --help: Show help message and exit
The client supports multiple modes of operation:
- Device management (checkin, show info)
- Key management (list stored keys)
- Testing (run ceremony with simulated devices)
