mirror of
https://github.com/arnaucube/go-circom-prover-verifier.git
synced 2026-02-06 19:06:43 +01:00
d5c971e59a85c1c08123940443f9a1d7b67c6d48
go-circom-prover

Experimental Go implementation of the Groth16 protocol zkSNARK prover compatible with circom.
Using bn256 (used by go-ethereum) for the Pairing curve operations.
Example
// read ProvingKey & Witness files
provingKeyJson, _ := ioutil.ReadFile("testdata/provingkey.json")
witnessJson, _ := ioutil.ReadFile("testdata/witness.json")
// parse Proving Key
pk, _ := circomprover.ParseProvingKey(provingKeyJson)
// parse Witness
w, _ := circomprover.ParseWitness(witnessJson)
// generate the proof
proof, pubSignals, err := circomprover.GenerateProof(pk, w)
assert.Nil(t, err)
fmt.Println(pubSignals)
fmt.Println(proof)
Languages
Go
100%