threshold_crypto icon indicating copy to clipboard operation
threshold_crypto copied to clipboard

Include DKG example

Open ineiti opened this issue 3 years ago • 3 comments

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!

ineiti avatar Mar 25 '21 07:03 ineiti

Note to self: probably this can help

https://github.com/poanetwork/threshold_crypto/blob/master/src/poly.rs#L819

ineiti avatar Mar 26 '21 17:03 ineiti

(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.

afck avatar Mar 27 '21 14:03 afck

there is also bls_dkg crate.

dan-da avatar Jul 07 '21 00:07 dan-da