-
Notifications
You must be signed in to change notification settings - Fork 98
Description
Summary
Add common methods to the CurveVar trait to retrieve the x and y affine coordinates of a group element.
Problem Definition
Circuit development often requires extracting the x-coordinate of a curve point. Currently, I'm using a sequence of to_bits_le() followed by le_bits_to_fp() to achieve this.
Currently, the CurveVar trait in arkworks lacks a standardized method for accessing the affine coordinates (x, y) of a curve point. Of course, it is possible to develop the same functionality using ToConstraintFieldGadget. However, when developing a circuit, the logic for extracting coordinates differs depending on whether the CurveVar is internally an AffineVar or a ProjectiveVar. This makes it difficult to write logic for a generic CurveVar.
Proposal
affine_x() should simply return a x-coordinate.
affine_y() should simply return a x-coordinate.
affine_xy() function is also required.
For Admin Use
- [] Not duplicate issue
- [] Appropriate labels applied
- [] Appropriate contributors tagged
- [] Contributor assigned/self-assigned