backend

package
v0.3.0-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2020 License: Apache-2.0 Imports: 3 Imported by: 93

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

View Source
const OneWire = "ONE_WIRE"

OneWire is the assignment label / name used for the constant wire one

Variables

View Source
var ErrInputNotSet = errors.New("input not set")

ErrInputNotSet can be generated when solving the R1CS (a missing assignment) or running a Verifier

View Source
var ErrUnsatisfiedConstraint = errors.New("constraint is not satisfied")

ErrUnsatisfiedConstraint can be generated when solving a R1CS

Functions

func FromInterface

func FromInterface(i1 interface{}) big.Int

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

type LogEntry struct {
	Format    string
	ToResolve []int
}

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/...
r1c

Jump to

Keyboard shortcuts

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