arkworks-rs / groth16

A Rust implementation of the Groth16 zkSNARK
https://www.arkworks.rs
Apache License 2.0
242 stars 97 forks source link

Add proof input preprocessing #30

Closed rozbb closed 3 years ago

rozbb commented 3 years ago

Description

If a verifier knows the public inputs to a circuit, it can now preprocess them in advance. This is a useful trick for reducing the online time of protocols which require a verification.

This does not implement the same functionality for circuits. This is because the circuit is implemented as a SNARKGadget, which does not expose input preprocessing methods. I'm not certain if all the NIZK schemes in arkworks have the ability to do this trick, so it might not be possible to extend SNARKGadget.


Before we can merge this PR, please make sure that all the following items have been checked off. If any of the checklist items are not applicable, please leave them but write a little note why.