Open
Description
Summary of Bug
There's a discrepancy between input variable allocation and constraint field conversion for the Short Weierstrass curve group, specifically, how the infinity
marker's value field is used.
For the curve group, it's either zero or one depending on the value of the infinity
marker. Please see the following trace:
- https://github.com/arkworks-rs/algebra/blob/master/ec/src/models/short_weierstrass/group.rs#L624
- https://github.com/arkworks-rs/algebra/blob/master/ec/src/models/short_weierstrass/affine.rs#L390
- https://github.com/arkworks-rs/algebra/blob/master/ff/src/to_field_vec.rs#L14
However, in the r1cs variant it's always F::one
, see: https://github.com/arkworks-rs/r1cs-std/blob/master/src/groups/curves/short_weierstrass/mod.rs#L219
For the algebra repo, the behavior seems correct. I see that for r1cs there is conversion after allocation here, but since the FpVar was already allocated as FpVar::one
, I get a conflict during proof verification.
Version
Reproduces in v0.3.0
and the latest master.
Steps to Reproduce
- Allocate
short_weierstrass::G1Var
with non-infinity value - Generate proof
- Get public input
- Verify proof
Metadata
Metadata
Assignees
Labels
No labels