mpcsetup

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package mpcsetup provides tools for multiparty setup ceremonies for various protocols, based on the MMPORPG paper https://eprint.iacr.org/2017/1050.pdf

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeaconContributions

func BeaconContributions(hash, dst, beaconChallenge []byte, n int) []fr.Element

BeaconContributions provides a reproducible slice of field elements used for the final update in a multiparty setup ceremony. beaconChallenge is a publicly checkable value at time t, of moderate entropy to any party before time t.

func SameRatioMany

func SameRatioMany(slices ...any) error

SameRatioMany proves that all input slices are geometric sequences with the same ratio. All slices must be of length at least 2. There must be slices in each group 𝔾₁, 𝔾₂. Caller must ensure that in one group, there is a slice with a non-penultimate non-zero element and in the other, there is a slice with a non-zero element

func UpdateMonomialsG1

func UpdateMonomialsG1(A []curve.G1Affine, r *fr.Element)

UpdateMonomialsG1 A[i] <- r^i.A[i]

func UpdateMonomialsG2

func UpdateMonomialsG2(A []curve.G1Affine, r *fr.Element)

UpdateMonomialsG2 A[i] <- r^i.A[i]

Types

type UpdateProof

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

func UpdateValues

func UpdateValues(contributionValue *fr.Element, challenge []byte, dst byte, representations ...any) UpdateProof

UpdateValues scales g1 and g2 representations by the given contribution value and provides a proof of update correctness. If the provided contribution value is zero, it will be randomized.

func (*UpdateProof) ReadFrom

func (x *UpdateProof) ReadFrom(reader io.Reader) (n int64, err error)

ReadFrom implements io.ReaderFrom

func (*UpdateProof) Verify

func (x *UpdateProof) Verify(challenge []byte, dst byte, representations ...ValueUpdate) error

Verify that the updates to representations are consistent with the contribution in x. Verify does not subgroup check the representations.

func (*UpdateProof) WriteTo

func (x *UpdateProof) WriteTo(writer io.Writer) (n int64, err error)

WriteTo implements io.WriterTo

type ValueUpdate

type ValueUpdate struct {
	Previous, Next any
}

Jump to

Keyboard shortcuts

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