oneoutofmany

package
v1.0.1-beta Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: MIT Imports: 6 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
}

OneOutOfManyProof represents an one-of-many proof proving that among a list of commitments, there exists one commitment that commits to 0. It is used to hide the real input coin among a list of input coins.

func (OneOutOfManyProof) Bytes

func (proof OneOutOfManyProof) Bytes() []byte

Bytes returns the byte-representation of an OneOutOfManyProof.

func (*OneOutOfManyProof) Init

func (proof *OneOutOfManyProof) Init() *OneOutOfManyProof

Init creates an empty OneOutOfManyProof.

func (*OneOutOfManyProof) Set

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

Set sets data to an OneOutOfManyProof.

func (*OneOutOfManyProof) SetBytes

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

SetBytes set raw-data to an OneOutOfManyProof.

type OneOutOfManyStatement

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

OneOutOfManyStatement represents the statement of an OneOutOfManyProof.

func (*OneOutOfManyStatement) Set

func (stmt *OneOutOfManyStatement) Set(v []*crypto.Point)

Set sets data to an OneOutOfManyStatement.

type OneOutOfManyWitness

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

OneOutOfManyWitness represents a witness to an OneOutOfManyProof.

func (OneOutOfManyWitness) Prove

Prove produces an OneOutOfManyProof from an OneOutOfManyWitness.

func (*OneOutOfManyWitness) Set

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

Set sets data to an OneOutOfManyWitness.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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