arnaucube
arnaucube/go-bellman-verifierPublic Self-hosted repository
go-bellman-verifier/README.md
README.mdRaw
 1# go-bellman-verifier [![Go Report Card](https://goreportcard.com/badge/github.com/arnaucube/go-bellman-verifier)](https://goreportcard.com/report/github.com/arnaucube/go-bellman-verifier)  [![Build Status](https://travis-ci.org/arnaucube/go-bellman-verifier.svg?branch=master)](https://travis-ci.org/arnaucube/go-bellman-verifier)
 2
 3Groth16 zkSNARK bellman proof verifier
 4
 5Verify [Groth16](https://eprint.iacr.org/2016/260.pdf) proofs generated from [bellman](https://github.com/zkcrypto/bellman), using [cloudflare/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.
 6
 7
 8## Usage
 9```go
10public, err := ParsePublicRaw(publicJson)
11require.Nil(t, err)
12proof, err := ParseProofRaw(proofJson)
13require.Nil(t, err)
14vk, err := ParseVkRaw(vkJson)
15require.Nil(t, err)
16
17v := Verify(vk, proof, public)
18assert.True(t, v)
19```
20