pairing_bls12381

package
v0.0.0-...-089d231 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ark

func Ark(api frontend.API, in []frontend.Variable, c []*big.Int, r int) []frontend.Variable

func Mix

func Mix(api frontend.API, in []frontend.Variable, m [][]*big.Int) []frontend.Variable

func MixLast

func MixLast(api frontend.API, in []frontend.Variable, m [][]*big.Int, s int) frontend.Variable

func MixS

func MixS(api frontend.API, in []frontend.Variable, s []*big.Int, r int) []frontend.Variable

func NewPoseidonHash

func NewPoseidonHash(api frontend.API) hash.FieldHasher

func POSEIDON_C

func POSEIDON_C(t int) []*big.Int

func POSEIDON_M

func POSEIDON_M(t int) [][]*big.Int

func POSEIDON_P

func POSEIDON_P(t int) [][]*big.Int

func POSEIDON_S

func POSEIDON_S(t int) []*big.Int

func PoseidonEx

func PoseidonEx(api frontend.API, inputs []frontend.Variable, initialState frontend.Variable, nOuts int) []frontend.Variable

func Sigma

Types

type G1Affine

func NewG1Affine

func NewG1Affine(v bls12381.G1Affine) G1Affine

type Pairing

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

func NewPairing

func NewPairing(api frontend.API) (*Pairing, error)

func (Pairing) AddG1Points

func (pr Pairing) AddG1Points(p, q *G1Affine) *G1Affine

func (Pairing) AggregatePublicKeys_Rotate

func (pr Pairing) AggregatePublicKeys_Rotate(
	publicKeys [10]G1Affine,
	bitlist [10]frontend.Variable,
	G1One G1Affine,
) G1Affine

func (Pairing) CalculateTrustedWeight

func (pr Pairing) CalculateTrustedWeight(pubKeys_old, pubKeys_new [10]G1Affine, BitList_new, oldWeights [10]frontend.Variable, oldBitlist [10]frontend.Variable,
	intersectionBitlist [10]frontend.Variable) frontend.Variable

func (Pairing) Check

func (pr Pairing) Check(a, b frontend.Variable) error

func (Pairing) CompareAggregatedPubKeys

func (pr Pairing) CompareAggregatedPubKeys(apk0 G1Affine, apk1 G1Affine, G1One G1Affine)

func (Pairing) ComputeAPKCommitment

func (pr Pairing) ComputeAPKCommitment(
	pubKeys [10]G1Affine,
	quorumW [10]frontend.Variable,
) frontend.Variable

func (Pairing) DoublePointG1

func (pr Pairing) DoublePointG1(p *G1Affine) *G1Affine

func (*Pairing) Poseidon

func (m *Pairing) Poseidon(inputs []frontend.Variable) frontend.Variable

func (*Pairing) Reset

func (m *Pairing) Reset()

func (*Pairing) Sum

func (m *Pairing) Sum() frontend.Variable

func (*Pairing) Write

func (m *Pairing) Write(data ...frontend.Variable)

Jump to

Keyboard shortcuts

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