backend

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2022 License: Apache-2.0 Imports: 3 Imported by: 52

Documentation

Overview

Package backend implements Zero Knowledge Proof systems: it consumes circuit compiled with gnark/frontend.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IgnoreSolverError added in v0.5.1

func IgnoreSolverError(opt *ProverOption) error

IgnoreSolverError is a ProverOption that indicates that the Prove algorithm should complete, even if constraint system is not solved. In that case, Prove will output an invalid Proof, but will execute all algorithms which is useful for test and benchmarking purposes

func WithHints added in v0.5.1

func WithHints(hintFunctions ...hint.Function) func(opt *ProverOption) error

WithHints is a Prover option that specifies additional hint functions to be used by the constraint solver

func WithOutput added in v0.5.1

func WithOutput(w io.Writer) func(opt *ProverOption) error

WithOutput is a Prover option that specifies an io.Writer as destination for logs printed by api.Println(). If set to nil, no logs are printed.

Types

type ID added in v0.4.0

type ID uint16

ID represent a unique ID for a proving scheme

const (
	UNKNOWN ID = iota
	GROTH16
	PLONK
)

func Implemented added in v0.5.0

func Implemented() []ID

Implemented return the list of proof systems implemented in gnark

func (ID) String added in v0.5.0

func (id ID) String() string

String returns the string representation of a proof system

type ProverOption added in v0.5.1

type ProverOption struct {
	Force         bool            // default to false
	HintFunctions []hint.Function // default to nil (use only solver std hints)
	LoggerOut     io.Writer       // default to os.Stdout
}

ProverOption is shared accross backends to parametrize calls to xxx.Prove(...)

func NewProverOption added in v0.5.1

func NewProverOption(opts ...func(opt *ProverOption) error) (ProverOption, error)

NewProverOption returns a default ProverOption with given options applied

Directories

Path Synopsis
Package groth16 implements Groth16 Zero Knowledge Proof system (aka zkSNARK).
Package groth16 implements Groth16 Zero Knowledge Proof system (aka zkSNARK).
Package hint allows to define computations outside of a circuit.
Package hint allows to define computations outside of a circuit.
Package plonk implements PLONK Zero Knowledge Proof system.
Package plonk implements PLONK Zero Knowledge Proof system.
Package witness provides serialization helpers to encode a witness into a []byte.
Package witness provides serialization helpers to encode a witness into a []byte.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL