Documentation ¶
Overview ¶
Package r1cs expose the R1CS (rank-1 constraint system) interface
Index ¶
- type R1CS
- type UntypedR1CS
- func (r1cs *UntypedR1CS) GetCurveID() gurvy.ID
- func (r1cs *UntypedR1CS) GetNbCoefficients() int
- func (r1cs *UntypedR1CS) GetNbConstraints() int
- func (r1cs *UntypedR1CS) GetNbWires() int
- func (r1cs *UntypedR1CS) IsSolved(solution map[string]interface{}) error
- func (r1cs *UntypedR1CS) ToR1CS(curveID gurvy.ID) R1CS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type R1CS ¶
type R1CS interface { io.CurveObject IsSolved(solution map[string]interface{}) error GetNbConstraints() int GetNbWires() int GetNbCoefficients() int }
R1CS represents a rank 1 constraint system it's underlying implementation is curve specific (i.e bn256/R1CS, ...)
type UntypedR1CS ¶
type UntypedR1CS struct { // Wires NbWires int NbPublicWires int // includes ONE wire NbSecretWires int SecretWires []string // private wire names PublicWires []string // public wire names Logs []backend.LogEntry DebugInfo []backend.LogEntry // Constraints NbConstraints int // total number of constraints NbCOConstraints int // number of constraints that need to be solved, the first of the Constraints slice Constraints []r1c.R1C Coefficients []big.Int }
UntypedR1CS decsribes a set of UntypedR1CS constraint The coefficients from the rank-1 constraint it contains are big.Int and not tied to a curve base field
func (*UntypedR1CS) GetCurveID ¶
func (r1cs *UntypedR1CS) GetCurveID() gurvy.ID
GetCurveID returns gurvy.UNKNOWN as this R1CS is Untyped and have big.Int coefficients
func (*UntypedR1CS) GetNbCoefficients ¶
func (r1cs *UntypedR1CS) GetNbCoefficients() int
GetNbCoefficients return the number of unique coefficients needed in the R1CS
func (*UntypedR1CS) GetNbConstraints ¶
func (r1cs *UntypedR1CS) GetNbConstraints() int
GetNbConstraints returns the number of constraints
func (*UntypedR1CS) GetNbWires ¶
func (r1cs *UntypedR1CS) GetNbWires() int
GetNbWires returns the number of wires
func (*UntypedR1CS) IsSolved ¶
func (r1cs *UntypedR1CS) IsSolved(solution map[string]interface{}) error
IsSolved call will panic as we can't solve a UntypedR1CS