Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
gbotrel committed Feb 13, 2022
2 parents 9b9e3b5 + 4aa4a61 commit 75c6c94
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,13 @@ ccs, err := frontend.Compile(ecc.BN254, backend.GROTH16, &circuit)
pk, vk, err := groth16.Setup(ccs)

// witness definition
witness := CubicCircuit{X: 3, Y: 35}
assignment := CubicCircuit{X: 3, Y: 35}
witness, err := frontend.NewWitness(&assignment, ecc.BN254)
publicWitness, _ := witness.Public()

// groth16: Prove & Verify
proof, err := groth16.Prove(ccs, pk, &witness)
err := groth16.Verify(proof, vk, &witness)
proof, err := groth16.Prove(ccs, pk, witness)
err := groth16.Verify(proof, vk, publicWitness)
```


Expand Down

0 comments on commit 75c6c94

Please sign in to comment.