halo2
halo2 copied to clipboard
Add `ParamsVerifierKZG`
Description
The aim of this PR is to allow the verification of a KZG proof without having to deal with the complete KZG parameters.
ParamsKZG contains 2 G2 elements and 2 vectors of n-sized vectors of G1 elements, where n is the size of the circuit.
The verifier only needs the 2 G2 elements, and as many G1 elements as public inputs in the circuit.
Changes
- Add the struct
ParamsVerifierKZG. This struct contains the bare minimum info needed to verify a proof. - Remove
get_gfrom ParamsProver. - Modify
verifier_params->into_verifier_params. I'm not 100% convinced how this ended up, so any suggestion is greatly appreciated. - Adjust to function calls to use verifier parameters when needed, instead of the full parameters.
Closes #280
Where's all this read/write impls comming from??
These are adaptations from the implementations of ParamsKZG, they are equal just with different fields in the struct.
Where's all this read/write impls comming from??
These are adaptations from the implementations of
ParamsKZG, they are equal just with different fields in the struct.
We should consider this as related to #176
Overridden by #318