types

package
Version: v0.0.0-...-1c2a880 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Q, _ = new(big.Int).SetString(
	"21888242871839275222246405745257275088696311157297823662689037894645226208583", 10)

Q is the order of the integer field (Zq) that fits inside the snark

View Source
var R, _ = new(big.Int).SetString(
	"21888242871839275222246405745257275088548364400416034343698204186575808495617", 10)

R is the mod of the finite field

Functions

This section is empty.

Types

type Pk

type Pk struct {
	A          []*bn256.G1
	B2         []*bn256.G2
	B1         []*bn256.G1
	C          []*bn256.G1
	NVars      int
	NPublic    int
	VkAlpha1   *bn256.G1
	VkDelta1   *bn256.G1
	VkBeta1    *bn256.G1
	VkBeta2    *bn256.G2
	VkDelta2   *bn256.G2
	HExps      []*bn256.G1
	DomainSize int
	PolsA      []map[int]*big.Int
	PolsB      []map[int]*big.Int
}

Pk holds the data structure of the ProvingKey

type Proof

type Proof struct {
	A *bn256.G1
	B *bn256.G2
	C *bn256.G1
}

Proof is the data structure of the Groth16 zkSNARK proof

func (Proof) MarshalJSON

func (p Proof) MarshalJSON() ([]byte, error)

MarshalJSON implements the JSON marshaler for Proof type

func (*Proof) UnmarshalJSON

func (p *Proof) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the JSON unmarshaler for Proof type

type Vk

type Vk struct {
	Alpha *bn256.G1
	Beta  *bn256.G2
	Gamma *bn256.G2
	Delta *bn256.G2
	IC    []*bn256.G1
}

Vk is the Verification Key data structure

type Witness

type Witness []*big.Int

Witness contains the witness

Source Files

Jump to

Keyboard shortcuts

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