Documentation
¶
Index ¶
- func FileExists(path string) (bool, error)
- func NewConstraintSystem(circuit frontend.Circuit) (constraint.ConstraintSystem, error)
- func OpenFileOnCreaterOverwrite(file string) (*os.File, error)
- func PlonkProve(ccs constraint.ConstraintSystem, pk native_plonk.ProvingKey, ...) (native_plonk.Proof, witness.Witness, error)
- func PlonkSetup(ccs constraint.ConstraintSystem, srs *kzg.SRS, srsLagrange *kzg.SRS) (native_plonk.ProvingKey, native_plonk.VerifyingKey, error)
- func PlonkVerify(vk native_plonk.VerifyingKey, proof native_plonk.Proof, wit witness.Witness, ...) error
- func Power2Index(n uint64) int
- func ReadCcs(fn string) (constraint.ConstraintSystem, error)
- func ReadCcsAndVk(ccsFile, vkFile string) (constraint.ConstraintSystem, plonk.VerifyingKey, error)
- func ReadPk(fn string) (plonk.ProvingKey, error)
- func ReadProof(fn string) (plonk.Proof, error)
- func ReadSrs(size int, srsDir string) (*kzg.SRS, *kzg.SRS, error)
- func ReadVk(fn string) (plonk.VerifyingKey, error)
- func ReadWitness(fn string) (witness.Witness, error)
- func SaveProofAndWitnessInSol(proof *Proof, proofSolFile, witnessSolFile string) error
- func WriteCcs(ccs constraint.ConstraintSystem, fn string) error
- func WritePk(pk plonk.ProvingKey, fn string) error
- func WriteProof(proof plonk.Proof, fn string) error
- func WriteProofInSolidity(proof plonk.Proof, fn string) error
- func WriteVk(vk plonk.VerifyingKey, fn string) error
- func WriteVkInSolidity(vk plonk.VerifyingKey, fn string) error
- func WriteWitness(wit witness.Witness, fn string) error
- func WriteWitnessInJson(wit witness.Witness, fn string) error
- type CircuitFile
- type CircuitOperations
- func (c *CircuitOperations) ConstraintSystem() (constraint.ConstraintSystem, error)
- func (c *CircuitOperations) GetVerifyingKey() (native_plonk.VerifyingKey, error)
- func (c *CircuitOperations) LoadCcsPkVk() error
- func (c *CircuitOperations) ProveWithAssignment(assignment frontend.Circuit, isFront bool) (*Proof, error)
- func (c *CircuitOperations) SaveCcsPkVk(ccsFile, pkFile, vkFile string) error
- func (c *CircuitOperations) SaveProofAndWitness(proof *Proof, proofFile, witnessFile string) error
- func (c *CircuitOperations) SetupWithCircuit(circuit frontend.Circuit) (constraint.ConstraintSystem, native_plonk.ProvingKey, ...)
- func (c *CircuitOperations) UnsafeFingerPrint() ([]byte, error)
- func (c *CircuitOperations) Verify(vk native_plonk.VerifyingKey, proof native_plonk.Proof, wit witness.Witness, ...) error
- type Config
- type Proof
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileExists ¶
func NewConstraintSystem ¶
func NewConstraintSystem(circuit frontend.Circuit) (constraint.ConstraintSystem, error)
func PlonkProve ¶
func PlonkProve(ccs constraint.ConstraintSystem, pk native_plonk.ProvingKey, assignment frontend.Circuit, isFront bool) (native_plonk.Proof, witness.Witness, error)
func PlonkSetup ¶
func PlonkSetup(ccs constraint.ConstraintSystem, srs *kzg.SRS, srsLagrange *kzg.SRS) (native_plonk.ProvingKey, native_plonk.VerifyingKey, error)
func PlonkVerify ¶
func PlonkVerify(vk native_plonk.VerifyingKey, proof native_plonk.Proof, wit witness.Witness, isFront bool) error
func Power2Index ¶
func ReadCcs ¶
func ReadCcs(fn string) (constraint.ConstraintSystem, error)
func ReadCcsAndVk ¶ added in v0.1.4
func ReadCcsAndVk(ccsFile, vkFile string) (constraint.ConstraintSystem, plonk.VerifyingKey, error)
func SaveProofAndWitnessInSol ¶ added in v0.1.3
func WriteCcs ¶
func WriteCcs(ccs constraint.ConstraintSystem, fn string) error
func WriteProofInSolidity ¶ added in v0.1.1
func WriteVkInSolidity ¶ added in v0.1.3
func WriteVkInSolidity(vk plonk.VerifyingKey, fn string) error
Types ¶
type CircuitFile ¶ added in v0.1.2
type CircuitFile struct { Ccs constraint.ConstraintSystem Vkeys []plonk.VerifyingKey }
type CircuitOperations ¶
type CircuitOperations struct { ProvingKey native_plonk.ProvingKey VerifyingKey native_plonk.VerifyingKey Ccs constraint.ConstraintSystem Config *Config ComponentName string Logger *zerolog.Logger }
func (*CircuitOperations) ConstraintSystem ¶
func (c *CircuitOperations) ConstraintSystem() (constraint.ConstraintSystem, error)
func (*CircuitOperations) GetVerifyingKey ¶
func (c *CircuitOperations) GetVerifyingKey() (native_plonk.VerifyingKey, error)
func (*CircuitOperations) LoadCcsPkVk ¶
func (c *CircuitOperations) LoadCcsPkVk() error
func (*CircuitOperations) ProveWithAssignment ¶
func (*CircuitOperations) SaveCcsPkVk ¶
func (c *CircuitOperations) SaveCcsPkVk(ccsFile, pkFile, vkFile string) error
func (*CircuitOperations) SaveProofAndWitness ¶
func (c *CircuitOperations) SaveProofAndWitness(proof *Proof, proofFile, witnessFile string) error
func (*CircuitOperations) SetupWithCircuit ¶
func (c *CircuitOperations) SetupWithCircuit(circuit frontend.Circuit) (constraint.ConstraintSystem, native_plonk.ProvingKey, native_plonk.VerifyingKey, error)
func (*CircuitOperations) UnsafeFingerPrint ¶
func (c *CircuitOperations) UnsafeFingerPrint() ([]byte, error)
func (*CircuitOperations) Verify ¶
func (c *CircuitOperations) Verify(vk native_plonk.VerifyingKey, proof native_plonk.Proof, wit witness.Witness, isFront bool) error
Click to show internal directories.
Click to hide internal directories.