oneoutofmany

package
v0.0.0-...-7ece11e Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Global instant to use

Functions

This section is empty.

Types

type OneOutOfManyProof

type OneOutOfManyProof struct {
	Statement *OneOutOfManyStatement
	// contains filtered or unexported fields
}

Statement's proof

func (OneOutOfManyProof) Bytes

func (proof OneOutOfManyProof) Bytes() []byte

Bytes converts one of many proof to bytes array

func (*OneOutOfManyProof) Init

func (proof *OneOutOfManyProof) Init() *OneOutOfManyProof

func (*OneOutOfManyProof) Set

func (proof *OneOutOfManyProof) Set(
	commitments []*operation.Point,
	cl, ca, cb, cd []*operation.Point,
	f, za, zb []*operation.Scalar,
	zd *operation.Scalar)

Set sets Proof

func (*OneOutOfManyProof) SetBytes

func (proof *OneOutOfManyProof) SetBytes(bytes []byte) error

SetBytes converts an array of bytes to an object of OneOutOfManyProof

func (OneOutOfManyProof) ValidateSanity

func (proof OneOutOfManyProof) ValidateSanity() bool

func (OneOutOfManyProof) Verify

func (proof OneOutOfManyProof) Verify() (bool, error)

Verify verifies a proof output by Prove

func (OneOutOfManyProof) VerifyOld

func (proof OneOutOfManyProof) VerifyOld() (bool, error)

Verify verifies a proof output by Prove

type OneOutOfManyStatement

type OneOutOfManyStatement struct {
	Commitments []*operation.Point
}

Statement to be proved

func (*OneOutOfManyStatement) Set

func (stmt *OneOutOfManyStatement) Set(commitments []*operation.Point)

Set sets Statement

type OneOutOfManyWitness

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

Statement's witness

func (OneOutOfManyWitness) Prove

Prove produces a proof for the statement

func (*OneOutOfManyWitness) Set

func (wit *OneOutOfManyWitness) Set(commitments []*operation.Point, rand *operation.Scalar, indexIsZero uint64)

Set sets Witness

type OneoutofmanyLogger

type OneoutofmanyLogger struct {
	Log common.Logger
}

func (*OneoutofmanyLogger) Init

func (logger *OneoutofmanyLogger) Init(inst common.Logger)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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