pub fn preprocess<R>(
    num_nonces: u32,
    participant_index: u32,
    rng: &mut R,
) -> (Vec<SigningNonces>, Vec<SigningCommitments>)
where
    R: CryptoRng + RngCore,
{
    let mut signing_nonces: Vec<SigningNonces> = Vec::with_capacity(num_nonces as usize);
    let mut signing_commitments: Vec<SigningCommitments> = Vec::with_capacity(num_nonces as usize);

    for _ in 0..num_nonces {
        let nonces = SigningNonces::new(rng);
        signing_commitments.push(SigningCommitments::from((participant_index, &nonces)));
        signing_nonces.push(nonces);
    }

    (signing_nonces, signing_commitments)
}
/// Done once by each participant, to generate _their_ nonces and commitments
/// that are then used during signing.
///
/// When performing signing using two rounds, num_nonces would equal 1, to
/// perform the first round. Batching entails generating more than one
/// nonce/commitment pair at a time.  Nonces should be stored in secret storage
/// for later use, whereas the commitments are published.
Done once by each participant, to generate _their_ nonces and commitments
that are then used during signing.

When performing signing using two rounds, num_nonces would equal 1, to
perform the first round. Batching entails generating more than one
nonce/commitment pair at a time.  Nonces should be stored in secret storage
for later use, whereas the commitments are published.
Done once by each participant to generate _their_ nonces and commitments that are then used during signing . When performing signing using two rounds num_nonces would equal 1 to perform the first round . Batching entails generating more than one nonce / commitment pair at a time . Nonces should be stored in secret storage for later use whereas the commitments are published .
pub fn preprocess<R>(
    num_nonces: u32,
    participant_index: u32,
    rng: &mut R,
) -> (Vec<SigningNonces>, Vec<SigningCommitments>)
where
    R: CryptoRng + RngCore,
{
    let mut signing_nonces: Vec<SigningNonces> = Vec::with_capacity(num_nonces as usize);
    let mut signing_commitments: Vec<SigningCommitments> = Vec::with_capacity(num_nonces as usize);
    for _ in 0..num_nonces {
        let nonces = SigningNonces::new(rng);
        signing_commitments.push(SigningCommitments::from((participant_index, &nonces)));
        signing_nonces.push(nonces);
    }
    (signing_nonces, signing_commitments)
}
pub fn preprocess < R > ( num_nonces : u32 , participant_index : u32 , rng : & mut R , ) -> ( Vec < SigningNonces > , Vec < SigningCommitments > ) where R : CryptoRng + RngCore , { let mut signing_nonces : Vec < SigningNonces > = Vec :: with_capacity ( num_nonces as usize ) ; let mut signing_commitments : Vec < SigningCommitments > = Vec :: with_capacity ( num_nonces as usize ) ; for _ in 0 .. num_nonces { let nonces = SigningNonces :: new ( rng ) ; signing_commitments . push ( SigningCommitments :: from ( ( participant_index , & nonces ) ) ) ; signing_nonces . push ( nonces ) ; } ( signing_nonces , signing_commitments ) }
Done once by each participant, to generate _their_ nonces and commitments
that are then used during signing.
Done once by each participant to generate _their_ nonces and commitments that are then used during signing .
num_nonces
u32
participant_index
u32
rng
&mut R