Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix circuit to create group from coordinates.
This issue was discovered in the circuit to cast a field to a group, but it really affects the sub-circuit of that circuit that turns two field coordinates into a group element. The issue is not in the witness computation, but in the circuit, which generates constraints about the point being in the group (i.e. being on the curve, and being in the subgroup) that apply not to the given point, but to a freshly created point, i.e. two different R1CS variables than the ones given as input. This can be seen by generating sample circuits: there is no connection between the input variables and the point being constrained. This commit fixes the issue by adding equality constraints that tie the input coordinates with the point that is constrained to be in the (sub)group. This is not the most efficient circuit, because it uses more variables and constraints than needed, but it is a simple fix for now.
- Loading branch information