go-circom-prover-verifier/types/types.go
types/types.goRaw
1package types
2
3import (
4 "math/big"
5
6 bn256 "github.com/ethereum/go-ethereum/crypto/bn256/cloudflare"
7)
8
9// Proof is the data structure of the Groth16 zkSNARK proof
10type Proof struct {
11 A *bn256.G1
12 B *bn256.G2
13 C *bn256.G1
14}
15
16// Pk holds the data structure of the ProvingKey
17type Pk struct {
18 A []*bn256.G1
19 B2 []*bn256.G2
20 B1 []*bn256.G1
21 C []*bn256.G1
22 NVars int
23 NPublic int
24 VkAlpha1 *bn256.G1
25 VkDelta1 *bn256.G1
26 VkBeta1 *bn256.G1
27 VkBeta2 *bn256.G2
28 VkDelta2 *bn256.G2
29 HExps []*bn256.G1
30 DomainSize int
31 PolsA []map[int]*big.Int
32 PolsB []map[int]*big.Int
33 PolsC []map[int]*big.Int
34}
35
36// Witness contains the witness
37type Witness []*big.Int
38
39// Vk is the Verification Key data structure
40type Vk struct {
41 Alpha *bn256.G1
42 Beta *bn256.G2
43 Gamma *bn256.G2
44 Delta *bn256.G2
45 IC []*bn256.G1
46}