Skip to content

Commit 9624e6e

Browse files
committed
fix: z_is_zero inside sg check
1 parent 13dcbdf commit 9624e6e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

g16ckt/src/gadgets/bn254/pairing.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ pub fn ell_coeffs_montgomery<C: CircuitContext>(
575575
wire_c: z_is_zero,
576576
gate_type: crate::GateType::And,
577577
});
578-
z0_is_zero
578+
z_is_zero
579579
};
580580

581581
(ellc, is_in_sg)

g16ckt/src/gadgets/groth16.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ pub fn groth16_verify<C: CircuitContext>(
7272
let is_valid_fr = {
7373
let mut and_all_wires = TRUE_WIRE;
7474
public.iter().for_each(|pubinp| {
75-
let r: BigUint = ark_bn254::Fr::MODULUS.into();
76-
let valid_pubinp = bigint::less_than_constant(circuit, pubinp, &r);
75+
let q: BigUint = ark_bn254::Fr::MODULUS.into();
76+
let valid_pubinp = bigint::less_than_constant(circuit, pubinp, &q);
7777
let new_wire = circuit.issue_wire();
7878
circuit.add_gate(crate::Gate {
7979
wire_a: and_all_wires,

0 commit comments

Comments
 (0)