threshold_crypto
threshold_crypto copied to clipboard
Include DKG example
Would it be very difficult to add an example that does the key-setup using a DKG? Like replacing the following code in the examples:
let mut rng = rand::thread_rng();
let sk_set = SecretKeySet::random(threshold, &mut rng);
let pk_set = sk_set.public_keys();
let actors = (0..n_actors)
.map(|id| {
let sk_share = sk_set.secret_key_share(id);
let pk_share = pk_set.public_key_share(id);
Actor::new(id, sk_share, pk_share)
})
.collect();
With something where the dealer does not know the secret key!
Note to self: probably this can help
https://github.com/poanetwork/threshold_crypto/blob/master/src/poly.rs#L819
(Not sure if anyone's working on this repository currently.)
Maybe the DKG implementation in HBBFT (which uses threshold_crypto
) can serve as an example.
there is also bls_dkg crate.