Documentation ¶
Overview ¶
Package backend provides circuit arithmetic representations and zero knowledge proof APIs functions is this package are not curve specific and point to internal/backend curve specific implementation when needed
Index ¶
Constants ¶
const OneWire = "ONE_WIRE"
OneWire is the assignment label / name used for the constant wire one
Variables ¶
var ErrInputNotSet = errors.New("input not set")
ErrInputNotSet can be generated when solving the R1CS (a missing assignment) or running a Verifier
var ErrUnsatisfiedConstraint = errors.New("constraint is not satisfied")
ErrUnsatisfiedConstraint can be generated when solving a R1CS
Functions ¶
func FromInterface ¶
FromInterface converts an interface to a big.Int element interface must implement ToBigIntRegular(res *big.Int) *big.Int (which is the case for field generated by goff) or be uint64, int, string, []byte or big.Int it panics if the input is invalid
Types ¶
type LogEntry ¶
LogEntry is used as a shared data structure between the frontend and the backend to represent string values (in logs or debug info) where a value is not known at compile time (which is the case for variables that need to be resolved in the R1CS)
type Visibility ¶
type Visibility uint8
Visibility encodes a Variable (or wire) visibility Possible values are Unset, Internal, Secret or Public
const ( Unset Visibility = iota Internal Secret Public )
Visibility encodes a Variable (or wire) visibility Possible values are Unset, Internal, Secret or Public
Directories ¶
Path | Synopsis |
---|---|
Package groth16 implements Groth16 zkSNARK workflow (https://eprint.iacr.org/2016/260.pdf)
|
Package groth16 implements Groth16 zkSNARK workflow (https://eprint.iacr.org/2016/260.pdf) |
Package r1cs expose the R1CS (rank-1 constraint system interface) and some utils methods curve specific implementations are in gnark/internal/...
|
Package r1cs expose the R1CS (rank-1 constraint system interface) and some utils methods curve specific implementations are in gnark/internal/... |