Skip to content

Potential Bug in SELECT circuit #9

Description

@Koukyosyumei

In select.circom, line 79 uses an assert statement to check whether field[j] is binary. However, in Circom, assert does not generate a constraint—it only checks the condition during the witness generation, which is insufficient for enforcing validity within the circuit being proven.

assert(fields[j] >= 0 && fields[j] <= 1);

To properly constrain the signal to be binary, this line should be replaced with:

(field[j] - 1) * field[j] === 0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions