Questions tagged [bn254]

2 questions
3
votes
1 answer

ZKP, Gnark: Does AssertIsLessOrEqual work with negative numbers?

Does gnarks (ZeroKnowledgeProof framework) AssertIsLessOrEqual work with negative numbers and ecc.BN254 curve? https://pkg.go.dev/github.com/consensys/gnark@v0.7.0/frontend It seems most computations including multiplication works with negative…
Max
  • 6,286
  • 5
  • 44
  • 86
1
vote
0 answers

How to implement a >=0 check in gnark for unsigned integers when a can be any integer (negative or positive) in the clear?

I have the following block of code in golang in the clear. for i := 0; i < 10; i++ { if val[i]>=0{ postcheck[i] = val[i] bitpostcheck[i] = 1 } else { postcheck[i] = 0 bitpostcheck[i] = 0 } } val[i] can…
stateless
  • 19
  • 2