#contributors #randomness #participant #untrusted #consensus #generate #bias-resistant

app commonware-vrf

Generate bias-resistant randomness with untrusted contributors using commonware-cryptography and commonware-p2p

11 releases

new 0.0.12 Nov 5, 2024
0.0.11 Oct 31, 2024
0.0.8 Sep 24, 2024
0.0.5 Aug 31, 2024

#761 in Magic Beans

Download history 177/week @ 2024-08-24 332/week @ 2024-08-31 8/week @ 2024-09-07 466/week @ 2024-09-21 45/week @ 2024-09-28 193/week @ 2024-10-05 184/week @ 2024-10-12 3/week @ 2024-10-19 115/week @ 2024-10-26 171/week @ 2024-11-02

533 downloads per month

MIT/Apache

585KB
12K SLoC

commonware-vrf

Crates.io

Generate bias-resistant randomness with untrusted contributors using commonware-cryptography and commonware-p2p.

Usage (3 of 4 Threshold)

Arbiter

cargo run --release -- --me 0@3000 --participants 0,1,2,3,4 --contributors 1,2,3,4

Contributor 1

cargo run --release -- --bootstrappers 0@127.0.0.1:3000 --me 1@3001 --participants 0,1,2,3,4  --arbiter 0 --contributors 1,2,3,4

Contributor 2

cargo run --release -- --bootstrappers 0@127.0.0.1:3000 --me 2@3002 --participants 0,1,2,3,4  --arbiter 0 --contributors 1,2,3,4

Contributor 3

cargo run --release -- --bootstrappers 0@127.0.0.1:3000 --me 3@3003 --participants 0,1,2,3,4  --arbiter 0 --contributors 1,2,3,4

Contributor 4 (Rogue)

Send invalid shares to other contributors.

cargo run --release -- --rogue --bootstrappers 0@127.0.0.1:3000 --me 4@3004 --participants 0,1,2,3,4 --arbiter 0 --contributors 1,2,3,4 

Contributor 4 (Lazy)

Only share t-1 shares. Post one share to arbiter to ensure commitment isn't dropped.

cargo run --release -- --lazy --bootstrappers 0@127.0.0.1:3000 --me 4@3004 --participants 0,1,2,3,4 --arbiter 0 --contributors 1,2,3,4 

Contributor 4 (Lazy + Defiant)

Only share t-1 shares. Don't post any requested shares to arbiter (commitment will be dropped).

cargo run --release -- --lazy --defiant --bootstrappers 0@127.0.0.1:3000 --me 4@3004 --participants 0,1,2,3,4 --arbiter 0 --contributors 1,2,3,4 

Dependencies

~20–31MB
~556K SLoC