Skip to content

Possible Bug: No 8-bit constraint on input #17

@autoDetector

Description

@autoDetector

Vulnerable File: circuits/sbox128.circom
commit: 4984d68467b87ddf14c2e725dcfb753be3c92528

The input in is never constrained to be a byte. Meanwhile, Num2Bits(8)(inv) forces inv to lie in [0, 255]. Combined with inv = in^{-1} (over the prime field), this restricts in to the set of prime-field elements whose inverse is < 256, making the circuit unsatisfiable for most intended byte inputs and not implementing a proper 8-bit S-box mapping.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions