mirror of
https://github.com/arnaucube/go-snark-study.git
synced 2026-02-02 17:26:41 +01:00
add rho's for proof keys and verification keys calculation, Vk.IC, add alphas input soundness when generating trusted setup
This commit is contained in:
@@ -131,6 +131,9 @@ func (circ *Circuit) GenerateR1CS() ([][]*big.Int, [][]*big.Int, [][]*big.Int) {
|
||||
c = append(c, cConstraint)
|
||||
|
||||
}
|
||||
circ.R1CS.A = a
|
||||
circ.R1CS.B = b
|
||||
circ.R1CS.C = c
|
||||
return a, b, c
|
||||
}
|
||||
|
||||
@@ -144,6 +147,11 @@ func grabVar(signals []string, w []*big.Int, vStr string) *big.Int {
|
||||
}
|
||||
}
|
||||
|
||||
type Inputs struct {
|
||||
Private []*big.Int
|
||||
Publics []*big.Int
|
||||
}
|
||||
|
||||
// CalculateWitness calculates the Witness of a Circuit based on the given inputs
|
||||
func (circ *Circuit) CalculateWitness(inputs []*big.Int) ([]*big.Int, error) {
|
||||
if len(inputs) != len(circ.Inputs) {
|
||||
|
||||
Reference in New Issue
Block a user