keygen

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// To change these parameters, you must first delete the text fixture files in test/_fixtures/ and then run the keygen test alone.
	// Then the signing and resharing tests will work with the new n, t configuration using the newly written fixture files.
	TestParticipants = 2
	TestThreshold    = test.TestParticipants / 2
	Ecdsa            = 0
	Eddsa            = 1
)
View Source
const (
	TaskName = "non_threshold-keygen"
)

Variables

View Source
var File_keygen_proto protoreflect.FileDescriptor

Functions

func LoadKeygenTestFixtures

func LoadKeygenTestFixtures(kind, qty int, optionalStart ...int) ([]save.LocalPartySaveData, tss.SortedPartyIDs, error)

func LoadKeygenTestFixturesRandomSet

func LoadKeygenTestFixturesRandomSet(kind, qty, fixtureCount int) ([]save.LocalPartySaveData, tss.SortedPartyIDs, error)

func NewKGRound1Message

func NewKGRound1Message(from *tss.PartyID, hash []byte) tss.ParsedMessage

func NewKGRound2Message

func NewKGRound2Message(
	from *tss.PartyID,
	ssid []byte,
	srid []byte,
	pubX *crypto.ECPoint,
	commitmentA *crypto.ECPoint,
	u []byte,
	chainCode []byte,
) tss.ParsedMessage

func NewKGRound3Message

func NewKGRound3Message(
	from *tss.PartyID,
	schProof []byte,
) tss.ParsedMessage

func NewLocalParty

func NewLocalParty(
	params *tss.Parameters,
	out chan<- tss.Message,
	end chan<- *save.LocalPartySaveData,
) tss.Party

Exported, used in `tss` client

Types

type CmpKeyGenerationPayload

type CmpKeyGenerationPayload struct {
	// contains filtered or unexported fields
}

type KGRound1Message

type KGRound1Message struct {
	Commitment []byte `protobuf:"bytes,1,opt,name=commitment,proto3" json:"commitment,omitempty"`
	// contains filtered or unexported fields
}

Represents a BROADCAST message sent during Round 1 of the EDDSA TSS keygen protocol.

func (*KGRound1Message) Descriptor deprecated

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

Deprecated: Use KGRound1Message.ProtoReflect.Descriptor instead.

func (*KGRound1Message) GetCommitment

func (x *KGRound1Message) GetCommitment() []byte

func (*KGRound1Message) ProtoMessage

func (*KGRound1Message) ProtoMessage()

func (*KGRound1Message) ProtoReflect

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

func (*KGRound1Message) Reset

func (x *KGRound1Message) Reset()

func (*KGRound1Message) String

func (x *KGRound1Message) String() string

func (*KGRound1Message) ValidateBasic

func (m *KGRound1Message) ValidateBasic() bool

type KGRound2Message

type KGRound2Message struct {
	Ssid        []byte `protobuf:"bytes,1,opt,name=ssid,proto3" json:"ssid,omitempty"`
	PartyIndex  int32  `protobuf:"varint,2,opt,name=party_index,json=partyIndex,proto3" json:"party_index,omitempty"`
	Srid        []byte `protobuf:"bytes,3,opt,name=srid,proto3" json:"srid,omitempty"`
	PublicXX    []byte `protobuf:"bytes,4,opt,name=public_x_x,json=publicXX,proto3" json:"public_x_x,omitempty"`
	PublicXY    []byte `protobuf:"bytes,5,opt,name=public_x_y,json=publicXY,proto3" json:"public_x_y,omitempty"`
	CommitmentX []byte `protobuf:"bytes,6,opt,name=commitment_x,json=commitmentX,proto3" json:"commitment_x,omitempty"`
	CommitmentY []byte `protobuf:"bytes,7,opt,name=commitment_y,json=commitmentY,proto3" json:"commitment_y,omitempty"`
	U           []byte `protobuf:"bytes,8,opt,name=u,proto3" json:"u,omitempty"`
	ChainCode   []byte `protobuf:"bytes,9,opt,name=chain_code,json=chainCode,proto3" json:"chain_code,omitempty"`
	// contains filtered or unexported fields
}

Represents a BROADCAST message sent to each party during Round 2 of the EDDSA TSS keygen protocol.

func (*KGRound2Message) Descriptor deprecated

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

Deprecated: Use KGRound2Message.ProtoReflect.Descriptor instead.

func (*KGRound2Message) GetChainCode

func (x *KGRound2Message) GetChainCode() []byte

func (*KGRound2Message) GetCommitmentX

func (x *KGRound2Message) GetCommitmentX() []byte

func (*KGRound2Message) GetCommitmentY

func (x *KGRound2Message) GetCommitmentY() []byte

func (*KGRound2Message) GetPartyIndex

func (x *KGRound2Message) GetPartyIndex() int32

func (*KGRound2Message) GetPublicXX

func (x *KGRound2Message) GetPublicXX() []byte

func (*KGRound2Message) GetPublicXY

func (x *KGRound2Message) GetPublicXY() []byte

func (*KGRound2Message) GetSrid

func (x *KGRound2Message) GetSrid() []byte

func (*KGRound2Message) GetSsid

func (x *KGRound2Message) GetSsid() []byte

func (*KGRound2Message) GetU

func (x *KGRound2Message) GetU() []byte

func (*KGRound2Message) ProtoMessage

func (*KGRound2Message) ProtoMessage()

func (*KGRound2Message) ProtoReflect

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

func (*KGRound2Message) Reset

func (x *KGRound2Message) Reset()

func (*KGRound2Message) String

func (x *KGRound2Message) String() string

func (*KGRound2Message) UnmarshalPayload

func (m *KGRound2Message) UnmarshalPayload(ec elliptic.Curve) (*CmpKeyGenerationPayload, error)

func (*KGRound2Message) UnmarshalPubXj

func (m *KGRound2Message) UnmarshalPubXj(ec elliptic.Curve) (*crypto.ECPoint, error)

func (*KGRound2Message) ValidateBasic

func (m *KGRound2Message) ValidateBasic() bool

type KGRound3Message

type KGRound3Message struct {
	SchProof []byte `protobuf:"bytes,1,opt,name=sch_proof,json=schProof,proto3" json:"sch_proof,omitempty"`
	// contains filtered or unexported fields
}

Represents a BROADCAST message sent during Round 3 of the EDDSA TSS keygen protocol.

func (*KGRound3Message) Descriptor deprecated

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

Deprecated: Use KGRound3Message.ProtoReflect.Descriptor instead.

func (*KGRound3Message) GetSchProof

func (x *KGRound3Message) GetSchProof() []byte

func (*KGRound3Message) ProtoMessage

func (*KGRound3Message) ProtoMessage()

func (*KGRound3Message) ProtoReflect

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

func (*KGRound3Message) Reset

func (x *KGRound3Message) Reset()

func (*KGRound3Message) String

func (x *KGRound3Message) String() string

func (*KGRound3Message) UnmarshalSchProof

func (m *KGRound3Message) UnmarshalSchProof() *big.Int

func (*KGRound3Message) ValidateBasic

func (m *KGRound3Message) ValidateBasic() bool

type LocalParty

type LocalParty struct {
	*tss.BaseParty
	// contains filtered or unexported fields
}

func (*LocalParty) FirstRound

func (p *LocalParty) FirstRound() tss.Round

func (*LocalParty) PartyID

func (p *LocalParty) PartyID() *tss.PartyID

func (*LocalParty) SetNewSecretX

func (p *LocalParty) SetNewSecretX(x *big.Int)

func (*LocalParty) Start

func (p *LocalParty) Start() *tss.Error

func (*LocalParty) StoreMessage

func (p *LocalParty) StoreMessage(msg tss.ParsedMessage) (bool, *tss.Error)

func (*LocalParty) String

func (p *LocalParty) String() string

func (*LocalParty) Update

func (p *LocalParty) Update(msg tss.ParsedMessage) (ok bool, err *tss.Error)

func (*LocalParty) UpdateFromBytes

func (p *LocalParty) UpdateFromBytes(wireBytes []byte, from *tss.PartyID, isBroadcast bool) (bool, *tss.Error)

func (*LocalParty) ValidateMessage

func (p *LocalParty) ValidateMessage(msg tss.ParsedMessage) (bool, *tss.Error)

Jump to

Keyboard shortcuts

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