cs

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2022 License: Apache-2.0 Imports: 6 Imported by: 51

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConstraintSystem

type ConstraintSystem struct {
	compiled.CS

	// input wires
	Public, Secret []string

	CurveID ecc.ID

	// Coefficients in the constraints
	Coeffs         []big.Int      // list of unique coefficients.
	CoeffsIDsLarge map[string]int // map to check existence of a coefficient (key = coeff.Bytes())
	CoeffsIDsInt64 map[int64]int  // map to check existence of a coefficient (key = int64 value)

	// map for recording boolean constrained variables (to not constrain them twice)
	MTBooleans map[int]struct{}
}

ConstraintSystem contains the parts common to plonk and Groth16

func (*ConstraintSystem) AddDebugInfo

func (cs *ConstraintSystem) AddDebugInfo(errName string, i ...interface{}) int

func (*ConstraintSystem) BitLen

func (cs *ConstraintSystem) BitLen() int

bitLen returns the number of bits needed to represent a fr.Element

func (*ConstraintSystem) CoeffID

func (cs *ConstraintSystem) CoeffID(b *big.Int) int

CoeffID tries to fetch the entry where b is if it exits, otherwise appends b to the list of Coeffs and returns the corresponding entry

func (*ConstraintSystem) CoeffID64

func (cs *ConstraintSystem) CoeffID64(v int64) int

func (*ConstraintSystem) Curve

func (cs *ConstraintSystem) Curve() ecc.ID

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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