Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/schnorr_protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ where
let nonces: Vec<G::Scalar> = (0..self.witness_length())
.map(|_| G::Scalar::random(&mut rng))
.collect();
let prover_state = (nonces.clone(), witness.clone());
let commitment = self.0.linear_map.evaluate(&nonces)?;
let prover_state = (nonces, witness.clone());
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Computing commitment before prover state saves cloning of the nonces vector

Ok((commitment, prover_state))
}

Expand Down