Documentation
¶
Index ¶
- Constants
- Variables
- func NewDGRound1Message(to []*tss.PartyID, from *tss.PartyID, ecdsaPub *crypto.ECPoint, ...) tss.ParsedMessage
- func NewDGRound2Message1(to []*tss.PartyID, from *tss.PartyID, paillierPK *paillier.PublicKey, ...) (tss.ParsedMessage, error)
- func NewDGRound2Message2(to []*tss.PartyID, from *tss.PartyID) tss.ParsedMessage
- func NewDGRound3Message1(to *tss.PartyID, from *tss.PartyID, share *vss.Share) tss.ParsedMessage
- func NewDGRound3Message2(to []*tss.PartyID, from *tss.PartyID, vdct cmt.HashDeCommitment) tss.ParsedMessage
- func NewDGRound4Message1(to *tss.PartyID, from *tss.PartyID, proof *facproof.ProofFac) tss.ParsedMessage
- func NewDGRound4Message2(to []*tss.PartyID, from *tss.PartyID) tss.ParsedMessage
- func NewLocalParty(params *tss.ReSharingParameters, key keygen.LocalPartySaveData, ...) tss.Party
- type DGRound1Message
- func (*DGRound1Message) Descriptor() ([]byte, []int)deprecated
- func (x *DGRound1Message) GetEcdsaPubX() []byte
- func (x *DGRound1Message) GetEcdsaPubY() []byte
- func (x *DGRound1Message) GetSsid() []byte
- func (x *DGRound1Message) GetVCommitment() []byte
- func (*DGRound1Message) ProtoMessage()
- func (x *DGRound1Message) ProtoReflect() protoreflect.Message
- func (x *DGRound1Message) Reset()
- func (x *DGRound1Message) String() string
- func (m *DGRound1Message) UnmarshalECDSAPub(ec elliptic.Curve) (*crypto.ECPoint, error)
- func (m *DGRound1Message) UnmarshalSSID() []byte
- func (m *DGRound1Message) UnmarshalVCommitment() *big.Int
- func (m *DGRound1Message) ValidateBasic() bool
- type DGRound2Message1
- func (*DGRound2Message1) Descriptor() ([]byte, []int)deprecated
- func (x *DGRound2Message1) GetDlnproof_1() [][]byte
- func (x *DGRound2Message1) GetDlnproof_2() [][]byte
- func (x *DGRound2Message1) GetH1() []byte
- func (x *DGRound2Message1) GetH2() []byte
- func (x *DGRound2Message1) GetModProof() [][]byte
- func (x *DGRound2Message1) GetNTilde() []byte
- func (x *DGRound2Message1) GetPaillierN() []byte
- func (*DGRound2Message1) ProtoMessage()
- func (x *DGRound2Message1) ProtoReflect() protoreflect.Message
- func (x *DGRound2Message1) Reset()
- func (x *DGRound2Message1) String() string
- func (m *DGRound2Message1) UnmarshalDLNProof1() (*dlnproof.Proof, error)
- func (m *DGRound2Message1) UnmarshalDLNProof2() (*dlnproof.Proof, error)
- func (m *DGRound2Message1) UnmarshalH1() *big.Int
- func (m *DGRound2Message1) UnmarshalH2() *big.Int
- func (m *DGRound2Message1) UnmarshalModProof() (*modproof.ProofMod, error)
- func (m *DGRound2Message1) UnmarshalNTilde() *big.Int
- func (m *DGRound2Message1) UnmarshalPaillierPK() *paillier.PublicKey
- func (m *DGRound2Message1) ValidateBasic() bool
- type DGRound2Message2
- type DGRound3Message1
- func (*DGRound3Message1) Descriptor() ([]byte, []int)deprecated
- func (x *DGRound3Message1) GetShare() []byte
- func (*DGRound3Message1) ProtoMessage()
- func (x *DGRound3Message1) ProtoReflect() protoreflect.Message
- func (x *DGRound3Message1) Reset()
- func (x *DGRound3Message1) String() string
- func (m *DGRound3Message1) ValidateBasic() bool
- type DGRound3Message2
- func (*DGRound3Message2) Descriptor() ([]byte, []int)deprecated
- func (x *DGRound3Message2) GetVDecommitment() [][]byte
- func (*DGRound3Message2) ProtoMessage()
- func (x *DGRound3Message2) ProtoReflect() protoreflect.Message
- func (x *DGRound3Message2) Reset()
- func (x *DGRound3Message2) String() string
- func (m *DGRound3Message2) UnmarshalVDeCommitment() cmt.HashDeCommitment
- func (m *DGRound3Message2) ValidateBasic() bool
- type DGRound4Message1
- func (*DGRound4Message1) Descriptor() ([]byte, []int)deprecated
- func (x *DGRound4Message1) GetFacProof() [][]byte
- func (*DGRound4Message1) ProtoMessage()
- func (x *DGRound4Message1) ProtoReflect() protoreflect.Message
- func (x *DGRound4Message1) Reset()
- func (x *DGRound4Message1) String() string
- func (m *DGRound4Message1) UnmarshalFacProof() (*facproof.ProofFac, error)
- func (m *DGRound4Message1) ValidateBasic() bool
- type DGRound4Message2
- type LocalParty
- func (p *LocalParty) FirstRound() tss.Round
- func (p *LocalParty) PartyID() *tss.PartyID
- func (p *LocalParty) Start() error
- func (p *LocalParty) StoreMessage(msg tss.ParsedMessage) (bool, error)
- func (p *LocalParty) String() string
- func (p *LocalParty) Update(msg tss.ParsedMessage) (ok bool, err error)
- func (p *LocalParty) UpdateFromBytes(wireBytes []byte, from *tss.PartyID, isBroadcast bool) (bool, error)
- func (p *LocalParty) ValidateMessage(msg tss.ParsedMessage) (bool, error)
Constants ¶
const (
TaskName = "ecdsa-resharing"
)
Variables ¶
var File_protob_ecdsa_resharing_proto protoreflect.FileDescriptor
Functions ¶
func NewDGRound1Message ¶
func NewDGRound1Message( to []*tss.PartyID, from *tss.PartyID, ecdsaPub *crypto.ECPoint, vct cmt.HashCommitment, ssid []byte, ) tss.ParsedMessage
NewDGRound1Message creates a broadcast message for resharing round 1 containing the ECDSA public key, commitment, and SSID.
func NewDGRound2Message1 ¶
func NewDGRound2Message1( to []*tss.PartyID, from *tss.PartyID, paillierPK *paillier.PublicKey, modProof *modproof.ProofMod, NTildei, H1i, H2i *big.Int, dlnProof1, dlnProof2 *dlnproof.Proof, ) (tss.ParsedMessage, error)
NewDGRound2Message1 creates a broadcast message for resharing round 2 containing the Paillier key, modulus proof, and DLN proofs.
func NewDGRound2Message2 ¶
NewDGRound2Message2 creates a broadcast message from the new committee to the old committee signaling readiness.
func NewDGRound3Message1 ¶
NewDGRound3Message1 creates a point-to-point message for resharing round 3 containing a VSS share.
func NewDGRound3Message2 ¶
func NewDGRound3Message2( to []*tss.PartyID, from *tss.PartyID, vdct cmt.HashDeCommitment, ) tss.ParsedMessage
NewDGRound3Message2 creates a broadcast message for resharing round 3 containing the VSS de-commitment.
func NewDGRound4Message1 ¶
func NewDGRound4Message1( to *tss.PartyID, from *tss.PartyID, proof *facproof.ProofFac, ) tss.ParsedMessage
NewDGRound4Message1 creates a point-to-point message for resharing round 4 containing the factorization proof.
func NewDGRound4Message2 ¶
NewDGRound4Message2 creates a broadcast message for resharing round 4 sent to both old and new committees.
func NewLocalParty ¶
func NewLocalParty( params *tss.ReSharingParameters, key keygen.LocalPartySaveData, out chan<- tss.Message, end chan<- *keygen.LocalPartySaveData, ) tss.Party
Exported, used in `tss` client The `key` is read from and/or written to depending on whether this party is part of the old or the new committee. You may optionally generate and set the LocalPreParams if you would like to use pre-generated safe primes and Paillier secret. (This is similar to providing the `optionalPreParams` to `keygen.LocalParty`).
Types ¶
type DGRound1Message ¶
type DGRound1Message struct {
EcdsaPubX []byte `protobuf:"bytes,1,opt,name=ecdsa_pub_x,json=ecdsaPubX,proto3" json:"ecdsa_pub_x,omitempty"`
EcdsaPubY []byte `protobuf:"bytes,2,opt,name=ecdsa_pub_y,json=ecdsaPubY,proto3" json:"ecdsa_pub_y,omitempty"`
VCommitment []byte `protobuf:"bytes,3,opt,name=v_commitment,json=vCommitment,proto3" json:"v_commitment,omitempty"`
Ssid []byte `protobuf:"bytes,4,opt,name=ssid,proto3" json:"ssid,omitempty"`
// contains filtered or unexported fields
}
The Round 1 data is broadcast to peers of the New Committee in this message.
func (*DGRound1Message) Descriptor
deprecated
func (*DGRound1Message) Descriptor() ([]byte, []int)
Deprecated: Use DGRound1Message.ProtoReflect.Descriptor instead.
func (*DGRound1Message) GetEcdsaPubX ¶
func (x *DGRound1Message) GetEcdsaPubX() []byte
func (*DGRound1Message) GetEcdsaPubY ¶
func (x *DGRound1Message) GetEcdsaPubY() []byte
func (*DGRound1Message) GetSsid ¶
func (x *DGRound1Message) GetSsid() []byte
func (*DGRound1Message) GetVCommitment ¶
func (x *DGRound1Message) GetVCommitment() []byte
func (*DGRound1Message) ProtoMessage ¶
func (*DGRound1Message) ProtoMessage()
func (*DGRound1Message) ProtoReflect ¶
func (x *DGRound1Message) ProtoReflect() protoreflect.Message
func (*DGRound1Message) Reset ¶
func (x *DGRound1Message) Reset()
func (*DGRound1Message) String ¶
func (x *DGRound1Message) String() string
func (*DGRound1Message) UnmarshalECDSAPub ¶
UnmarshalECDSAPub deserializes the ECDSA public key from the message.
func (*DGRound1Message) UnmarshalSSID ¶
func (m *DGRound1Message) UnmarshalSSID() []byte
UnmarshalSSID deserializes the session identifier from the message.
func (*DGRound1Message) UnmarshalVCommitment ¶
func (m *DGRound1Message) UnmarshalVCommitment() *big.Int
UnmarshalVCommitment deserializes the VSS commitment from the message.
func (*DGRound1Message) ValidateBasic ¶
func (m *DGRound1Message) ValidateBasic() bool
ValidateBasic checks that all required fields in the resharing round 1 message are non-empty.
type DGRound2Message1 ¶
type DGRound2Message1 struct {
PaillierN []byte `protobuf:"bytes,1,opt,name=paillier_n,json=paillierN,proto3" json:"paillier_n,omitempty"`
ModProof [][]byte `protobuf:"bytes,2,rep,name=modProof,proto3" json:"modProof,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
}
The Round 2 data is broadcast to other peers of the New Committee in this message.
func (*DGRound2Message1) Descriptor
deprecated
func (*DGRound2Message1) Descriptor() ([]byte, []int)
Deprecated: Use DGRound2Message1.ProtoReflect.Descriptor instead.
func (*DGRound2Message1) GetDlnproof_1 ¶
func (x *DGRound2Message1) GetDlnproof_1() [][]byte
func (*DGRound2Message1) GetDlnproof_2 ¶
func (x *DGRound2Message1) GetDlnproof_2() [][]byte
func (*DGRound2Message1) GetH1 ¶
func (x *DGRound2Message1) GetH1() []byte
func (*DGRound2Message1) GetH2 ¶
func (x *DGRound2Message1) GetH2() []byte
func (*DGRound2Message1) GetModProof ¶
func (x *DGRound2Message1) GetModProof() [][]byte
func (*DGRound2Message1) GetNTilde ¶
func (x *DGRound2Message1) GetNTilde() []byte
func (*DGRound2Message1) GetPaillierN ¶
func (x *DGRound2Message1) GetPaillierN() []byte
func (*DGRound2Message1) ProtoMessage ¶
func (*DGRound2Message1) ProtoMessage()
func (*DGRound2Message1) ProtoReflect ¶
func (x *DGRound2Message1) ProtoReflect() protoreflect.Message
func (*DGRound2Message1) Reset ¶
func (x *DGRound2Message1) Reset()
func (*DGRound2Message1) String ¶
func (x *DGRound2Message1) String() string
func (*DGRound2Message1) UnmarshalDLNProof1 ¶
func (m *DGRound2Message1) UnmarshalDLNProof1() (*dlnproof.Proof, error)
UnmarshalDLNProof1 deserializes the first DLN proof from the message.
func (*DGRound2Message1) UnmarshalDLNProof2 ¶
func (m *DGRound2Message1) UnmarshalDLNProof2() (*dlnproof.Proof, error)
UnmarshalDLNProof2 deserializes the second DLN proof from the message.
func (*DGRound2Message1) UnmarshalH1 ¶
func (m *DGRound2Message1) UnmarshalH1() *big.Int
UnmarshalH1 deserializes the H1 value from the message.
func (*DGRound2Message1) UnmarshalH2 ¶
func (m *DGRound2Message1) UnmarshalH2() *big.Int
UnmarshalH2 deserializes the H2 value from the message.
func (*DGRound2Message1) UnmarshalModProof ¶
func (m *DGRound2Message1) UnmarshalModProof() (*modproof.ProofMod, error)
UnmarshalModProof deserializes the modulus proof from the message.
func (*DGRound2Message1) UnmarshalNTilde ¶
func (m *DGRound2Message1) UnmarshalNTilde() *big.Int
UnmarshalNTilde deserializes the NTilde value from the message.
func (*DGRound2Message1) UnmarshalPaillierPK ¶
func (m *DGRound2Message1) UnmarshalPaillierPK() *paillier.PublicKey
UnmarshalPaillierPK deserializes the Paillier public key from the message.
func (*DGRound2Message1) ValidateBasic ¶
func (m *DGRound2Message1) ValidateBasic() bool
ValidateBasic checks that all required fields in the resharing round 2 message 1 are non-empty.
type DGRound2Message2 ¶
type DGRound2Message2 struct {
// contains filtered or unexported fields
}
The Round 2 "ACK" is broadcast to peers of the Old Committee in this message.
func (*DGRound2Message2) Descriptor
deprecated
func (*DGRound2Message2) Descriptor() ([]byte, []int)
Deprecated: Use DGRound2Message2.ProtoReflect.Descriptor instead.
func (*DGRound2Message2) ProtoMessage ¶
func (*DGRound2Message2) ProtoMessage()
func (*DGRound2Message2) ProtoReflect ¶
func (x *DGRound2Message2) ProtoReflect() protoreflect.Message
func (*DGRound2Message2) Reset ¶
func (x *DGRound2Message2) Reset()
func (*DGRound2Message2) String ¶
func (x *DGRound2Message2) String() string
func (*DGRound2Message2) ValidateBasic ¶
func (m *DGRound2Message2) ValidateBasic() bool
ValidateBasic always returns true as this message carries no payload.
type DGRound3Message1 ¶
type DGRound3Message1 struct {
// contains filtered or unexported fields
}
The Round 3 data is sent to peers of the New Committee in this message.
func (*DGRound3Message1) Descriptor
deprecated
func (*DGRound3Message1) Descriptor() ([]byte, []int)
Deprecated: Use DGRound3Message1.ProtoReflect.Descriptor instead.
func (*DGRound3Message1) GetShare ¶
func (x *DGRound3Message1) GetShare() []byte
func (*DGRound3Message1) ProtoMessage ¶
func (*DGRound3Message1) ProtoMessage()
func (*DGRound3Message1) ProtoReflect ¶
func (x *DGRound3Message1) ProtoReflect() protoreflect.Message
func (*DGRound3Message1) Reset ¶
func (x *DGRound3Message1) Reset()
func (*DGRound3Message1) String ¶
func (x *DGRound3Message1) String() string
func (*DGRound3Message1) ValidateBasic ¶
func (m *DGRound3Message1) ValidateBasic() bool
ValidateBasic checks that the share field in the resharing round 3 message 1 is non-empty.
type DGRound3Message2 ¶
type DGRound3Message2 struct {
VDecommitment [][]byte `protobuf:"bytes,1,rep,name=v_decommitment,json=vDecommitment,proto3" json:"v_decommitment,omitempty"`
// contains filtered or unexported fields
}
The Round 3 data is broadcast to peers of the New Committee in this message.
func (*DGRound3Message2) Descriptor
deprecated
func (*DGRound3Message2) Descriptor() ([]byte, []int)
Deprecated: Use DGRound3Message2.ProtoReflect.Descriptor instead.
func (*DGRound3Message2) GetVDecommitment ¶
func (x *DGRound3Message2) GetVDecommitment() [][]byte
func (*DGRound3Message2) ProtoMessage ¶
func (*DGRound3Message2) ProtoMessage()
func (*DGRound3Message2) ProtoReflect ¶
func (x *DGRound3Message2) ProtoReflect() protoreflect.Message
func (*DGRound3Message2) Reset ¶
func (x *DGRound3Message2) Reset()
func (*DGRound3Message2) String ¶
func (x *DGRound3Message2) String() string
func (*DGRound3Message2) UnmarshalVDeCommitment ¶
func (m *DGRound3Message2) UnmarshalVDeCommitment() cmt.HashDeCommitment
UnmarshalVDeCommitment deserializes the VSS de-commitment from the message.
func (*DGRound3Message2) ValidateBasic ¶
func (m *DGRound3Message2) ValidateBasic() bool
ValidateBasic checks that the de-commitment field in the resharing round 3 message 2 is non-empty.
type DGRound4Message1 ¶
type DGRound4Message1 struct {
FacProof [][]byte `protobuf:"bytes,1,rep,name=facProof,proto3" json:"facProof,omitempty"`
// contains filtered or unexported fields
}
The Round 4 message to peers of New Committees from the New Committee in this message.
func (*DGRound4Message1) Descriptor
deprecated
func (*DGRound4Message1) Descriptor() ([]byte, []int)
Deprecated: Use DGRound4Message1.ProtoReflect.Descriptor instead.
func (*DGRound4Message1) GetFacProof ¶
func (x *DGRound4Message1) GetFacProof() [][]byte
func (*DGRound4Message1) ProtoMessage ¶
func (*DGRound4Message1) ProtoMessage()
func (*DGRound4Message1) ProtoReflect ¶
func (x *DGRound4Message1) ProtoReflect() protoreflect.Message
func (*DGRound4Message1) Reset ¶
func (x *DGRound4Message1) Reset()
func (*DGRound4Message1) String ¶
func (x *DGRound4Message1) String() string
func (*DGRound4Message1) UnmarshalFacProof ¶
func (m *DGRound4Message1) UnmarshalFacProof() (*facproof.ProofFac, error)
UnmarshalFacProof deserializes the factorization proof from the message.
func (*DGRound4Message1) ValidateBasic ¶
func (m *DGRound4Message1) ValidateBasic() bool
ValidateBasic checks that the round 4 message 1 is non-nil.
type DGRound4Message2 ¶
type DGRound4Message2 struct {
// contains filtered or unexported fields
}
The Round 4 "ACK" is broadcast to peers of the Old and New Committees from the New Committee in this message.
func (*DGRound4Message2) Descriptor
deprecated
func (*DGRound4Message2) Descriptor() ([]byte, []int)
Deprecated: Use DGRound4Message2.ProtoReflect.Descriptor instead.
func (*DGRound4Message2) ProtoMessage ¶
func (*DGRound4Message2) ProtoMessage()
func (*DGRound4Message2) ProtoReflect ¶
func (x *DGRound4Message2) ProtoReflect() protoreflect.Message
func (*DGRound4Message2) Reset ¶
func (x *DGRound4Message2) Reset()
func (*DGRound4Message2) String ¶
func (x *DGRound4Message2) String() string
func (*DGRound4Message2) ValidateBasic ¶
func (m *DGRound4Message2) ValidateBasic() bool
ValidateBasic always returns true as this message carries no payload.
type LocalParty ¶
LocalParty represents a local participant in the ECDSA key resharing protocol.
func (*LocalParty) FirstRound ¶
func (p *LocalParty) FirstRound() tss.Round
FirstRound returns the first round of the ECDSA resharing protocol.
func (*LocalParty) PartyID ¶
func (p *LocalParty) PartyID() *tss.PartyID
PartyID returns the party's unique identifier.
func (*LocalParty) Start ¶
func (p *LocalParty) Start() error
Start begins the resharing protocol for this party.
func (*LocalParty) StoreMessage ¶
func (p *LocalParty) StoreMessage(msg tss.ParsedMessage) (bool, error)
StoreMessage validates and stores a protocol message in the appropriate round message slot.
func (*LocalParty) String ¶
func (p *LocalParty) String() string
String returns a human-readable representation of this party.
func (*LocalParty) Update ¶
func (p *LocalParty) Update(msg tss.ParsedMessage) (ok bool, err error)
Update processes a parsed protocol message for this party.
func (*LocalParty) UpdateFromBytes ¶
func (p *LocalParty) UpdateFromBytes(wireBytes []byte, from *tss.PartyID, isBroadcast bool) (bool, error)
UpdateFromBytes parses raw wire bytes into a message and updates this party.
func (*LocalParty) ValidateMessage ¶
func (p *LocalParty) ValidateMessage(msg tss.ParsedMessage) (bool, error)
ValidateMessage checks that the given message is well-formed and from a valid sender index.