auditor

package
v0.0.0-...-950a2ea Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EpochIDHashBytes

func EpochIDHashBytes(epochID TypeEpochID) []byte

func EpochIDHashPoint

func EpochIDHashPoint(epochID TypeEpochID) kyber.Point

func EpochIDHashScalar

func EpochIDHashScalar(epochID TypeEpochID) kyber.Scalar

func EpochIDHashString

func EpochIDHashString(epochID TypeEpochID) string

func IDHashBytes

func IDHashBytes(id TypeID) []byte

func IDHashPoint

func IDHashPoint(id TypeID) kyber.Point

func IDHashScalar

func IDHashScalar(id TypeID) kyber.Scalar

func IDHashString

func IDHashString(id TypeID) string

Types

type Auditor

type Auditor struct {
	ID            TypeID
	AuditedOrgIDs []clolcorg.TypeID

	EpochID TypeEpochID
	// contains filtered or unexported fields
}

func New

func New(id string, organizations []*clolcorg.Organization) *Auditor

func (*Auditor) AccumulateCommitments

func (a *Auditor) AccumulateCommitments(
	orgID clolcorg.TypeID, txList []*transaction.LocalHidden,
) (kyber.Point, error)

func (*Auditor) CheckResultConsistency

func (a *Auditor) CheckResultConsistency(res, B, txRes, txB kyber.Point) bool

func (*Auditor) ComputeB

func (a *Auditor) ComputeB(orgTXRandList, comTXRandList []kyber.Scalar) (kyber.Point, error)

func (*Auditor) ComputeC

func (a *Auditor) ComputeC(res, A kyber.Point) kyber.Point

func (*Auditor) ComputeCETransactionID

func (a *Auditor) ComputeCETransactionID(
	orgID clolcorg.TypeID, counterPartyIDHash string,
) ([]byte, error)

func (*Auditor) ComputeD

func (a *Auditor) ComputeD(pointA, pointB kyber.Point) kyber.Point

func (*Auditor) DecryptResAndB

func (a *Auditor) DecryptResAndB(orgIDHash string,
	tx *transaction.AudOnChain) (kyber.Point, kyber.Point, error)

func (*Auditor) EncryptConsistencyExamResult

func (a *Auditor) EncryptConsistencyExamResult(
	orgID clolcorg.TypeID, counterPartyIDHash string,
	res, pointB, pointC, pointD kyber.Point, publicKey kyber.Point,
) (*transaction.AudPlain, error)

func (*Auditor) GetEpochTXRandomness

func (a *Auditor) GetEpochTXRandomness(orgID1, orgID2 clolcorg.TypeID) []kyber.Scalar

func (*Auditor) SetEpochID

func (a *Auditor) SetEpochID(id []byte)

func (*Auditor) SetEpochOrgIDMap

func (a *Auditor) SetEpochOrgIDMap(idMap map[clolcorg.TypeID]clolcorg.TypeEpochID)

func (*Auditor) SetEpochSecretKey

func (a *Auditor) SetEpochSecretKey(orgSecretKeyMap map[string]crypto.TypePrivateKey)

func (*Auditor) SetEpochTXRandomness

func (a *Auditor) SetEpochTXRandomness(txRandMap map[[2]string][]kyber.Scalar)

type TypeEpochID

type TypeEpochID []byte

type TypeID

type TypeID string

Jump to

Keyboard shortcuts

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