Summary of Bug
FpVar::conditional_enforce_equal returns success for every constant/constant pair
without checking either value or the guard. Unequal constants with a dynamically
allocated true guard therefore add no equality obligation, and the false implication
can be satisfied and proved.
Expected behavior is !condition || left == right. Equal constants and a false guard
must remain valid, while unequal constants under a true guard must be rejected.
Open PR #196 changes the Boolean
implementation only. This report concerns the distinct FpVar constant/constant branch
in src/fields/fp/mod.rs.
Version
Steps to Reproduce
-
Check out the isolated
reproduction commit.
-
Run:
cd reproductions/field-conditional-equality
cargo +1.85.1 test --locked --test field_conditional_equality \
unequal_constants_must_force_public_condition_false -- --exact --nocapture
-
The test verifies a proof for unequal constants under public condition=true.
Disabled, equal, mixed-variable, explicit-implication, and matrix-shape controls behave
as expected.
CI: run 29434225152,
job 87416653404.
Summary of Bug
FpVar::conditional_enforce_equalreturns success for every constant/constant pairwithout checking either value or the guard. Unequal constants with a dynamically
allocated
trueguard therefore add no equality obligation, and the false implicationcan be satisfied and proved.
Expected behavior is
!condition || left == right. Equal constants and a false guardmust remain valid, while unequal constants under a true guard must be rejected.
Open PR #196 changes the Boolean
implementation only. This report concerns the distinct
FpVarconstant/constant branchin
src/fields/fp/mod.rs.Version
ark-r1cs-stdcommit45e4e2697626a9f9481fe57e70ed29c687194102ark-r1cs-stdfeatures(
std).Steps to Reproduce
Check out the isolated
reproduction commit.
Run:
The test verifies a proof for unequal constants under public
condition=true.Disabled, equal, mixed-variable, explicit-implication, and matrix-shape controls behave
as expected.
CI: run 29434225152,
job 87416653404.