Documentation ¶
Index ¶
- Variables
- func ChallengeNames(sorted []*Wire, logNbInstances int, prefix string) []string
- func ProofSize(c Circuit, logNbInstances int) int
- func ProveHintPlaceholder(*big.Int, []*big.Int, []*big.Int) error
- func SolveHintPlaceholder(*big.Int, []*big.Int, []*big.Int) error
- func Verify(api frontend.API, c Circuit, assignment WireAssignment, proof Proof, ...) error
- type API
- func (api *API) Add(i1, i2 constraint.GkrVariable, in ...constraint.GkrVariable) constraint.GkrVariable
- func (api *API) Import(assignment []frontend.Variable) (constraint.GkrVariable, error)
- func (api *API) Mul(i1, i2 constraint.GkrVariable, in ...constraint.GkrVariable) constraint.GkrVariable
- func (api *API) NamedGate(gate string, in ...constraint.GkrVariable) constraint.GkrVariable
- func (api *API) Neg(i1 constraint.GkrVariable) constraint.GkrVariable
- func (api *API) Println(a ...constraint.GkrVariable)
- func (api *API) Series(input, output constraint.GkrVariable, inputInstance, outputInstance int) *API
- func (api *API) Solve(parentApi frontend.API) (Solution, error)
- func (api *API) Sub(i1, i2 constraint.GkrVariable, in ...constraint.GkrVariable) constraint.GkrVariable
- type AddGate
- type Circuit
- type Gate
- type IdentityGate
- type MulGate
- type Option
- type Proof
- type Solution
- type Wire
- type WireAssignment
Constants ¶
This section is empty.
Variables ¶
View Source
var Gates = map[string]Gate{ "identity": IdentityGate{}, "add": AddGate{}, "mul": MulGate{}, }
Functions ¶
func ChallengeNames ¶
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func (*API) Add ¶
func (api *API) Add(i1, i2 constraint.GkrVariable, in ...constraint.GkrVariable) constraint.GkrVariable
func (*API) Import ¶
func (api *API) Import(assignment []frontend.Variable) (constraint.GkrVariable, error)
Import creates a new input variable, whose values across all instances are given by assignment. If the value in an instance depends on an output of another instance, leave the corresponding index in assigment nil and use Series to specify the dependency.
func (*API) Mul ¶
func (api *API) Mul(i1, i2 constraint.GkrVariable, in ...constraint.GkrVariable) constraint.GkrVariable
func (*API) NamedGate ¶
func (api *API) NamedGate(gate string, in ...constraint.GkrVariable) constraint.GkrVariable
func (*API) Neg ¶
func (api *API) Neg(i1 constraint.GkrVariable) constraint.GkrVariable
func (*API) Println ¶
func (api *API) Println(a ...constraint.GkrVariable)
TODO @Tabaie This can be useful
func (*API) Series ¶
func (api *API) Series(input, output constraint.GkrVariable, inputInstance, outputInstance int) *API
Series like in an electric circuit, binds an input of an instance to an output of another
func (*API) Solve ¶
Solve finalizes the GKR circuit and returns the output variables in the order created
func (*API) Sub ¶
func (api *API) Sub(i1, i2 constraint.GkrVariable, in ...constraint.GkrVariable) constraint.GkrVariable
type IdentityGate ¶
type IdentityGate struct{}
func (IdentityGate) Degree ¶
func (IdentityGate) Degree() int
type MulGate ¶
type MulGate struct{}
type Proof ¶
type Proof []sumcheck.Proof // for each layer, for each wire, a sumcheck (for each variable, a polynomial)
func DeserializeProof ¶
type Solution ¶
type Solution struct {
// contains filtered or unexported fields
}
type Wire ¶
type WireAssignment ¶
type WireAssignment map[*Wire]polynomial.MultiLin
WireAssignment is assignment of values to the same wire across many instances of the circuit
func (WireAssignment) NumInstances ¶
func (a WireAssignment) NumInstances() int
func (WireAssignment) NumVars ¶
func (a WireAssignment) NumVars() int
Click to show internal directories.
Click to hide internal directories.