Skip to content

Commit

Permalink
Use is_one().
Browse files Browse the repository at this point in the history
  • Loading branch information
acoglio committed Dec 27, 2023
1 parent 66a5654 commit e4886be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion circuit/types/field/src/square_root.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl<E: Environment> Field<E> {

// Use Euler's criterion: self is a non-zero square iff self^((p-1)/2) is 1.
let euler = self.pow(modulus_minus_one_div_two);
let is_nonzero_square = euler.is_equal(&Field::one());
let is_nonzero_square = euler.is_one();

// Calculate the witness for the first square result.
// The called function square_root returns the square root closer to 0.
Expand Down

0 comments on commit e4886be

Please sign in to comment.