groth16_bls24315

package
v0.0.0-...-ae8e47d Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package groth16_bls24315 provides a ZKP-circuit function to verify BLS24-315 Groth16 inside a BW6-633 circuit.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Verify

func Verify(api frontend.API, vk VerifyingKey, proof Proof, publicInputs []frontend.Variable)

Verify implements the verification function of Groth16. Notation follows Figure 4. in DIZK paper https://eprint.iacr.org/2018/691.pdf publicInputs do NOT contain the ONE_WIRE

Types

type Proof

type Proof struct {
	Ar, Krs sw_bls24315.G1Affine
	Bs      sw_bls24315.G2Affine
}

Proof represents a Groth16 proof Notation follows Figure 4. in DIZK paper https://eprint.iacr.org/2018/691.pdf

type VerifyingKey

type VerifyingKey struct {
	// e(α, β)
	E fields_bls24315.E24

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

	// [Kvk]1
	G1 struct {
		K []sw_bls24315.G1Affine // The indexes correspond to the public wires
	}
}

VerifyingKey represents a Groth16 verifying key Notation follows Figure 4. in DIZK paper https://eprint.iacr.org/2018/691.pdf

func (*VerifyingKey) Assign

func (vk *VerifyingKey) Assign(_ovk groth16.VerifyingKey)

Assign values to the "in-circuit" VerifyingKey from a "out-of-circuit" VerifyingKey

Jump to

Keyboard shortcuts

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