Documentation ¶
Index ¶
- Constants
- Variables
- func LoadNTildeH1H2FromTestFixture(idx int) (NTildei, h1i, h2i *big.Int, err error)
- func NewECKGRound1Message(from *tss.PartyID, ct cmt.HashCommitment, paillierPK *paillier.PublicKey, ...) (tss.ParsedMessage, error)
- func NewECKGRound2Message1(to, from *tss.PartyID, share *vss.Share) tss.ParsedMessage
- func NewECKGRound2Message2(from *tss.PartyID, deCommitment cmt.HashDeCommitment) tss.ParsedMessage
- func NewECKGRound3Message(from *tss.PartyID, proof paillier.Proof) tss.ParsedMessage
- func NewLocalParty(params *tss.Parameters, out chan<- tss.Message, end chan<- LocalPartySaveData, ...) tss.Party
- type ECKGRound1Message
- func (*ECKGRound1Message) Descriptor() ([]byte, []int)deprecated
- func (x *ECKGRound1Message) GetCommitment() []byte
- func (x *ECKGRound1Message) GetDlnproof_1() [][]byte
- func (x *ECKGRound1Message) GetDlnproof_2() [][]byte
- func (x *ECKGRound1Message) GetH1() []byte
- func (x *ECKGRound1Message) GetH2() []byte
- func (x *ECKGRound1Message) GetNTilde() []byte
- func (x *ECKGRound1Message) GetPaillierN() []byte
- func (*ECKGRound1Message) ProtoMessage()
- func (x *ECKGRound1Message) ProtoReflect() protoreflect.Message
- func (x *ECKGRound1Message) Reset()
- func (x *ECKGRound1Message) String() string
- func (m *ECKGRound1Message) UnmarshalCommitment() *big.Int
- func (m *ECKGRound1Message) UnmarshalDLNProof1() (*dlnp.Proof, error)
- func (m *ECKGRound1Message) UnmarshalDLNProof2() (*dlnp.Proof, error)
- func (m *ECKGRound1Message) UnmarshalH1() *big.Int
- func (m *ECKGRound1Message) UnmarshalH2() *big.Int
- func (m *ECKGRound1Message) UnmarshalNTilde() *big.Int
- func (m *ECKGRound1Message) UnmarshalPaillierPK() *paillier.PublicKey
- func (m *ECKGRound1Message) ValidateBasic() bool
- type ECKGRound2Message1
- func (*ECKGRound2Message1) Descriptor() ([]byte, []int)deprecated
- func (x *ECKGRound2Message1) GetShare() []byte
- func (*ECKGRound2Message1) ProtoMessage()
- func (x *ECKGRound2Message1) ProtoReflect() protoreflect.Message
- func (x *ECKGRound2Message1) Reset()
- func (x *ECKGRound2Message1) String() string
- func (m *ECKGRound2Message1) UnmarshalShare() *big.Int
- func (m *ECKGRound2Message1) ValidateBasic() bool
- type ECKGRound2Message2
- func (*ECKGRound2Message2) Descriptor() ([]byte, []int)deprecated
- func (x *ECKGRound2Message2) GetDeCommitment() [][]byte
- func (*ECKGRound2Message2) ProtoMessage()
- func (x *ECKGRound2Message2) ProtoReflect() protoreflect.Message
- func (x *ECKGRound2Message2) Reset()
- func (x *ECKGRound2Message2) String() string
- func (m *ECKGRound2Message2) UnmarshalDeCommitment() []*big.Int
- func (m *ECKGRound2Message2) ValidateBasic() bool
- type ECKGRound3Message
- func (*ECKGRound3Message) Descriptor() ([]byte, []int)deprecated
- func (x *ECKGRound3Message) GetPaillierProof() [][]byte
- func (*ECKGRound3Message) ProtoMessage()
- func (x *ECKGRound3Message) ProtoReflect() protoreflect.Message
- func (x *ECKGRound3Message) Reset()
- func (x *ECKGRound3Message) String() string
- func (m *ECKGRound3Message) UnmarshalProofInts() paillier.Proof
- func (m *ECKGRound3Message) ValidateBasic() bool
- type LocalParty
- func (p *LocalParty) FirstRound() tss.Round
- func (p *LocalParty) PartyID() *tss.PartyID
- func (p *LocalParty) Start() *tss.Error
- func (p *LocalParty) StoreMessage(msg tss.ParsedMessage) (bool, *tss.Error)
- func (p *LocalParty) String() string
- func (p *LocalParty) Update(msg tss.ParsedMessage) (ok bool, err *tss.Error)
- func (p *LocalParty) UpdateFromBytes(wireBytes []byte, from *tss.PartyID, isBroadcast bool) (bool, *tss.Error)
- func (p *LocalParty) ValidateMessage(msg tss.ParsedMessage) (bool, *tss.Error)
- type LocalPartySaveData
- func BuildLocalSaveDataSubset(sourceData LocalPartySaveData, sortedIDs tss.SortedPartyIDs) LocalPartySaveData
- func LoadKeygenTestFixtures(qty int, optionalStart ...int) ([]LocalPartySaveData, tss.SortedPartyIDs, error)
- func LoadKeygenTestFixturesRandomSet(qty, fixtureCount int) ([]LocalPartySaveData, tss.SortedPartyIDs, error)
- func NewLocalPartySaveData(partyCount int) (saveData LocalPartySaveData)
- type LocalPreParams
- type LocalSecrets
Constants ¶
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 = test.TestParticipants TestThreshold = test.TestParticipants / 2 )
const (
TaskName = "ecdsa-keygen"
)
Variables ¶
var File_protob_ecdsa_keygen_proto protoreflect.FileDescriptor
Functions ¶
func NewECKGRound1Message ¶
func NewECKGRound2Message1 ¶
func NewECKGRound2Message2 ¶
func NewECKGRound2Message2( from *tss.PartyID, deCommitment cmt.HashDeCommitment, ) tss.ParsedMessage
func NewECKGRound3Message ¶
func NewLocalParty ¶
func NewLocalParty( params *tss.Parameters, out chan<- tss.Message, end chan<- LocalPartySaveData, optionalPreParams ...LocalPreParams, ) tss.Party
Exported, used in `tss` client
Types ¶
type ECKGRound1Message ¶
type ECKGRound1Message struct { Commitment []byte `protobuf:"bytes,1,opt,name=commitment,proto3" json:"commitment,omitempty"` PaillierN []byte `protobuf:"bytes,2,opt,name=paillier_n,json=paillierN,proto3" json:"paillier_n,omitempty"` NTilde []byte `protobuf:"bytes,3,opt,name=n_tilde,json=nTilde,proto3" json:"n_tilde,omitempty"` H1 []byte `protobuf:"bytes,4,opt,name=h1,proto3" json:"h1,omitempty"` H2 []byte `protobuf:"bytes,5,opt,name=h2,proto3" json:"h2,omitempty"` Dlnproof_1 [][]byte `protobuf:"bytes,6,rep,name=dlnproof_1,json=dlnproof1,proto3" json:"dlnproof_1,omitempty"` Dlnproof_2 [][]byte `protobuf:"bytes,7,rep,name=dlnproof_2,json=dlnproof2,proto3" json:"dlnproof_2,omitempty"` // contains filtered or unexported fields }
Represents a BROADCAST message sent during Round 1 of the ECDSA TSS keygen protocol.
func (*ECKGRound1Message) Descriptor
deprecated
func (*ECKGRound1Message) Descriptor() ([]byte, []int)
Deprecated: Use ECKGRound1Message.ProtoReflect.Descriptor instead.
func (*ECKGRound1Message) GetCommitment ¶
func (x *ECKGRound1Message) GetCommitment() []byte
func (*ECKGRound1Message) GetDlnproof_1 ¶
func (x *ECKGRound1Message) GetDlnproof_1() [][]byte
func (*ECKGRound1Message) GetDlnproof_2 ¶
func (x *ECKGRound1Message) GetDlnproof_2() [][]byte
func (*ECKGRound1Message) GetH1 ¶
func (x *ECKGRound1Message) GetH1() []byte
func (*ECKGRound1Message) GetH2 ¶
func (x *ECKGRound1Message) GetH2() []byte
func (*ECKGRound1Message) GetNTilde ¶
func (x *ECKGRound1Message) GetNTilde() []byte
func (*ECKGRound1Message) GetPaillierN ¶
func (x *ECKGRound1Message) GetPaillierN() []byte
func (*ECKGRound1Message) ProtoMessage ¶
func (*ECKGRound1Message) ProtoMessage()
func (*ECKGRound1Message) ProtoReflect ¶
func (x *ECKGRound1Message) ProtoReflect() protoreflect.Message
func (*ECKGRound1Message) Reset ¶
func (x *ECKGRound1Message) Reset()
func (*ECKGRound1Message) String ¶
func (x *ECKGRound1Message) String() string
func (*ECKGRound1Message) UnmarshalCommitment ¶
func (m *ECKGRound1Message) UnmarshalCommitment() *big.Int
func (*ECKGRound1Message) UnmarshalDLNProof1 ¶
func (m *ECKGRound1Message) UnmarshalDLNProof1() (*dlnp.Proof, error)
func (*ECKGRound1Message) UnmarshalDLNProof2 ¶
func (m *ECKGRound1Message) UnmarshalDLNProof2() (*dlnp.Proof, error)
func (*ECKGRound1Message) UnmarshalH1 ¶
func (m *ECKGRound1Message) UnmarshalH1() *big.Int
func (*ECKGRound1Message) UnmarshalH2 ¶
func (m *ECKGRound1Message) UnmarshalH2() *big.Int
func (*ECKGRound1Message) UnmarshalNTilde ¶
func (m *ECKGRound1Message) UnmarshalNTilde() *big.Int
func (*ECKGRound1Message) UnmarshalPaillierPK ¶
func (m *ECKGRound1Message) UnmarshalPaillierPK() *paillier.PublicKey
func (*ECKGRound1Message) ValidateBasic ¶
func (m *ECKGRound1Message) ValidateBasic() bool
type ECKGRound2Message1 ¶
type ECKGRound2Message1 struct { // contains filtered or unexported fields }
Represents a P2P message sent to each party during Round 2 of the ECDSA TSS keygen protocol.
func (*ECKGRound2Message1) Descriptor
deprecated
func (*ECKGRound2Message1) Descriptor() ([]byte, []int)
Deprecated: Use ECKGRound2Message1.ProtoReflect.Descriptor instead.
func (*ECKGRound2Message1) GetShare ¶
func (x *ECKGRound2Message1) GetShare() []byte
func (*ECKGRound2Message1) ProtoMessage ¶
func (*ECKGRound2Message1) ProtoMessage()
func (*ECKGRound2Message1) ProtoReflect ¶
func (x *ECKGRound2Message1) ProtoReflect() protoreflect.Message
func (*ECKGRound2Message1) Reset ¶
func (x *ECKGRound2Message1) Reset()
func (*ECKGRound2Message1) String ¶
func (x *ECKGRound2Message1) String() string
func (*ECKGRound2Message1) UnmarshalShare ¶
func (m *ECKGRound2Message1) UnmarshalShare() *big.Int
func (*ECKGRound2Message1) ValidateBasic ¶
func (m *ECKGRound2Message1) ValidateBasic() bool
type ECKGRound2Message2 ¶
type ECKGRound2Message2 struct { DeCommitment [][]byte `protobuf:"bytes,1,rep,name=de_commitment,json=deCommitment,proto3" json:"de_commitment,omitempty"` // contains filtered or unexported fields }
Represents a BROADCAST message sent to each party during Round 2 of the ECDSA TSS keygen protocol.
func (*ECKGRound2Message2) Descriptor
deprecated
func (*ECKGRound2Message2) Descriptor() ([]byte, []int)
Deprecated: Use ECKGRound2Message2.ProtoReflect.Descriptor instead.
func (*ECKGRound2Message2) GetDeCommitment ¶
func (x *ECKGRound2Message2) GetDeCommitment() [][]byte
func (*ECKGRound2Message2) ProtoMessage ¶
func (*ECKGRound2Message2) ProtoMessage()
func (*ECKGRound2Message2) ProtoReflect ¶
func (x *ECKGRound2Message2) ProtoReflect() protoreflect.Message
func (*ECKGRound2Message2) Reset ¶
func (x *ECKGRound2Message2) Reset()
func (*ECKGRound2Message2) String ¶
func (x *ECKGRound2Message2) String() string
func (*ECKGRound2Message2) UnmarshalDeCommitment ¶
func (m *ECKGRound2Message2) UnmarshalDeCommitment() []*big.Int
func (*ECKGRound2Message2) ValidateBasic ¶
func (m *ECKGRound2Message2) ValidateBasic() bool
type ECKGRound3Message ¶
type ECKGRound3Message struct { PaillierProof [][]byte `protobuf:"bytes,1,rep,name=paillier_proof,json=paillierProof,proto3" json:"paillier_proof,omitempty"` // contains filtered or unexported fields }
Represents a BROADCAST message sent to each party during Round 3 of the ECDSA TSS keygen protocol.
func (*ECKGRound3Message) Descriptor
deprecated
func (*ECKGRound3Message) Descriptor() ([]byte, []int)
Deprecated: Use ECKGRound3Message.ProtoReflect.Descriptor instead.
func (*ECKGRound3Message) GetPaillierProof ¶
func (x *ECKGRound3Message) GetPaillierProof() [][]byte
func (*ECKGRound3Message) ProtoMessage ¶
func (*ECKGRound3Message) ProtoMessage()
func (*ECKGRound3Message) ProtoReflect ¶
func (x *ECKGRound3Message) ProtoReflect() protoreflect.Message
func (*ECKGRound3Message) Reset ¶
func (x *ECKGRound3Message) Reset()
func (*ECKGRound3Message) String ¶
func (x *ECKGRound3Message) String() string
func (*ECKGRound3Message) UnmarshalProofInts ¶
func (m *ECKGRound3Message) UnmarshalProofInts() paillier.Proof
func (*ECKGRound3Message) ValidateBasic ¶
func (m *ECKGRound3Message) ValidateBasic() bool
type LocalParty ¶
func (*LocalParty) FirstRound ¶
func (p *LocalParty) FirstRound() tss.Round
func (*LocalParty) PartyID ¶
func (p *LocalParty) PartyID() *tss.PartyID
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 (*LocalParty) ValidateMessage ¶
func (p *LocalParty) ValidateMessage(msg tss.ParsedMessage) (bool, *tss.Error)
type LocalPartySaveData ¶
type LocalPartySaveData struct { LocalPreParams LocalSecrets // original indexes (ki in signing preparation phase) Ks []*big.Int // n-tilde, h1, h2 for range proofs NTildej, H1j, H2j []*big.Int // public keys (Xj = uj*G for each Pj) BigXj []*crypto.ECPoint // Xj PaillierPKs []*paillier.PublicKey // pkj // the ECDSA public key ECDSAPub *crypto.ECPoint // y }
Everything in LocalPartySaveData is saved locally to user's HD when done
func BuildLocalSaveDataSubset ¶
func BuildLocalSaveDataSubset(sourceData LocalPartySaveData, sortedIDs tss.SortedPartyIDs) LocalPartySaveData
BuildLocalSaveDataSubset re-creates the LocalPartySaveData to contain data for only the list of signing parties.
func LoadKeygenTestFixtures ¶
func LoadKeygenTestFixtures(qty int, optionalStart ...int) ([]LocalPartySaveData, tss.SortedPartyIDs, error)
func LoadKeygenTestFixturesRandomSet ¶
func LoadKeygenTestFixturesRandomSet(qty, fixtureCount int) ([]LocalPartySaveData, tss.SortedPartyIDs, error)
func NewLocalPartySaveData ¶
func NewLocalPartySaveData(partyCount int) (saveData LocalPartySaveData)
func (LocalPartySaveData) OriginalIndex ¶
func (save LocalPartySaveData) OriginalIndex() (int, error)
recovers a party's original index in the set of parties during keygen
type LocalPreParams ¶
type LocalPreParams struct { PaillierSK *paillier.PrivateKey // ski NTildei, H1i, H2i, Alpha, Beta, P, Q *big.Int }
func GeneratePreParams ¶
func GeneratePreParams(timeout time.Duration, optionalConcurrency ...int) (*LocalPreParams, error)
GeneratePreParams finds two safe primes and computes the Paillier secret required for the protocol. This can be a time consuming process so it is recommended to do it out-of-band. If not specified, a concurrency value equal to the number of available CPU cores will be used.
func (LocalPreParams) Validate ¶
func (preParams LocalPreParams) Validate() bool
func (LocalPreParams) ValidateWithProof ¶
func (preParams LocalPreParams) ValidateWithProof() bool