Documentation ¶
Overview ¶
Package plonk implements PLONK Zero Knowledge Proof system.
See also ¶
Index ¶
- func IsSolved(sparseR1cs frontend.CompiledConstraintSystem, witness frontend.Circuit) error
- func Verify(proof Proof, publicData PublicData, publicWitness frontend.Circuit) error
- type Assert
- func (assert *Assert) ProverFailed(sparseR1cs frontend.CompiledConstraintSystem, witness frontend.Circuit)
- func (assert *Assert) ProverSucceeded(sparseR1cs frontend.CompiledConstraintSystem, witness frontend.Circuit)
- func (assert *Assert) SolvingFailed(sparseR1cs frontend.CompiledConstraintSystem, witness frontend.Circuit)
- func (assert *Assert) SolvingSucceeded(sparseR1cs frontend.CompiledConstraintSystem, witness frontend.Circuit)
- type Proof
- type PublicData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Assert ¶
type Assert struct {
*require.Assertions
}
Assert is a helper to test circuits
func (*Assert) ProverFailed ¶
func (assert *Assert) ProverFailed(sparseR1cs frontend.CompiledConstraintSystem, witness frontend.Circuit)
func (*Assert) ProverSucceeded ¶
func (assert *Assert) ProverSucceeded(sparseR1cs frontend.CompiledConstraintSystem, witness frontend.Circuit)
func (*Assert) SolvingFailed ¶
func (assert *Assert) SolvingFailed(sparseR1cs frontend.CompiledConstraintSystem, witness frontend.Circuit)
SolvingFailed Verifies that the cs.PCS is not solved with the given witness, without executing plonk workflow
func (*Assert) SolvingSucceeded ¶
func (assert *Assert) SolvingSucceeded(sparseR1cs frontend.CompiledConstraintSystem, witness frontend.Circuit)
SolvingSucceeded Verifies that the sparse constraint system is solved with the given witness, without executing plonk workflow
type Proof ¶
type Proof interface{}
Proof content might vary according to the PLONK version which is chosen.
For instance it can be the commitments of L,R,O,H,Z and the opening proofs.
func Prove ¶
func Prove(sparseR1cs frontend.CompiledConstraintSystem, publicData PublicData, fullWitness frontend.Circuit) (Proof, error)
Prove generates PLONK proof from a circuit, associated preprocessed public data, and the witness
type PublicData ¶
type PublicData interface{}
PublicData contains
- polynomials corresponding to the coefficients ql,qr,qm,qo,qk (either raw or committed)
- polynomials corresponding to the permutations s1,s2,s3 (either raw or committed)
- the commitment scheme
- the fft domains
func Setup ¶
func Setup(sparseR1cs frontend.CompiledConstraintSystem, polynomialCommitment polynomial.CommitmentScheme, publicWitness frontend.Circuit) (PublicData, error)
Setup prepares the public data associated to a circuit + public inputs.
func SetupDummyCommitment ¶
func SetupDummyCommitment(sparseR1cs frontend.CompiledConstraintSystem, publicWitness frontend.Circuit) (PublicData, error)
SetupDummyCommitment is used for testing purposes, it sets up public data with dummy polynomial commitment scheme.