arnaucube bed1a652c9 | 4 years ago | |
---|---|---|
testdata | 4 years ago | |
.travis.yml | 4 years ago | |
LICENSE | 4 years ago | |
README.md | 4 years ago | |
go.mod | 4 years ago | |
go.sum | 4 years ago | |
verifier.go | 4 years ago | |
verifier_test.go | 4 years ago |
Groth16 zkSNARK bellman proof verifier
Verify Groth16 proofs generated from bellman, using cloudflare/bn256 (used by go-ethereum) for the Pairing.
public, err := ParsePublicRaw(publicJson)
require.Nil(t, err)
proof, err := ParseProofRaw(proofJson)
require.Nil(t, err)
vk, err := ParseVkRaw(vkJson)
require.Nil(t, err)
v := Verify(vk, proof, public)
assert.True(t, v)