Skip to content

Commit

Permalink
use correct sqrt method for no alloc
Browse files Browse the repository at this point in the history
  • Loading branch information
redshiftzero committed Jan 30, 2024
1 parent 75e81d6 commit faeaafd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/smol_curve/element.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ impl Encoding {
let u_2 = u_1.square() - (Fq::from(4u32) * COEFF_D) * ss;

// 5. sqrt
let (was_square, mut v) = Fq::sqrt_ratio_zeta(&Fq::one(), &(u_2 * u_1.square()));
let (was_square, mut v) =
Fq::non_arkworks_sqrt_ratio_zeta(&Fq::one(), &(u_2 * u_1.square()));
if !was_square {
return Err(EncodingError::InvalidEncoding);
}
Expand Down

0 comments on commit faeaafd

Please sign in to comment.