dkg

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deal

type Deal struct {
	// index of the dealer, the issuer of the share
	Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
	// encrypted version of the deal
	Deal *vss.EncryptedDeal `protobuf:"bytes,2,opt,name=deal,proto3" json:"deal,omitempty"`
	// signature of the whole deal
	// NOTE: this is almost duplicated data, since the vss deal already includes
	// a signature. However it does not include the index of the dealer that
	// issue this deal, so another one is required. Best would be to merge vss
	// and dkg so we could use only one field of signature. For future work...
	// :)
	Signature            []byte   `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Deal contains a share for a participant.

func (*Deal) Descriptor

func (*Deal) Descriptor() ([]byte, []int)

func (*Deal) GetDeal

func (m *Deal) GetDeal() *vss.EncryptedDeal

func (*Deal) GetIndex

func (m *Deal) GetIndex() uint32

func (*Deal) GetSignature

func (m *Deal) GetSignature() []byte

func (*Deal) ProtoMessage

func (*Deal) ProtoMessage()

func (*Deal) Reset

func (m *Deal) Reset()

func (*Deal) String

func (m *Deal) String() string

func (*Deal) XXX_DiscardUnknown

func (m *Deal) XXX_DiscardUnknown()

func (*Deal) XXX_Marshal

func (m *Deal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Deal) XXX_Merge

func (dst *Deal) XXX_Merge(src proto.Message)

func (*Deal) XXX_Size

func (m *Deal) XXX_Size() int

func (*Deal) XXX_Unmarshal

func (m *Deal) XXX_Unmarshal(b []byte) error

type Justification

type Justification struct {
	// index of the dealer who is issuing this justification
	Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
	// justification from the dealer
	Justification        *vss.Justification `protobuf:"bytes,2,opt,name=justification,proto3" json:"justification,omitempty"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

Justification holds the justification from a dealer after a participant issued a complaint response because of a supposedly invalid deal.

func (*Justification) Descriptor

func (*Justification) Descriptor() ([]byte, []int)

func (*Justification) GetIndex

func (m *Justification) GetIndex() uint32

func (*Justification) GetJustification

func (m *Justification) GetJustification() *vss.Justification

func (*Justification) ProtoMessage

func (*Justification) ProtoMessage()

func (*Justification) Reset

func (m *Justification) Reset()

func (*Justification) String

func (m *Justification) String() string

func (*Justification) XXX_DiscardUnknown

func (m *Justification) XXX_DiscardUnknown()

func (*Justification) XXX_Marshal

func (m *Justification) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Justification) XXX_Merge

func (dst *Justification) XXX_Merge(src proto.Message)

func (*Justification) XXX_Size

func (m *Justification) XXX_Size() int

func (*Justification) XXX_Unmarshal

func (m *Justification) XXX_Unmarshal(b []byte) error

type Packet

type Packet struct {
	Deal                 *Deal          `protobuf:"bytes,1,opt,name=deal,proto3" json:"deal,omitempty"`
	Response             *Response      `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"`
	Justification        *Justification `protobuf:"bytes,3,opt,name=justification,proto3" json:"justification,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

Packet is a wrapper around the three different types of DKG messages

func (*Packet) Descriptor

func (*Packet) Descriptor() ([]byte, []int)

func (*Packet) GetDeal

func (m *Packet) GetDeal() *Deal

func (*Packet) GetJustification

func (m *Packet) GetJustification() *Justification

func (*Packet) GetResponse

func (m *Packet) GetResponse() *Response

func (*Packet) ProtoMessage

func (*Packet) ProtoMessage()

func (*Packet) Reset

func (m *Packet) Reset()

func (*Packet) String

func (m *Packet) String() string

func (*Packet) XXX_DiscardUnknown

func (m *Packet) XXX_DiscardUnknown()

func (*Packet) XXX_Marshal

func (m *Packet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Packet) XXX_Merge

func (dst *Packet) XXX_Merge(src proto.Message)

func (*Packet) XXX_Size

func (m *Packet) XXX_Size() int

func (*Packet) XXX_Unmarshal

func (m *Packet) XXX_Unmarshal(b []byte) error

type Response

type Response struct {
	// index of the dealer for which this response is for
	Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
	// response from the participant which received a deal
	Response             *vss.Response `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

Response holds the response that a participant broadcast after having received a deal.

func (*Response) Descriptor

func (*Response) Descriptor() ([]byte, []int)

func (*Response) GetIndex

func (m *Response) GetIndex() uint32

func (*Response) GetResponse

func (m *Response) GetResponse() *vss.Response

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) String

func (m *Response) String() string

func (*Response) XXX_DiscardUnknown

func (m *Response) XXX_DiscardUnknown()

func (*Response) XXX_Marshal

func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Response) XXX_Merge

func (dst *Response) XXX_Merge(src proto.Message)

func (*Response) XXX_Size

func (m *Response) XXX_Size() int

func (*Response) XXX_Unmarshal

func (m *Response) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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