zkproof

package
v0.0.0-...-202feaa Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseLookup

type BaseLookup interface {
	Base(name string) *big.Int
	Exp(ret *big.Int, name string, exp, P *big.Int) bool
	Names() []string
}

type BaseMerge

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

func NewBaseMerge

func NewBaseMerge(parts ...BaseLookup) BaseMerge

func (*BaseMerge) Base

func (b *BaseMerge) Base(name string) *big.Int

func (*BaseMerge) Exp

func (b *BaseMerge) Exp(ret *big.Int, name string, exp, P *big.Int) bool

func (*BaseMerge) Names

func (b *BaseMerge) Names() []string

type Group

type Group struct {
	P     *big.Int
	Order *big.Int
	G     *big.Int
	H     *big.Int

	GTable exptable.Table
	HTable exptable.Table

	PMod     common.FastMod
	OrderMod common.FastMod
}

func BuildGroup

func BuildGroup(prime *big.Int) (Group, bool)

func (*Group) Base

func (g *Group) Base(name string) *big.Int

func (*Group) Exp

func (g *Group) Exp(ret *big.Int, name string, exp, _ *big.Int) bool

func (*Group) Names

func (g *Group) Names() []string

type LhsContribution

type LhsContribution struct {
	Base  string
	Power *big.Int
}

type ProofLookup

type ProofLookup interface {
	ProofResult(name string) *big.Int
}

type ProofMerge

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

func NewProofMerge

func NewProofMerge(parts ...ProofLookup) ProofMerge

func (*ProofMerge) ProofResult

func (p *ProofMerge) ProofResult(name string) *big.Int

type QrRepresentationProofStructure

type QrRepresentationProofStructure RepresentationProofStructure

func (*QrRepresentationProofStructure) CommitmentsFromProof

func (s *QrRepresentationProofStructure) CommitmentsFromProof(pk *gabikeys.PublicKey, list []*big.Int, challenge *big.Int, bases BaseLookup, proofdata ProofLookup) []*big.Int

func (*QrRepresentationProofStructure) CommitmentsFromSecrets

func (s *QrRepresentationProofStructure) CommitmentsFromSecrets(pk *gabikeys.PublicKey, list []*big.Int, bases BaseLookup, secretdata SecretLookup) []*big.Int

type RepresentationProofStructure

type RepresentationProofStructure struct {
	Lhs []LhsContribution
	Rhs []RhsContribution
}

func (*RepresentationProofStructure) CommitmentsFromProof

func (s *RepresentationProofStructure) CommitmentsFromProof(g Group, list []*big.Int, challenge *big.Int, bases BaseLookup, proofdata ProofLookup) []*big.Int

func (*RepresentationProofStructure) CommitmentsFromSecrets

func (s *RepresentationProofStructure) CommitmentsFromSecrets(g Group, list []*big.Int, bases BaseLookup, secretdata SecretLookup) []*big.Int

func (*RepresentationProofStructure) IsTrue

func (s *RepresentationProofStructure) IsTrue(g Group, bases BaseLookup, secretdata SecretLookup) bool

func (*RepresentationProofStructure) NumCommitments

func (s *RepresentationProofStructure) NumCommitments() int

func (*RepresentationProofStructure) NumRangeProofs

func (s *RepresentationProofStructure) NumRangeProofs() int

type RhsContribution

type RhsContribution struct {
	Base   string
	Secret string
	Power  int64
}

type SecretLookup

type SecretLookup interface {
	Secret(name string) *big.Int
	Randomizer(name string) *big.Int
}

type SecretMerge

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

func NewSecretMerge

func NewSecretMerge(parts ...SecretLookup) SecretMerge

func (*SecretMerge) Randomizer

func (s *SecretMerge) Randomizer(name string) *big.Int

func (*SecretMerge) Secret

func (s *SecretMerge) Secret(name string) *big.Int

Jump to

Keyboard shortcuts

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