Go to file
Conrado Gouvea 1233f89778
add tracing logging to the server (#149)
2024-02-22 13:39:03 +00:00
.github Phase 1 cleanup (#138) 2024-02-09 17:29:26 +00:00
coordinator Phase 1: also send randomizer (#140) 2024-02-21 14:20:11 +00:00
dkg Bump eyre from 0.6.11 to 0.6.12 (#137) 2024-02-02 16:58:04 -03:00
participant Phase 1: also send randomizer (#140) 2024-02-21 14:20:11 +00:00
server add tracing logging to the server (#149) 2024-02-22 13:39:03 +00:00
tests Phase 1 cleanup (#138) 2024-02-09 17:29:26 +00:00
trusted-dealer Bump clap from 4.4.18 to 4.5.0 (#145) 2024-02-09 16:31:31 -03:00
.gitignore Add Participant project (#15) 2023-06-15 13:23:37 -03:00
Cargo.lock add tracing logging to the server (#149) 2024-02-22 13:39:03 +00:00
Cargo.toml Phase 2: add Server (#124) 2024-02-12 09:33:15 +00:00
DEVELOPER.md Phase 1: document how to run (#141) 2024-02-16 09:43:09 +00:00
LICENSE-APACHE Print group public key (#283) 2023-04-17 11:01:27 +01:00
LICENSE-MIT Validate inputs (#283) 2023-04-11 13:56:23 +01:00
Makefile.toml Improve consistency of testing across projects (#76) 2023-09-27 13:27:01 -03:00
README.md Phase 1: document how to run (#141) 2024-02-16 09:43:09 +00:00
codecov.yml Add config for CI pipeline and code coverage 2023-04-25 13:30:31 +01:00
rust-toolchain.toml Phase 1 cleanup (#138) 2024-02-09 17:29:26 +00:00

README.md

Zcash Foundation FROST Demos

This repository contains a set of command line demos that uses the ZF FROST libraries and reference implementation. Their purpose is to:

  1. identify gaps in our documentation
  2. provide usage examples for developer facing documentation
  3. provide reference implementations for developers wanting to use FROST in a “real world” scenario.

The demos use the Ed25519 ciphersuite by default, but they can also use the RedPallas ciphersuite which is compatible with Zcash.

About FROST (Flexible Round-Optimised Schnorr Threshold signatures)

Unlike signatures in a single-party setting, threshold signatures require cooperation among a threshold number of signers, each holding a share of a common private key. The security of threshold schemes in general assume that an adversary can corrupt strictly fewer than a threshold number of participants.

Two-Round Threshold Schnorr Signatures with FROST presents a variant of a Flexible Round-Optimized Schnorr Threshold (FROST) signature scheme originally defined in FROST20. FROST reduces network overhead during threshold signing operations while employing a novel technique to protect against forgery attacks applicable to prior Schnorr-based threshold signature constructions. This variant of FROST requires two rounds to compute a signature, and implements signing efficiency improvements described by Schnorr21. Single-round signing with FROST is not implemented here.

Projects

This repo contains 4 projects:

  1. Trusted Dealer
  2. DKG
  3. Coordinator
  4. Participant

Status ⚠

Trusted Dealer demo - WIP DKG demo - WIP Coordinator demo - WIP Participant demo - WIP

Usage

NOTE: This is for demo purposes only and should not be used in production.

You will need to have Rust and Cargo installed.

To run:

  1. Clone the repo. Run git clone https://github.com/ZcashFoundation/frost-zcash-demo.git
  2. Run cargo install

and in separate terminals: 3. Run cargo run --bin trusted-dealer or cargo run --bin dkg 4. Run cargo run --bin coordinator 5. Run cargo run --bin participants. Do this in separate terminals for separate participants.

The demos support two communication mechanisms. By using the --cli flag, they will print JSON objects to the terminal, and participants will need to copy & paste objects and send them amongst themselves to complete the protocol.

Without the --cli flag, the demos will use socket communications. The coordinator will act as the server and the participants will be clients. See example below.

Socket communication example

Create 3 key shares with threshold 2 using trusted dealer:

cargo run --bin trusted-dealer -- -t 2 -n 3

The key packages will be written to files. Securely send the partipant's key packages to them (or just proceed if you are running everything locally for testing).

Start a signing run as the coordinator:

cargo run --bin coordinator -- -i 0.0.0.0 -p 2744 -n 2 -m message.raw -s sig.raw

This will start a server listening for connections to any IP using port 2744. (These are the default values so feel free to omit them.) The protocol will run with 2 participants, signing the message inside message.raw (replace as appropriate). The signature will be written to sig.raw. The program will keep running while it waits for the participants to connect to it.

Each participant should then run (or run in different terminals if you're testing locally):

cargo run --bin participant -- -i 127.0.0.1 -p 2744 -k key-package-1.json

It will connect to the Coordinator using the given IP and port (replace as needed), using the specified key package (again replace as needed).

Once two participants are running, the Coordinator should complete the protocol and write the signature to specified file.

Curve selection

Currently the demo supports curve Ed25519 and RedPallas. To use RedPallas, pass --feature redpallas to all commands. When it's enabled, it will automatically switch to Rerandomized FROST and it can be used to sign Zcash transactions.