sl-mpc-vrf
Threshold multiparty VRF (verifiable random function) protocols on Ristretto, following the Coinbase MPC VRF specification.
This crate provides the shared wire-level protocol logic for VRF distributed key generation (DKG) and VRF evaluation. Host libraries (for example multi-party-schnorr and DKLS23) wrap the round Context types in their own session APIs.
Protocols
| Module | Role |
|---|---|
dkg |
Shamir threshold DKG on Ristretto (Protocol 12). Produces a VrfKeyshare and per-party additive public shares. |
eval |
Three-round MPC VRF evaluation. Consumes a quorum of VRF keyshares and an input message; returns VrfOutput. |
dh_tuple |
Discrete-log tuple proofs used during evaluation. |
crypto |
Shared hashing, session-id derivation, and message validation helpers. |
Dependencies
sl-mpc-derive(0.1.0,vrffeature) — Ristretto VRF curve types, hash-to-curve, Lagrange helpers, and output sizing.sl-mpc-mate— Shamir polynomial arithmetic for DKG.
Features
| Feature | Description |
|---|---|
serde |
Serialize / Deserialize for protocol messages and keyshares where applicable. |
Usage sketch
VRF DKG is a two-round protocol after PKI setup:
use ;
// Build a per-party Context and run round 0 → round 1 → finish.
let party = new;
let mut ctx = new?;
// ... broadcast round-0 / round-1 messages, then ctx.finish() → VrfKeyshare
VRF evaluation is three rounds over a quorum of keyshares:
use VrfEvalContext;
let mut ctx = new?;
// ... round 0 (VrfMsg0), round 1 (VrfMsg1), round 2 → VrfOutput
Host crates typically adapt these Context methods to their Round trait or WASM session types.
Building
From the workspace root:
With serde support:
License
Licensed under the Silence Laboratories License Agreement. See LICENSE in the repository root.