Skip to content

Commit

Permalink
Verifier simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronFeickert committed Oct 25, 2023
1 parent b49f8db commit 6cc7024
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/range_proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -848,11 +848,9 @@ where
// Compute d's sum efficiently
let mut d_sum = z_square;
let mut d_sum_temp_z = z_square;
let mut d_sum_temp_2m = aggregation_factor.checked_mul(2).ok_or(ProofError::SizeOverflow)?;
while d_sum_temp_2m > 2 {
for _ in 0..aggregation_factor.ilog2() {
d_sum = d_sum + d_sum * d_sum_temp_z;
d_sum_temp_z = d_sum_temp_z * d_sum_temp_z;
d_sum_temp_2m /= 2; // Rounds towards zero, truncating any fractional part
}
d_sum *= two_n_minus_one;

Expand Down

0 comments on commit 6cc7024

Please sign in to comment.