pub fn by_dkg_or_panic(
        mut rng: &mut ChaCha20Rng,
        num_receivers: usize,
        num_dealers: usize,
        threshold: usize,
    ) -> Self {
        let participants = InitialState::random(&mut rng, num_receivers, num_dealers);

        // First key generation:
        let state = StateWithEphemeralKeys::new(participants);
        state
            .verify_ephemeral()
            .expect("Ephemeral keys failed to verify");
        let state = StateWithDealings::new(state, NumberOfNodes::from(threshold as NodeIndex));
        state.verify_dealing().expect("Dealings failed to verify");
        let state = StateWithResponses::new(state);
        state
            .verify_responses()
            .expect("Responses failed to verify");
        let state = StateWithTranscript::new(state);
        StateWithThresholdKeys::new(state)
    }
/// Executes a complete standard DKG.
Executes a complete standard DKG.
Executes a complete standard DKG .
pub fn by_dkg_or_panic(
        mut rng: &mut ChaCha20Rng,
        num_receivers: usize,
        num_dealers: usize,
        threshold: usize,
    ) -> Self {
        let participants = InitialState::random(&mut rng, num_receivers, num_dealers);
        // First key generation:
        let state = StateWithEphemeralKeys::new(participants);
        state
            .verify_ephemeral()
            .expect("Ephemeral keys failed to verify");
        let state = StateWithDealings::new(state, NumberOfNodes::from(threshold as NodeIndex));
        state.verify_dealing().expect("Dealings failed to verify");
        let state = StateWithResponses::new(state);
        state
            .verify_responses()
            .expect("Responses failed to verify");
        let state = StateWithTranscript::new(state);
        StateWithThresholdKeys::new(state)
    }
pub fn by_dkg_or_panic ( mut rng : & mut ChaCha20Rng , num_receivers : usize , num_dealers : usize , threshold : usize , ) -> Self { let participants = InitialState :: random ( & mut rng , num_receivers , num_dealers ) ; // First key generation: let state = StateWithEphemeralKeys :: new ( participants ) ; state . verify_ephemeral ( ) . expect ( " " ) ; let state = StateWithDealings :: new ( state , NumberOfNodes :: from ( threshold as NodeIndex ) ) ; state . verify_dealing ( ) . expect ( " " ) ; let state = StateWithResponses :: new ( state ) ; state . verify_responses ( ) . expect ( " " ) ; let state = StateWithTranscript :: new ( state ) ; StateWithThresholdKeys :: new ( state ) }
Executes a complete standard DKG.
Executes a complete standard DKG .
rng
&mut ChaCha20Rng
num_receivers
usize
num_dealers
usize
threshold
usize
rng
&mut ChaCha20Rng
num_receivers
usize
num_dealers
usize
threshold
usize