Questions tagged [gnark]

4 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

Implementing grpc in gnark v0.8.1, how to convert Proof, Verification Key & Public Witness to go-native type?

In gnark v0.8.1, We first need to convert those 3 to go-native i.e. we convert them to []byte. I tried implementing Serialize() and DeSerialize(), but I am facing errors. Issue: groth16.Proof is an interface and its implementation depends upon…
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
1
vote
1 answer

how to use gnark v0.8.0 to do MIMC verification?

Can anyone tell me how to do MIMC verification with gnark v0.8.0 and gnark-crypto v0.9.1? my code as fllow package main import ( "fmt" "github.com/consensys/gnark-crypto/ecc" bn254 "github.com/consensys/gnark-crypto/ecc/bn254/fr/mimc" …
YurunChen
  • 11
  • 2