groth16

package
v0.3.0-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Verify

func Verify(cs *frontend.ConstraintSystem, pairingInfo sw.PairingContext, innerVk VerifyingKey, innerProof Proof, innerPubInputs []frontend.Variable)

Verify implements the verification function of groth16. pubInputNames should what r1cs.PublicInputs() outputs for the inner r1cs. It creates public circuits input, corresponding to the pubInputNames slice. Notations and naming are from https://eprint.iacr.org/2020/278.

Types

type Proof

type Proof struct {
	Ar, Krs sw.G1Affine // πA, πC in https://eprint.iacr.org/2020/278.pdf
	Bs      sw.G2Affine // πB in https://eprint.iacr.org/2020/278.pdf
}

Proof represents a groth16 proof in a r1cs

type VerifyingKey

type VerifyingKey struct {

	// e(α, β)
	E fields.E12

	// -[γ]2, -[δ]2
	G2 struct {
		GammaNeg, DeltaNeg sw.G2Affine
	}

	// [Kvk]1 (part of the verifying key yielding psi0, cf https://eprint.iacr.org/2020/278.pdf)
	G1 []sw.G1Affine // The indexes correspond to the public wires
}

VerifyingKey represents the groth16 verifying key in a r1cs

Jump to

Keyboard shortcuts

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