Expand description
Distributed Key Generation (DKG) using Feldman’s VSS.
This module provides distributed key generation without a trusted dealer. Multiple parties can jointly generate a shared secret key where no single party knows the full key, but any threshold of parties can reconstruct it.
§Features
- Feldman’s Verifiable Secret Sharing (VSS)
- Joint public key derivation
- Threshold secret sharing (M-of-N)
- Verification of shares without revealing them
§Use Cases in CHIE Protocol
- Decentralized coordinator setup
- Threshold signing for governance
- Distributed key management
§Example
use chie_crypto::dkg::{DkgParams, DkgParticipant, aggregate_public_key};
// Setup: 3 participants, threshold of 2
let params = DkgParams::new(3, 2);
// Each participant generates their contribution
let mut participants: Vec<_> = (0..3)
.map(|i| DkgParticipant::new(¶ms, i))
.collect();
// Broadcast phase: each participant shares their commitments
let commitments: Vec<_> = participants
.iter()
.map(|p| p.get_commitments())
.collect();
// Each participant receives shares from others
for i in 0..3 {
for j in 0..3 {
if i != j {
let share = participants[j].generate_share(i).unwrap();
participants[i].receive_share(j, share, &commitments[j]).unwrap();
}
}
}
// Compute joint public key
let public_key = aggregate_public_key(&commitments);
println!("Joint public key generated!");Structs§
- DkgCommitments
- Public commitments broadcast by a participant.
- DkgParams
- Parameters for DKG protocol.
- DkgParticipant
- A participant in the DKG protocol.
- DkgShare
- A secret share for a participant.
Enums§
- DkgError
- DKG-specific errors.
Functions§
- aggregate_
public_ key - Aggregate public keys from all participants to get joint public key.