Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Fq2 functions and related changes (Only the file groups.cairo) #27

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Vazquez-bit
Copy link

In this file are included the fq2 function :

  1. fn x_on_slope
  2. fn y_on_slope
  3. fn pt_on_slope
  4. fn chord
  5. fn add_as_circuit
  6. fn tangent
  7. fn double_as_circuit
  8. fn multiply_as_circuit

Copy link
Collaborator

@danielntmd danielntmd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work, minor adjustments, looks clean (I assume they pass tests). Let's now use these group operations in the verifier. They are mainly being used in the optimal_ate_utils.cairo file. Utilize the new group operations and report the new step count from making these changes.

Comment on lines +578 to +581
.next(from_u256(rhs.x.c0.c0.clone()))
.next(from_u256(rhs.x.c1.c0.clone()))
.next(from_u256(rhs.y.c0.c0.clone()))
.next(from_u256(rhs.y.c1.c0.clone()))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to clone here? Did we use rhs beforehand?

Comment on lines +731 to +735
let fq1_x0 = from_u256(x2.c0.c0.clone());
let fq1_x1 = from_u256(x2.c1.c0.clone());

let slope_a = from_u256(slope.c0.c0.clone());
let slope_b = from_u256(slope.c1.c0.clone());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

Comment on lines +835 to +839
let fq1_x0 = from_u256(x.c0.c0.clone());
let fq1_x1 = from_u256(x.c1.c0.clone());

let slope_a = from_u256(slope.c0.c0.clone());
let slope_b = from_u256(slope.c1.c0.clone());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^^

Comment on lines +1092 to +1095
let fq1_x0 = from_u256(rhs.x.c0.c0.clone());
let fq1_x1 = from_u256(rhs.x.c1.c0.clone());
let fq1_y0 = from_u256(rhs.y.c0.c0.clone());
let fq1_y1 = from_u256(rhs.y.c1.c0.clone());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^^

@@ -263,6 +275,971 @@ impl AffineOpsFqCircuit of ECOperationsCircuitFq {
}
}

impl AffineOpsFq2Circuit of ECOperationsCircuitFq2{

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rm line break

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants