dkg

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: Apache-2.0, MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_crypto_dkg_dkg_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Deal

type Deal struct {
	ShareIndex uint32 `protobuf:"varint,1,opt,name=share_index,json=shareIndex,proto3" json:"share_index,omitempty"`
	// encryption of the share using ECIES
	EncryptedShare []byte `protobuf:"bytes,2,opt,name=encrypted_share,json=encryptedShare,proto3" json:"encrypted_share,omitempty"`
	// contains filtered or unexported fields
}

Deal contains a share for a participant.

func (*Deal) Descriptor deprecated

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

Deprecated: Use Deal.ProtoReflect.Descriptor instead.

func (*Deal) GetEncryptedShare added in v0.9.0

func (x *Deal) GetEncryptedShare() []byte

func (*Deal) GetShareIndex added in v0.9.0

func (x *Deal) GetShareIndex() uint32

func (*Deal) ProtoMessage

func (*Deal) ProtoMessage()

func (*Deal) ProtoReflect added in v1.0.0

func (x *Deal) ProtoReflect() protoreflect.Message

func (*Deal) Reset

func (x *Deal) Reset()

func (*Deal) String

func (x *Deal) String() string

type DealBundle added in v0.9.0

type DealBundle struct {

	// Index of the dealer that issues these deals
	DealerIndex uint32 `protobuf:"varint,1,opt,name=dealer_index,json=dealerIndex,proto3" json:"dealer_index,omitempty"`
	// Coefficients of the public polynomial that is created from the
	// private polynomial from which the shares are derived.
	Commits [][]byte `protobuf:"bytes,2,rep,name=commits,proto3" json:"commits,omitempty"`
	// list of deals for each individual share holders.
	Deals []*Deal `protobuf:"bytes,3,rep,name=deals,proto3" json:"deals,omitempty"`
	// session identifier of the protocol run
	SessionId []byte `protobuf:"bytes,4,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	// signature over the hash of the deal
	Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

DealBundle is a packet issued by a dealer that contains each individual deals, as well as the coefficients of the public polynomial he used.

func (*DealBundle) Descriptor deprecated added in v0.9.0

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

Deprecated: Use DealBundle.ProtoReflect.Descriptor instead.

func (*DealBundle) GetCommits added in v0.9.0

func (x *DealBundle) GetCommits() [][]byte

func (*DealBundle) GetDealerIndex added in v0.9.0

func (x *DealBundle) GetDealerIndex() uint32

func (*DealBundle) GetDeals added in v0.9.0

func (x *DealBundle) GetDeals() []*Deal

func (*DealBundle) GetSessionId added in v1.0.0

func (x *DealBundle) GetSessionId() []byte

func (*DealBundle) GetSignature added in v1.0.0

func (x *DealBundle) GetSignature() []byte

func (*DealBundle) ProtoMessage added in v0.9.0

func (*DealBundle) ProtoMessage()

func (*DealBundle) ProtoReflect added in v1.0.0

func (x *DealBundle) ProtoReflect() protoreflect.Message

func (*DealBundle) Reset added in v0.9.0

func (x *DealBundle) Reset()

func (*DealBundle) String added in v0.9.0

func (x *DealBundle) String() string

type Justification

type Justification struct {

	// represents for who share holder this justification is
	ShareIndex uint32 `protobuf:"varint,1,opt,name=share_index,json=shareIndex,proto3" json:"share_index,omitempty"`
	// plaintext share so everyone can see it correct
	Share []byte `protobuf:"bytes,2,opt,name=share,proto3" json:"share,omitempty"`
	// contains filtered or unexported fields
}

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

func (*Justification) Descriptor deprecated

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

Deprecated: Use Justification.ProtoReflect.Descriptor instead.

func (*Justification) GetShare added in v0.9.0

func (x *Justification) GetShare() []byte

func (*Justification) GetShareIndex added in v0.9.0

func (x *Justification) GetShareIndex() uint32

func (*Justification) ProtoMessage

func (*Justification) ProtoMessage()

func (*Justification) ProtoReflect added in v1.0.0

func (x *Justification) ProtoReflect() protoreflect.Message

func (*Justification) Reset

func (x *Justification) Reset()

func (*Justification) String

func (x *Justification) String() string

type JustificationBundle added in v1.0.0

type JustificationBundle struct {
	DealerIndex    uint32           `protobuf:"varint,1,opt,name=dealer_index,json=dealerIndex,proto3" json:"dealer_index,omitempty"`
	Justifications []*Justification `protobuf:"bytes,2,rep,name=justifications,proto3" json:"justifications,omitempty"`
	// session identifier of the protocol run
	SessionId []byte `protobuf:"bytes,3,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	// signature over the hash of the justification
	Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

JustificationBundle is a packet that holds all justifications a dealer must produce

func (*JustificationBundle) Descriptor deprecated added in v1.0.0

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

Deprecated: Use JustificationBundle.ProtoReflect.Descriptor instead.

func (*JustificationBundle) GetDealerIndex added in v1.0.0

func (x *JustificationBundle) GetDealerIndex() uint32

func (*JustificationBundle) GetJustifications added in v1.0.0

func (x *JustificationBundle) GetJustifications() []*Justification

func (*JustificationBundle) GetSessionId added in v1.0.0

func (x *JustificationBundle) GetSessionId() []byte

func (*JustificationBundle) GetSignature added in v1.0.0

func (x *JustificationBundle) GetSignature() []byte

func (*JustificationBundle) ProtoMessage added in v1.0.0

func (*JustificationBundle) ProtoMessage()

func (*JustificationBundle) ProtoReflect added in v1.0.0

func (x *JustificationBundle) ProtoReflect() protoreflect.Message

func (*JustificationBundle) Reset added in v1.0.0

func (x *JustificationBundle) Reset()

func (*JustificationBundle) String added in v1.0.0

func (x *JustificationBundle) String() string

type Packet

type Packet struct {

	// Types that are assignable to Bundle:
	//	*Packet_Deal
	//	*Packet_Response
	//	*Packet_Justification
	Bundle isPacket_Bundle `protobuf_oneof:"Bundle"`
	// contains filtered or unexported fields
}

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

func (*Packet) Descriptor deprecated

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

Deprecated: Use Packet.ProtoReflect.Descriptor instead.

func (*Packet) GetBundle added in v0.9.0

func (m *Packet) GetBundle() isPacket_Bundle

func (*Packet) GetDeal

func (x *Packet) GetDeal() *DealBundle

func (*Packet) GetJustification

func (x *Packet) GetJustification() *JustificationBundle

func (*Packet) GetResponse

func (x *Packet) GetResponse() *ResponseBundle

func (*Packet) ProtoMessage

func (*Packet) ProtoMessage()

func (*Packet) ProtoReflect added in v1.0.0

func (x *Packet) ProtoReflect() protoreflect.Message

func (*Packet) Reset

func (x *Packet) Reset()

func (*Packet) String

func (x *Packet) String() string

type Packet_Deal added in v0.9.0

type Packet_Deal struct {
	Deal *DealBundle `protobuf:"bytes,1,opt,name=deal,proto3,oneof"`
}

type Packet_Justification added in v0.9.0

type Packet_Justification struct {
	Justification *JustificationBundle `protobuf:"bytes,3,opt,name=justification,proto3,oneof"`
}

type Packet_Response added in v0.9.0

type Packet_Response struct {
	Response *ResponseBundle `protobuf:"bytes,2,opt,name=response,proto3,oneof"`
}

type Response

type Response struct {

	// index of the dealer for which this response is for
	DealerIndex uint32 `protobuf:"varint,1,opt,name=dealer_index,json=dealerIndex,proto3" json:"dealer_index,omitempty"`
	// Status represents a complaint if set to false, a success if set to
	// true.
	Status bool `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

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

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetDealerIndex added in v0.9.0

func (x *Response) GetDealerIndex() uint32

func (*Response) GetStatus added in v0.9.0

func (x *Response) GetStatus() bool

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect added in v1.0.0

func (x *Response) ProtoReflect() protoreflect.Message

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type ResponseBundle added in v0.9.0

type ResponseBundle struct {
	ShareIndex uint32      `protobuf:"varint,1,opt,name=share_index,json=shareIndex,proto3" json:"share_index,omitempty"`
	Responses  []*Response `protobuf:"bytes,2,rep,name=responses,proto3" json:"responses,omitempty"`
	// session identifier of the protocol run
	SessionId []byte `protobuf:"bytes,3,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	// signature over the hash of the response
	Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

ResponseBundle is a packet issued by a share holder that contains all the responses (complaint and/or success) to broadcast.

func (*ResponseBundle) Descriptor deprecated added in v0.9.0

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

Deprecated: Use ResponseBundle.ProtoReflect.Descriptor instead.

func (*ResponseBundle) GetResponses added in v0.9.0

func (x *ResponseBundle) GetResponses() []*Response

func (*ResponseBundle) GetSessionId added in v1.0.0

func (x *ResponseBundle) GetSessionId() []byte

func (*ResponseBundle) GetShareIndex added in v0.9.0

func (x *ResponseBundle) GetShareIndex() uint32

func (*ResponseBundle) GetSignature added in v1.0.0

func (x *ResponseBundle) GetSignature() []byte

func (*ResponseBundle) ProtoMessage added in v0.9.0

func (*ResponseBundle) ProtoMessage()

func (*ResponseBundle) ProtoReflect added in v1.0.0

func (x *ResponseBundle) ProtoReflect() protoreflect.Message

func (*ResponseBundle) Reset added in v0.9.0

func (x *ResponseBundle) Reset()

func (*ResponseBundle) String added in v0.9.0

func (x *ResponseBundle) String() string

Jump to

Keyboard shortcuts

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