Skip to content

Is the latency linear to only the number of public parameters whenever Groth16 is used with Gnark? #1518

Answered by ivokub
akakou asked this question in Q&A
Discussion options

You must be logged in to vote

Indeed - I gave a simplified explanation, but essentially for Groth16 proof verification there are a few components which count towards the verification time:

  • multi-scalar multiplication for public variables (single scalar mul for every public variable)
  • pairingcheck with 3 inputs for the proof
    Additionally, when in-circuit challenge computation is performed, we additionally have (n number of commitments)
  • n+1 scalar multiplications for every commitment
  • pairingcheck with n+1 inputs
    But in practice we always have n=1 or we don't have commitment at all.

And usually the scalar multiplication is a lot cheaper than pairingcheck, so if you increase number of public inputs by a little (i.e. 1->2…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@akakou
Comment options

@ivokub
Comment options

Answer selected by akakou
@akakou
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants