Skip to content

Commit

Permalink
Fix ECIP completeness issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
feltroidprime committed Oct 15, 2024
1 parent 2857d96 commit cbee534
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/ec_ops.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,34 @@ func compute_RHS_basis_sum{
if (index == n) {
return (res=sum);
}
let ep = [scalars_epns];
let en = [scalars_epns + 1];
let scalar = ep - en;
if (scalar == 0) {
return compute_RHS_basis_sum(
curve_id=curve_id,
acc_circuit=acc_circuit,
points=points,
scalars_epns=scalars_epns + 4,
index=index + 1,
n=n,
sum=new_sum,
constants=constants,
);
}
let pt_is_inf = G1Point_eq_zero(points[index]);
if (pt_is_inf == 1) {
return compute_RHS_basis_sum(
curve_id=curve_id,
acc_circuit=acc_circuit,
points=points,
scalars_epns=scalars_epns + 4,
index=index + 1,
n=n,
sum=new_sum,
constants=constants,
);
}
let (local input: UInt384*) = alloc();
assert input[0] = sum; // Copy previous sum to accumulate.
// Copy only m_A0, b_A0, xA0 from SlopeInterceptOutput struct.
Expand Down

0 comments on commit cbee534

Please sign in to comment.