Does gnarks (ZeroKnowledgeProof framework) AssertIsLessOrEqual work with negative numbers and ecc.BN254 curve? https://pkg.go.dev/github.com/consensys/[email protected]/frontend
It seems most computations including multiplication works with negative numbers but AssertIsLessOrEqual does not work as expected when it has negative parameters.
gnark/bn254 works with unsigned numbers. When you pass
-3
then it is21888242871839275222246405745257275088548364400416034343698204186575808495614
What may mislead as
frontend.API.Println
will print21888242871839275222246405745257275088548364400416034343698204186575808495614
as-3
AssertIsLessOrEqual
will consider-3
as21888242871839275222246405745257275088548364400416034343698204186575808495614