You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
925 B

  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. Groth16 zkSNARK bellman proof verifier
  3. Verify [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.
  4. ## Usage
  5. ```go
  6. public, err := ParsePublicRaw(publicJson)
  7. require.Nil(t, err)
  8. proof, err := ParseProofRaw(proofJson)
  9. require.Nil(t, err)
  10. vk, err := ParseVkRaw(vkJson)
  11. require.Nil(t, err)
  12. v := Verify(vk, proof, public)
  13. assert.True(t, v)
  14. ```