oneoutofmany

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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 []*privacy.Point,
	cl, ca, cb, cd []*privacy.Point,
	f, za, zb []*privacy.Scalar,
	zd *privacy.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

type OneOutOfManyStatement

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

Statement to be proved

func (*OneOutOfManyStatement) Set

func (stmt *OneOutOfManyStatement) Set(commitments []*privacy.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 []*privacy.Point, rand *privacy.Scalar, indexIsZero uint64)

Set sets Witness

Jump to

Keyboard shortcuts

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