externalVerif

package
v0.0.0-...-735e08d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

README

go-snark-study /externalVerif

Utilities to verify zkSNARK proofs generated by other tools.

Verify Proof generated from snarkjs

Is possible with go-snark-study to verify proofs generated by snarkjs

Example:

verified, err := VerifyFromCircom("circom-test/verification_key.json", "circom-test/proof.json", "circom-test/public.json")
assert.Nil(t, err)
assert.True(t, verified)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VerifyFromCircom

func VerifyFromCircom(vkPath, proofPath, publicSignalsPath string) (bool, error)

Types

type CircomProof

type CircomProof struct {
	PiA [3]string    `json:"pi_a"`
	PiB [3][2]string `json:"pi_b"`
	PiC [3]string    `json:"pi_c"`
}

type CircomVk

type CircomVk struct {
	IC          [][3]string     `json:"IC"`
	Alpha1      [3]string       `json:"vk_alfa_1"`
	Beta2       [3][2]string    `json:"vk_beta_2"`
	Gamma2      [3][2]string    `json:"vk_gamma_2"`
	Delta2      [3][2]string    `json:"vk_delta_2"`
	AlphaBeta12 [2][3][2]string `json:"vk_alpfabeta_12"` // not really used, for the moment in go-snarks calculed in verification time
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL