pub fn keygen(
        seed: Randomness,
        threshold: NumberOfNodes,
        group_size: NumberOfNodes,
    ) -> CryptoResult<(PublicCoefficientsBytes, Vec<SecretKeyBytes>)> {
        let selection = &vec![true; group_size.get() as usize];
        tsig::keygen(seed, threshold, selection).map(|(public_coefficients, selected_keys)| {
            let all_keys: Vec<SecretKeyBytes> = selected_keys
                .into_iter()
                .map(|key_maybe| key_maybe.unwrap())
                .collect();
            (public_coefficients, all_keys)
        })
    }
/// Shim for tests that use the old API that generated keys for all
/// participants. The new API generates only select keys.
///
/// TODO(DFN-1412): Test scenarios where only some keys are generated
Shim for tests that use the old API that generated keys for all
participants. The new API generates only select keys.


Shim for tests that use the old API that generated keys for all participants . The new API generates only select keys .
pub fn keygen(
        seed: Randomness,
        threshold: NumberOfNodes,
        group_size: NumberOfNodes,
    ) -> CryptoResult<(PublicCoefficientsBytes, Vec<SecretKeyBytes>)> {
        let selection = &vec![true; group_size.get() as usize];
        tsig::keygen(seed, threshold, selection).map(|(public_coefficients, selected_keys)| {
            let all_keys: Vec<SecretKeyBytes> = selected_keys
                .into_iter()
                .map(|key_maybe| key_maybe.unwrap())
                .collect();
            (public_coefficients, all_keys)
        })
    }
pub fn keygen ( seed : Randomness , threshold : NumberOfNodes , group_size : NumberOfNodes , ) -> CryptoResult < ( PublicCoefficientsBytes , Vec < SecretKeyBytes > ) > { let selection = & vec ! [ true group_size get ( ) as usize ] ; tsig :: keygen ( seed , threshold , selection ) . map ( | ( public_coefficients , selected_keys ) | { let all_keys : Vec < SecretKeyBytes > = selected_keys . into_iter ( ) . map ( | key_maybe | key_maybe . unwrap ( ) ) . collect ( ) ; ( public_coefficients , all_keys ) } ) }
Shim for tests that use the old API that generated keys for all
participants.
Shim for tests that use the old API that generated keys for all participants .
seed
Randomness
threshold
NumberOfNodes
group_size
NumberOfNodes
seed
Randomness
threshold
NumberOfNodes
group_size
NumberOfNodes