Skip to content

Commit

Permalink
Fix tests using ZETA
Browse files Browse the repository at this point in the history
  • Loading branch information
cronokirby committed Jan 31, 2024
1 parent 4fa718f commit 04d1072
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ark_curve/r1cs/fqvar_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ impl FqVarExtension for FqVar {
y_squared_var.conditional_enforce_equal(&FqVar::zero(), &in_case_3)?;

// Case 4: `(false, sqrt(zeta*num/den))` if `num` and `den` are both nonzero and `num/den` is nonsquare;
let zeta_var = FqVar::new_constant(cs, *ZETA)?;
let zeta_var = FqVar::new_constant(cs, ZETA)?;
let zeta_times_one_over_den_var = zeta_var * den_var_inv;
let in_case_4 = was_not_square_var.and(&den_var_is_zero.not())?;
// Certify the return value y is sqrt(zeta * 1/den)
Expand Down
2 changes: 1 addition & 1 deletion src/ark_curve/r1cs/inner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ impl ElementVar {

let A_VAR = FqVar::new_constant(cs.clone(), Decaf377EdwardsConfig::COEFF_A)?;
let D_VAR = FqVar::new_constant(cs.clone(), Decaf377EdwardsConfig::COEFF_D)?;
let ZETA_VAR = FqVar::new_constant(cs, *ZETA)?;
let ZETA_VAR = FqVar::new_constant(cs, ZETA)?;

let r_var = ZETA_VAR * r_0_var.square()?;

Expand Down

0 comments on commit 04d1072

Please sign in to comment.