-
Notifications
You must be signed in to change notification settings - Fork 403
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Commitments SRS breakup companion #632
Conversation
@@ -8,7 +8,7 @@ import ( | |||
"github.com/consensys/gnark-crypto/ecc/{{toLower .Curve}}/fr/iop" | |||
"github.com/consensys/gnark-crypto/ecc" | |||
|
|||
kzgg "github.com/consensys/gnark-crypto/kzg" | |||
//kzgg "github.com/consensys/gnark-crypto/kzg" TODO Figure out why this is useful |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if it compiles without it, kill it :)
@@ -46,7 +46,7 @@ type VerifyingKey struct { | |||
NbPublicVariables uint64 | |||
|
|||
// Commitment scheme that is used for an instantiation of PLONK | |||
KZGSRS *kzg.SRS | |||
Kzg kzg.VerifyingKey |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe Kzg
-> KZGPk
? to make it clear that the Kzg
objects in the proving and verifying keys are different.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I felt that when we have pk.Kzg
and vk.Kzg
the context makes the type clear.
Companion to Consensys/gnark-crypto#378 and Consensys/gnark-crypto#384.
The main idea is that by breaking up the KZG prover and verifier portions (who only have the generator of G1 in common) we get a lighter-weight Plonk verifying key.
In light of this, we will have the option to serialize and deserialize the KZG verifying key as part of the Plonk verifying key. The advantage to this is its obvious convenience. The (less tangible) disadvantage is that it muddies the conceptual separation between data structures that are resulting from a trusted setup (KZG stuff) and those that are merely precomputed (commitments to selectors etc.)
Similarly, in Groth16 circuits using commitments, the verifying key is best not polluted by the Pedersen proving key with twice as many group elements as there are committed variables.