Documentation
¶
Index ¶
- func CPUProver(curve ecc.ID, ccs constraint.ConstraintSystem, pk groth16.ProvingKey, ...) (groth16.Proof, error)
- func CPUProverWithWitness(curve ecc.ID, ccs constraint.ConstraintSystem, pk groth16.ProvingKey, ...) (groth16.Proof, error)
- func DefaultProver(curve ecc.ID, ccs constraint.ConstraintSystem, pk groth16.ProvingKey, ...) (groth16.Proof, error)
- func GPUProver(curve ecc.ID, ccs constraint.ConstraintSystem, pk groth16.ProvingKey, ...) (groth16.Proof, error)
- func GPUProverWithWitness(curve ecc.ID, ccs constraint.ConstraintSystem, pk groth16.ProvingKey, ...) (groth16.Proof, error)
- func NewProvingKey(curve ecc.ID) groth16.ProvingKey
- func ProveWithWitness(curve ecc.ID, ccs constraint.ConstraintSystem, pk groth16.ProvingKey, ...) (groth16.Proof, error)
- func Setup(ccs constraint.ConstraintSystem) (groth16.ProvingKey, groth16.VerifyingKey, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CPUProver ¶
func CPUProver( curve ecc.ID, ccs constraint.ConstraintSystem, pk groth16.ProvingKey, assignment frontend.Circuit, opts ...backend.ProverOption, ) (groth16.Proof, error)
CPUProver is the standard implementation that simply calls groth16.Prove directly. This is used in production environments.
func CPUProverWithWitness ¶
func CPUProverWithWitness( curve ecc.ID, ccs constraint.ConstraintSystem, pk groth16.ProvingKey, w witness.Witness, opts ...backend.ProverOption, ) (groth16.Proof, error)
CPUProverWithWitness proves using CPU with an already-created witness.
func DefaultProver ¶
func DefaultProver( curve ecc.ID, ccs constraint.ConstraintSystem, pk groth16.ProvingKey, assignment frontend.Circuit, opts ...backend.ProverOption, ) (groth16.Proof, error)
DefaultProver is the default prover implementation. It uses the GPU prover if UseGPUProver is true, otherwise it uses the CPU prover. If GPU proving fails, it falls back to CPU proving.
func GPUProver ¶
func GPUProver( curve ecc.ID, ccs constraint.ConstraintSystem, pk groth16.ProvingKey, assignment frontend.Circuit, opts ...backend.ProverOption, ) (groth16.Proof, error)
GPUProver is an implementation that uses GPU acceleration for proving.
func GPUProverWithWitness ¶
func GPUProverWithWitness( curve ecc.ID, ccs constraint.ConstraintSystem, pk groth16.ProvingKey, w witness.Witness, opts ...backend.ProverOption, ) (groth16.Proof, error)
GPUProverWithWitness proves using GPU with an already-created witness.
func NewProvingKey ¶
func NewProvingKey(curve ecc.ID) groth16.ProvingKey
NewProvingKey instantiates an empty proving key compatible with the selected backend. When GPU proving is enabled this returns an ICICLE proving key so that serialized keys can be read directly into GPU-ready structures.
func ProveWithWitness ¶
func ProveWithWitness( curve ecc.ID, ccs constraint.ConstraintSystem, pk groth16.ProvingKey, w witness.Witness, opts ...backend.ProverOption, ) (groth16.Proof, error)
ProveWithWitness generates a proof from an already-created witness. It automatically uses GPU acceleration if UseGPUProver is true. If GPU proving fails, it falls back to CPU proving.
func Setup ¶
func Setup(ccs constraint.ConstraintSystem) (groth16.ProvingKey, groth16.VerifyingKey, error)
Setup wraps groth16.Setup and switches to the ICICLE-aware setup when the GPU prover is enabled. This guarantees that the resulting proving key has the extra device metadata required by gpugroth16.Prove.
Types ¶
This section is empty.