pub fn preprocess<R>(
    num_nonces: u8,
    participant_index: u64,
    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)
}
/// The number of nonces is limited to 255. This limit can be increased if it
/// turns out to be too conservative.
// TODO: Make sure the above is a correct statement, fix if needed in:
// https://github.com/ZcashFoundation/redjubjub/issues/111
The number of nonces is limited to 255. This limit can be increased if it
turns out to be too conservative.
The number of nonces is limited to 255 . This limit can be increased if it turns out to be too conservative .
pub fn preprocess<R>(
    num_nonces: u8,
    participant_index: u64,
    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 : u8 , participant_index : u64 , 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 ) }
The number of nonces is limited to 255.
The number of nonces is limited to 255 .
num_nonces
u8
participant_index
u64
rng
&mut R