halo2 icon indicating copy to clipboard operation
halo2 copied to clipboard

Add `ParamsVerifierKZG`

Open davidnevadoc opened this issue 1 year ago • 2 comments

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_g from 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

davidnevadoc avatar Mar 20 '24 15:03 davidnevadoc

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.

davidnevadoc avatar Mar 21 '24 09:03 davidnevadoc

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

CPerezz avatar Mar 21 '24 11:03 CPerezz

Overridden by #318

davidnevadoc avatar May 13 '24 17:05 davidnevadoc