dkg

package
v0.0.0-...-ee95d54 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BLSKeyring

type BLSKeyring struct {
	PubPoly *share.PubPoly
	Share   *share.PriShare
}

BLSKeyring contains private and public part of reconstructed DKG master key

func LoadBLSKeyringFromBytes

func LoadBLSKeyringFromBytes(suite vss.Suite, data []byte) (*BLSKeyring, error)

LoadBLSKeyringFromBytes decode the form generated by Bytes()

func LoadPubPolyBLSKeyringFromBytes

func LoadPubPolyBLSKeyringFromBytes(suite vss.Suite, data []byte) (*BLSKeyring, error)

LoadPubPolyBLSKeyringFromBytes decode the form generated by PubPolyBytes()

func (*BLSKeyring) Bytes

func (b *BLSKeyring) Bytes() ([]byte, error)

Bytes encodes a BLSKeyring into a binary form and returns the result.

func (*BLSKeyring) PubPolyBytes

func (b *BLSKeyring) PubPolyBytes() ([]byte, error)

PubPolyBytes encodes a BLSKeyring's PubPoly into a binary form and returns the result.

type DKG

type DKG struct {
	sync.Mutex

	ParticipantID int

	N         int
	Threshold int
	// contains filtered or unexported fields
}

DKG is the type that maintains all active DKG instances and data.

func Init

func Init(suite vss.Suite, pubKey kyber.Point, secKey kyber.Scalar) *DKG

func (*DKG) Equals

func (d *DKG) Equals(other *DKG) error

func (*DKG) GetBLSKeyring

func (d *DKG) GetBLSKeyring() (*BLSKeyring, error)

func (*DKG) GetCommits

func (d *DKG) GetCommits() []kyber.Point

func (*DKG) GetDeals

func (d *DKG) GetDeals() (map[int]*dkg.Deal, error)

func (*DKG) GetDistKeyShare

func (d *DKG) GetDistKeyShare() (*dkg.DistKeyShare, error)

func (*DKG) GetDistributedPublicKey

func (d *DKG) GetDistributedPublicKey() (kyber.Point, error)

func (*DKG) GetPKByIndex

func (d *DKG) GetPKByIndex(index int) kyber.Point

func (*DKG) GetParticipantByIndex

func (d *DKG) GetParticipantByIndex(index int) string

func (*DKG) GetPubKey

func (d *DKG) GetPubKey() kyber.Point

func (*DKG) GetPubKeyByParticipant

func (d *DKG) GetPubKeyByParticipant(participant string) (kyber.Point, error)

func (*DKG) GetSecKey

func (d *DKG) GetSecKey() kyber.Scalar

func (*DKG) InitDKGInstance

func (d *DKG) InitDKGInstance(seed []byte) (err error)

func (*DKG) ProcessDeals

func (d *DKG) ProcessDeals() ([]*dkg.Response, error)

func (*DKG) ProcessResponses

func (d *DKG) ProcessResponses() error

func (*DKG) StoreCommits

func (d *DKG) StoreCommits(participant string, commits []kyber.Point)

func (*DKG) StoreDeal

func (d *DKG) StoreDeal(participant string, deal *dkg.Deal)

func (*DKG) StorePubKey

func (d *DKG) StorePubKey(participant string, pid int, pk kyber.Point) bool

func (*DKG) StoreResponses

func (d *DKG) StoreResponses(participant string, responses []*dkg.Response)

type ExportedSignatureEntity

type ExportedSignatureEntity struct {
	Payload   []byte `json:"payload_base64"`
	Signature []byte `json:"signature"`
	File      string `json:"file"`
}

type ExportedSignatures

type ExportedSignatures map[string]ExportedSignatureEntity

type PK2Participant

type PK2Participant struct {
	ParticipantID int
	Participant   string
	PK            kyber.Point
}

type PKStore

type PKStore []*PK2Participant

func (*PKStore) Add

func (s *PKStore) Add(newPk *PK2Participant) bool

func (PKStore) GetPKByIndex

func (s PKStore) GetPKByIndex(index int) kyber.Point

func (PKStore) GetPKByParticipant

func (s PKStore) GetPKByParticipant(p string) (kyber.Point, error)

func (PKStore) GetPKs

func (s PKStore) GetPKs() []kyber.Point

func (PKStore) GetParticipantByIndex

func (s PKStore) GetParticipantByIndex(index int) string

func (PKStore) Len

func (s PKStore) Len() int

func (PKStore) Less

func (s PKStore) Less(i, j int) bool

func (PKStore) Swap

func (s PKStore) Swap(i, j int)

Jump to

Keyboard shortcuts

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