pub fn new<'t>(
        // The message `m` has already been fed into the transcript
        transcript: &'t mut Transcript,
        x_i: Scalar,
        multikey: Multikey,
        // TBD: move this inside Multikey API to avoid such redundancy.
        pubkeys: Vec<VerificationKey>,
    ) -> (PartyAwaitingPrecommitments<'t>, NoncePrecommitment) {
        let mut rng = transcript
            .build_rng()
            .commit_witness_bytes(b"x_i", &x_i.to_bytes())
            .finalize(&mut rand::thread_rng());

        // Generate ephemeral keypair (r_i, R_i). r_i is a random nonce.
        let r_i = Scalar::random(&mut rng);
        // R_i = generator * r_i
        let R_i = NonceCommitment::new(RISTRETTO_BASEPOINT_POINT * r_i);
        // Make H(R_i)
        let precommitment = R_i.precommit();

        let counterparties = pubkeys
            .iter()
            .map(|pubkey| Counterparty::new(*pubkey))
            .collect();

        (
            PartyAwaitingPrecommitments {
                transcript,
                multikey,
                x_i,
                r_i,
                R_i,
                counterparties,
            },
            precommitment,
        )
    }
/// Create new signing party for a given transcript.
Create new signing party for a given transcript.
Create new signing party for a given transcript .
pub fn new<'t>(
        // The message `m` has already been fed into the transcript
        transcript: &'t mut Transcript,
        x_i: Scalar,
        multikey: Multikey,
        // TBD: move this inside Multikey API to avoid such redundancy.
        pubkeys: Vec<VerificationKey>,
    ) -> (PartyAwaitingPrecommitments<'t>, NoncePrecommitment) {
        let mut rng = transcript
            .build_rng()
            .commit_witness_bytes(b"x_i", &x_i.to_bytes())
            .finalize(&mut rand::thread_rng());
        // Generate ephemeral keypair (r_i, R_i). r_i is a random nonce.
        let r_i = Scalar::random(&mut rng);
        // R_i = generator * r_i
        let R_i = NonceCommitment::new(RISTRETTO_BASEPOINT_POINT * r_i);
        // Make H(R_i)
        let precommitment = R_i.precommit();
        let counterparties = pubkeys
            .iter()
            .map(|pubkey| Counterparty::new(*pubkey))
            .collect();
        (
            PartyAwaitingPrecommitments {
                transcript,
                multikey,
                x_i,
                r_i,
                R_i,
                counterparties,
            },
            precommitment,
        )
    }
pub fn new < ' t > ( // The message `m` has already been fed into the transcript transcript : & ' t mut Transcript , x_i : Scalar , multikey : Multikey , // TBD: move this inside Multikey API to avoid such redundancy. pubkeys : Vec < VerificationKey > , ) -> ( PartyAwaitingPrecommitments < ' t > , NoncePrecommitment ) { let mut rng = transcript . build_rng ( ) . commit_witness_bytes ( b" " , & x_i . to_bytes ( ) ) . finalize ( & mut rand :: thread_rng ( ) ) ; // Generate ephemeral keypair (r_i, R_i). r_i is a random nonce. let r_i = Scalar :: random ( & mut rng ) ; // R_i = generator * r_i let R_i = NonceCommitment :: new ( RISTRETTO_BASEPOINT_POINT * r_i ) ; // Make H(R_i) let precommitment = R_i . precommit ( ) ; let counterparties = pubkeys . iter ( ) . map ( | pubkey | Counterparty :: new ( * pubkey ) ) . collect ( ) ; ( PartyAwaitingPrecommitments { transcript , multikey , x_i , r_i , R_i , counterparties , } , precommitment , ) }
Create new signing party for a given transcript.
Create new signing party for a given transcript .
transcript
&'t mut Transcript
x_i
Scalar
multikey
Multikey
pubkeys
Vec<VerificationKey>
transcript
&'t mut Transcript
x_i
Scalar
multikey
Multikey
pubkeys
Vec<VerificationKey>