cs

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: Apache-2.0 Imports: 27 Imported by: 22

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHashBuilder added in v0.10.0

func GetHashBuilder(name string) (func() hash.Hash, error)

func GkrProveHint added in v0.9.0

func GkrProveHint(hashName string, data *GkrSolvingData) hint.Hint

func GkrSolveHint added in v0.9.0

func GkrSolveHint(info constraint.GkrInfo, solvingData *GkrSolvingData) hint.Hint

func RegisterHashBuilder added in v0.10.0

func RegisterHashBuilder(name string, builder func() hash.Hash)

Types

type CoeffTable

type CoeffTable struct {
	Coefficients []fr.Element
	// contains filtered or unexported fields
}

CoeffTable ensure we store unique coefficients in the constraint system

func (*CoeffTable) AddCoeff added in v0.9.0

func (ct *CoeffTable) AddCoeff(coeff constraint.Element) uint32

func (*CoeffTable) CoeffToString

func (ct *CoeffTable) CoeffToString(cID int) string

CoeffToString implements constraint.Resolver

func (*CoeffTable) MakeTerm

func (ct *CoeffTable) MakeTerm(coeff constraint.Element, variableID int) constraint.Term

type ConstPseudoHash added in v0.11.0

type ConstPseudoHash int

For testing purposes

func (ConstPseudoHash) BlockSize added in v0.11.0

func (c ConstPseudoHash) BlockSize() int

func (ConstPseudoHash) Reset added in v0.11.0

func (c ConstPseudoHash) Reset()

func (ConstPseudoHash) Size added in v0.11.0

func (c ConstPseudoHash) Size() int

func (ConstPseudoHash) Sum added in v0.11.0

func (c ConstPseudoHash) Sum([]byte) []byte

func (ConstPseudoHash) Write added in v0.11.0

func (c ConstPseudoHash) Write(p []byte) (int, error)

type GkrSolvingData added in v0.9.0

type GkrSolvingData struct {
	// contains filtered or unexported fields
}

type R1CS

type R1CS = system

func NewR1CS

func NewR1CS(capacity int) *R1CS

NewR1CS is a constructor for R1CS. It is meant to be use by gnark frontend only, and should not be used by gnark users. See groth16.NewCS(...) instead.

type R1CSSolution added in v0.9.0

type R1CSSolution struct {
	W       fr.Vector
	A, B, C fr.Vector
}

R1CSSolution represent a valid assignment to all the variables in the constraint system. The vector W such that Aw o Bw - Cw = 0

func (*R1CSSolution) ReadFrom added in v0.9.0

func (t *R1CSSolution) ReadFrom(r io.Reader) (int64, error)

func (*R1CSSolution) WriteTo added in v0.9.0

func (t *R1CSSolution) WriteTo(w io.Writer) (int64, error)

type SparseR1CS

type SparseR1CS = system

func NewSparseR1CS

func NewSparseR1CS(capacity int) *SparseR1CS

NewSparseR1CS is a constructor for SparseR1CS. It is meant to be use by gnark frontend only, and should not be used by gnark users. See plonk.NewCS(...) instead.

type SparseR1CSSolution added in v0.9.0

type SparseR1CSSolution struct {
	L, R, O fr.Vector
}

SparseR1CSSolution represent a valid assignment to all the variables in the constraint system.

func (*SparseR1CSSolution) ReadFrom added in v0.9.0

func (t *SparseR1CSSolution) ReadFrom(r io.Reader) (int64, error)

func (*SparseR1CSSolution) WriteTo added in v0.9.0

func (t *SparseR1CSSolution) WriteTo(w io.Writer) (int64, error)

type UnsatisfiedConstraintError

type UnsatisfiedConstraintError struct {
	Err       error
	CID       int     // constraint ID
	DebugInfo *string // optional debug info
}

UnsatisfiedConstraintError wraps an error with useful metadata on the unsatisfied constraint

func (*UnsatisfiedConstraintError) Error

Jump to

Keyboard shortcuts

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