permutation

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Overview

Package permutation provides an API to build permutation proofs.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrIncompatibleSize = errors.New("t1 and t2 should be of the same size")
	ErrSize             = errors.New("t1 and t2 should be of size a power of 2")
	ErrPermutationProof = errors.New("permutation proof verification failed")
	ErrGenerator        = errors.New("wrong generator")
)

Functions

func Verify

func Verify(vk kzg.VerifyingKey, proof Proof) error

Verify verifies a permutation proof.

Types

type Proof

type Proof struct {
	// contains filtered or unexported fields
}

Proof proof that the commitments of t1 and t2 come from the same vector but permuted.

func Prove

func Prove(pk kzg.ProvingKey, t1, t2 []fr.Element) (Proof, error)

Prove generates a proof that t1 and t2 are the same but permuted. The size of t1 and t2 should be the same and a power of 2.

Jump to

Keyboard shortcuts

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