permutation

package
v0.0.0-...-69a8e72 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

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(srs *kzg.SRS, 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(srs *kzg.SRS, 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