mirror of
https://github.com/arnaucube/go-circom-prover-verifier.git
synced 2026-02-08 11:56:39 +01:00
Update exposed methods, update README.md, add godoc & goreport cards
This commit is contained in:
27
README.md
27
README.md
@@ -1,5 +1,26 @@
|
||||
# go-circom-prover
|
||||
Experimental Go zkSNARK prover compatible with [circom](https://github.com/iden3/circom).
|
||||
# go-circom-prover [](https://godoc.org/github.com/iden3/go-circom-prover) [](https://goreportcard.com/report/github.com/iden3/go-circom-prover)
|
||||
|
||||
Experimental Go implementation of the [Groth16 protocol](https://eprint.iacr.org/2016/260.pdf) zkSNARK prover compatible with [circom](https://github.com/iden3/circom).
|
||||
|
||||
|
||||
Using [bn256](https://github.com/ethereum/go-ethereum/tree/master/crypto/bn256/cloudflare) (used by [go-ethereum](https://github.com/ethereum/go-ethereum)) for the Pairing.
|
||||
Using [bn256](https://github.com/ethereum/go-ethereum/tree/master/crypto/bn256/cloudflare) (used by [go-ethereum](https://github.com/ethereum/go-ethereum)) for the Pairing curve operations.
|
||||
|
||||
### Example
|
||||
|
||||
```go
|
||||
// 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)
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user