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() uint64
- func (r1cs *UntypedR1CS) GetNbWires() uint64
- func (r1cs *UntypedR1CS) IsSolved(solution map[string]interface{}) error
- func (r1cs *UntypedR1CS) ReadFrom(r io.Reader) (n int64, err error)
- func (r1cs *UntypedR1CS) ToR1CS(curveID gurvy.ID) R1CS
- func (r1cs *UntypedR1CS) WriteTo(w io.Writer) (n int64, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type R1CS ¶
type R1CS interface { io.WriterTo io.ReaderFrom IsSolved(solution map[string]interface{}) error GetNbConstraints() uint64 GetNbWires() uint64 GetNbCoefficients() int GetCurveID() gurvy.ID }
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 uint64 NbPublicWires uint64 // includes ONE wire NbSecretWires uint64 SecretWires []string // private wire names PublicWires []string // public wire names Logs []backend.LogEntry DebugInfo []backend.LogEntry // Constraints NbConstraints uint64 // total number of constraints NbCOConstraints uint64 // 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 is a untyped R1CS using big.Int
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() uint64
GetNbConstraints returns the number of constraints
func (*UntypedR1CS) GetNbWires ¶
func (r1cs *UntypedR1CS) GetNbWires() uint64
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
func (*UntypedR1CS) ReadFrom ¶ added in v0.3.6
func (r1cs *UntypedR1CS) ReadFrom(r io.Reader) (n int64, err error)
ReadFrom panics (can't deserialize untyped R1CS)