dkg

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Type_name = map[int32]string{
		0: "Peer",
		1: "Decommit",
		2: "Verify",
		3: "Result",
	}
	Type_value = map[string]int32{
		"Peer":     0,
		"Decommit": 1,
		"Verify":   2,
		"Result":   3,
	}
)

Enum value maps for Type.

View Source
var (
	ErrNotEnoughRanks = errors.New("not enough ranks")
)
View Source
var (
	// ErrTrivialPublicKey is returned the public key is the identity element
	ErrTrivialPublicKey = errors.New("the publickey is the identity element")
)
View Source
var File_github_com_getamis_alice_crypto_tss_dkg_message_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type BodyDecommit

type BodyDecommit struct {
	HashDecommitment *commitment.HashDecommitmentMessage `protobuf:"bytes,1,opt,name=hashDecommitment,proto3" json:"hashDecommitment,omitempty"`
	PointCommitment  *commitment.PointCommitmentMessage  `protobuf:"bytes,2,opt,name=pointCommitment,proto3" json:"pointCommitment,omitempty"`
	// contains filtered or unexported fields
}

func (*BodyDecommit) Descriptor deprecated

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

Deprecated: Use BodyDecommit.ProtoReflect.Descriptor instead.

func (*BodyDecommit) GetHashDecommitment

func (x *BodyDecommit) GetHashDecommitment() *commitment.HashDecommitmentMessage

func (*BodyDecommit) GetPointCommitment

func (x *BodyDecommit) GetPointCommitment() *commitment.PointCommitmentMessage

func (*BodyDecommit) ProtoMessage

func (*BodyDecommit) ProtoMessage()

func (*BodyDecommit) ProtoReflect added in v1.0.2

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

func (*BodyDecommit) Reset

func (x *BodyDecommit) Reset()

func (*BodyDecommit) String

func (x *BodyDecommit) String() string

type BodyPeer

type BodyPeer struct {
	Bk         *birkhoffinterpolation.BkParameterMessage `protobuf:"bytes,1,opt,name=bk,proto3" json:"bk,omitempty"`
	Commitment *commitment.HashCommitmentMessage         `protobuf:"bytes,2,opt,name=commitment,proto3" json:"commitment,omitempty"`
	// contains filtered or unexported fields
}

func (*BodyPeer) Descriptor deprecated

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

Deprecated: Use BodyPeer.ProtoReflect.Descriptor instead.

func (*BodyPeer) GetBk

func (*BodyPeer) GetCommitment

func (x *BodyPeer) GetCommitment() *commitment.HashCommitmentMessage

func (*BodyPeer) ProtoMessage

func (*BodyPeer) ProtoMessage()

func (*BodyPeer) ProtoReflect added in v1.0.2

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

func (*BodyPeer) Reset

func (x *BodyPeer) Reset()

func (*BodyPeer) String

func (x *BodyPeer) String() string

type BodyResult

type BodyResult struct {
	SiGProofMsg *zkproof.SchnorrProofMessage `protobuf:"bytes,1,opt,name=siGProofMsg,proto3" json:"siGProofMsg,omitempty"`
	// contains filtered or unexported fields
}

func (*BodyResult) Descriptor deprecated

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

Deprecated: Use BodyResult.ProtoReflect.Descriptor instead.

func (*BodyResult) GetSiGProofMsg

func (x *BodyResult) GetSiGProofMsg() *zkproof.SchnorrProofMessage

func (*BodyResult) ProtoMessage

func (*BodyResult) ProtoMessage()

func (*BodyResult) ProtoReflect added in v1.0.2

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

func (*BodyResult) Reset

func (x *BodyResult) Reset()

func (*BodyResult) String

func (x *BodyResult) String() string

type BodyVerify

type BodyVerify struct {
	Verify *commitment.FeldmanVerifyMessage `protobuf:"bytes,1,opt,name=verify,proto3" json:"verify,omitempty"`
	// contains filtered or unexported fields
}

func (*BodyVerify) Descriptor deprecated

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

Deprecated: Use BodyVerify.ProtoReflect.Descriptor instead.

func (*BodyVerify) GetVerify

func (x *BodyVerify) GetVerify() *commitment.FeldmanVerifyMessage

func (*BodyVerify) ProtoMessage

func (*BodyVerify) ProtoMessage()

func (*BodyVerify) ProtoReflect added in v1.0.2

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

func (*BodyVerify) Reset

func (x *BodyVerify) Reset()

func (*BodyVerify) String

func (x *BodyVerify) String() string

type DKG

type DKG struct {
	*message.MsgMain
	// contains filtered or unexported fields
}

func NewDKG

func NewDKG(curve elliptic.Curve, peerManager types.PeerManager, threshold uint32, rank uint32, listener types.StateChangedListener) (*DKG, error)

func (*DKG) GetResult

func (d *DKG) GetResult() (*Result, error)

GetResult returns the final result: public key, share, bks (including self bk)

func (*DKG) Start added in v1.0.2

func (d *DKG) Start()

type Message

type Message struct {
	Type Type   `protobuf:"varint,1,opt,name=type,proto3,enum=dkg.Type" json:"type,omitempty"`
	Id   string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// Types that are assignable to Body:
	//	*Message_Peer
	//	*Message_Decommit
	//	*Message_Verify
	//	*Message_Result
	Body isMessage_Body `protobuf_oneof:"body"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetBody

func (m *Message) GetBody() isMessage_Body

func (*Message) GetDecommit

func (x *Message) GetDecommit() *BodyDecommit

func (*Message) GetId

func (x *Message) GetId() string

func (*Message) GetMessageType

func (m *Message) GetMessageType() types.MessageType

func (*Message) GetPeer

func (x *Message) GetPeer() *BodyPeer

func (*Message) GetResult

func (x *Message) GetResult() *BodyResult

func (*Message) GetType

func (x *Message) GetType() Type

func (*Message) GetVerify

func (x *Message) GetVerify() *BodyVerify

func (*Message) IsValid

func (m *Message) IsValid() bool

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect added in v1.0.2

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

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type Message_Decommit

type Message_Decommit struct {
	Decommit *BodyDecommit `protobuf:"bytes,4,opt,name=decommit,proto3,oneof"`
}

type Message_Peer

type Message_Peer struct {
	Peer *BodyPeer `protobuf:"bytes,3,opt,name=peer,proto3,oneof"`
}

type Message_Result

type Message_Result struct {
	Result *BodyResult `protobuf:"bytes,6,opt,name=result,proto3,oneof"`
}

type Message_Verify

type Message_Verify struct {
	Verify *BodyVerify `protobuf:"bytes,5,opt,name=verify,proto3,oneof"`
}

type Result

type Result struct {
	PublicKey *ecpointgrouplaw.ECPoint
	Share     *big.Int
	Bks       map[string]*birkhoffinterpolation.BkParameter
	Ys        map[string]*ecpointgrouplaw.ECPoint
}

type Type

type Type int32
const (
	Type_Peer     Type = 0
	Type_Decommit Type = 1
	Type_Verify   Type = 2
	Type_Result   Type = 3
)

func (Type) Descriptor added in v1.0.2

func (Type) Descriptor() protoreflect.EnumDescriptor

func (Type) Enum added in v1.0.2

func (x Type) Enum() *Type

func (Type) EnumDescriptor deprecated

func (Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use Type.Descriptor instead.

func (Type) Number added in v1.0.2

func (x Type) Number() protoreflect.EnumNumber

func (Type) String

func (x Type) String() string

func (Type) Type added in v1.0.2

func (Type) Type() protoreflect.EnumType

Jump to

Keyboard shortcuts

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