Skip to content

bug: binary decomposition of a variable is not strictly asserted to be less than the modulus #852

@lightning-li

Description

@lightning-li

Description

The bugfix for issue #836 isn't complete. It seems the line https://github.com/Consensys/gnark/blob/master/std/math/bits/conversion_binary.go#L100C13-L100C13 used wrong parameters. It should be cmper.MustBeLessOrEqCst(bits, bound, v)

Expected Behavior

Actual Behavior

Possible Fix

Steps to Reproduce

Context

Your Environment

  • gnark version used (e.g. v0.8.1, HEAD@develop):
  • gnark-crypto version used:
  • go version (e.g. 1.20.6):
  • Operating System and version:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions