signing

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TaskName = "signing"
)

Variables

View Source
var File_protob_ecdsa_signing_proto protoreflect.FileDescriptor

Functions

func HashToInt added in v0.0.4

func HashToInt(hash []byte, N *big.Int) *big.Int

func NewLocalParty

func NewLocalParty(
	msg *big.Int,
	params *tss.Parameters,
	key keygen.LocalPartySaveData,
	out chan<- tss.Message,
	end chan<- common.SignatureData) tss.Party

func NewLocalPartyWithKDD

func NewLocalPartyWithKDD(
	msg *big.Int,
	params *tss.Parameters,
	key keygen.LocalPartySaveData,
	keyDerivationDelta *big.Int,
	out chan<- tss.Message,
	end chan<- common.SignatureData,
) tss.Party

NewLocalPartyWithKDD returns a party with key derivation delta for HD support

func NewSignRound1Message1

func NewSignRound1Message1(
	to, from *tss.PartyID,
	c *big.Int,
	proof *mta.RangeProofAlice,
) tss.ParsedMessage

func NewSignRound1Message2

func NewSignRound1Message2(
	from *tss.PartyID,
	commitment cmt.HashCommitment,
) tss.ParsedMessage

func NewSignRound2Message

func NewSignRound2Message(
	to, from *tss.PartyID,
	c1Ji *big.Int,
	pi1Ji *mta.ProofBob,
	c2Ji *big.Int,
	pi2Ji *mta.ProofBobWC,
) tss.ParsedMessage

func NewSignRound3Message

func NewSignRound3Message(
	from *tss.PartyID,
	theta *big.Int,
) tss.ParsedMessage

func NewSignRound4Message

func NewSignRound4Message(
	from *tss.PartyID,
	deCommitment cmt.HashDeCommitment,
	proof *schnorr.ZKProof,
) tss.ParsedMessage

func NewSignRound5Message

func NewSignRound5Message(
	from *tss.PartyID,
	commitment cmt.HashCommitment,
) tss.ParsedMessage

func NewSignRound6Message

func NewSignRound6Message(
	from *tss.PartyID,
	deCommitment cmt.HashDeCommitment,
	proof *schnorr.ZKProof,
	vProof *schnorr.ZKVProof,
) tss.ParsedMessage

func NewSignRound7Message

func NewSignRound7Message(
	from *tss.PartyID,
	commitment cmt.HashCommitment,
) tss.ParsedMessage

func NewSignRound8Message

func NewSignRound8Message(
	from *tss.PartyID,
	deCommitment cmt.HashDeCommitment,
) tss.ParsedMessage

func NewSignRound9Message

func NewSignRound9Message(
	from *tss.PartyID,
	si *big.Int,
	yi_x,
	yi_y *big.Int,
	qi_x,
	qi_y *big.Int,
) tss.ParsedMessage

func PrepareForSigning

func PrepareForSigning(ec elliptic.Curve, i, pax int, xi *big.Int, ks []*big.Int, bigXs []*crypto.ECPoint) (wi *big.Int, bigWs []*crypto.ECPoint)

PrepareForSigning(), GG18Spec (11) Fig. 14

func UpdatePublicKeyAndAdjustBigXj

func UpdatePublicKeyAndAdjustBigXj(keyDerivationDelta *big.Int, keys []keygen.LocalPartySaveData, extendedChildPk *ecdsa.PublicKey, ec elliptic.Curve) error

Types

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) 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)

type SignRound1Message1

type SignRound1Message1 struct {
	C               []byte   `protobuf:"bytes,1,opt,name=c,proto3" json:"c,omitempty"`
	RangeProofAlice [][]byte `protobuf:"bytes,2,rep,name=range_proof_alice,json=rangeProofAlice,proto3" json:"range_proof_alice,omitempty"`
	// contains filtered or unexported fields
}

func (*SignRound1Message1) Descriptor deprecated

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

Deprecated: Use SignRound1Message1.ProtoReflect.Descriptor instead.

func (*SignRound1Message1) GetC

func (x *SignRound1Message1) GetC() []byte

func (*SignRound1Message1) GetRangeProofAlice

func (x *SignRound1Message1) GetRangeProofAlice() [][]byte

func (*SignRound1Message1) ProtoMessage

func (*SignRound1Message1) ProtoMessage()

func (*SignRound1Message1) ProtoReflect

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

func (*SignRound1Message1) Reset

func (x *SignRound1Message1) Reset()

func (*SignRound1Message1) String

func (x *SignRound1Message1) String() string

func (*SignRound1Message1) UnmarshalC

func (m *SignRound1Message1) UnmarshalC() *big.Int

func (*SignRound1Message1) UnmarshalRangeProofAlice

func (m *SignRound1Message1) UnmarshalRangeProofAlice() (*mta.RangeProofAlice, error)

func (*SignRound1Message1) ValidateBasic

func (m *SignRound1Message1) ValidateBasic() bool

type SignRound1Message2

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

Represents a BROADCAST message sent to all parties during Round 1 of the ECDSA TSS signing protocol.

func (*SignRound1Message2) Descriptor deprecated

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

Deprecated: Use SignRound1Message2.ProtoReflect.Descriptor instead.

func (*SignRound1Message2) GetCommitment

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

func (*SignRound1Message2) ProtoMessage

func (*SignRound1Message2) ProtoMessage()

func (*SignRound1Message2) ProtoReflect

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

func (*SignRound1Message2) Reset

func (x *SignRound1Message2) Reset()

func (*SignRound1Message2) String

func (x *SignRound1Message2) String() string

func (*SignRound1Message2) UnmarshalCommitment

func (m *SignRound1Message2) UnmarshalCommitment() *big.Int

func (*SignRound1Message2) ValidateBasic

func (m *SignRound1Message2) ValidateBasic() bool

type SignRound2Message

type SignRound2Message struct {
	C1         []byte   `protobuf:"bytes,1,opt,name=c1,proto3" json:"c1,omitempty"`
	C2         []byte   `protobuf:"bytes,2,opt,name=c2,proto3" json:"c2,omitempty"`
	ProofBob   [][]byte `protobuf:"bytes,3,rep,name=proof_bob,json=proofBob,proto3" json:"proof_bob,omitempty"`
	ProofBobWc [][]byte `protobuf:"bytes,4,rep,name=proof_bob_wc,json=proofBobWc,proto3" json:"proof_bob_wc,omitempty"`
	// contains filtered or unexported fields
}

Represents a P2P message sent to each party during Round 2 of the ECDSA TSS signing protocol.

func (*SignRound2Message) Descriptor deprecated

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

Deprecated: Use SignRound2Message.ProtoReflect.Descriptor instead.

func (*SignRound2Message) GetC1

func (x *SignRound2Message) GetC1() []byte

func (*SignRound2Message) GetC2

func (x *SignRound2Message) GetC2() []byte

func (*SignRound2Message) GetProofBob

func (x *SignRound2Message) GetProofBob() [][]byte

func (*SignRound2Message) GetProofBobWc

func (x *SignRound2Message) GetProofBobWc() [][]byte

func (*SignRound2Message) ProtoMessage

func (*SignRound2Message) ProtoMessage()

func (*SignRound2Message) ProtoReflect

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

func (*SignRound2Message) Reset

func (x *SignRound2Message) Reset()

func (*SignRound2Message) String

func (x *SignRound2Message) String() string

func (*SignRound2Message) UnmarshalProofBob

func (m *SignRound2Message) UnmarshalProofBob() (*mta.ProofBob, error)

func (*SignRound2Message) UnmarshalProofBobWC

func (m *SignRound2Message) UnmarshalProofBobWC(ec elliptic.Curve) (*mta.ProofBobWC, error)

func (*SignRound2Message) ValidateBasic

func (m *SignRound2Message) ValidateBasic() bool

type SignRound3Message

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

Represents a BROADCAST message sent to all parties during Round 3 of the ECDSA TSS signing protocol.

func (*SignRound3Message) Descriptor deprecated

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

Deprecated: Use SignRound3Message.ProtoReflect.Descriptor instead.

func (*SignRound3Message) GetTheta

func (x *SignRound3Message) GetTheta() []byte

func (*SignRound3Message) ProtoMessage

func (*SignRound3Message) ProtoMessage()

func (*SignRound3Message) ProtoReflect

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

func (*SignRound3Message) Reset

func (x *SignRound3Message) Reset()

func (*SignRound3Message) String

func (x *SignRound3Message) String() string

func (*SignRound3Message) ValidateBasic

func (m *SignRound3Message) ValidateBasic() bool

type SignRound4Message

type SignRound4Message struct {
	DeCommitment [][]byte `protobuf:"bytes,1,rep,name=de_commitment,json=deCommitment,proto3" json:"de_commitment,omitempty"`
	ProofAlphaX  []byte   `protobuf:"bytes,2,opt,name=proof_alpha_x,json=proofAlphaX,proto3" json:"proof_alpha_x,omitempty"`
	ProofAlphaY  []byte   `protobuf:"bytes,3,opt,name=proof_alpha_y,json=proofAlphaY,proto3" json:"proof_alpha_y,omitempty"`
	ProofT       []byte   `protobuf:"bytes,4,opt,name=proof_t,json=proofT,proto3" json:"proof_t,omitempty"`
	// contains filtered or unexported fields
}

Represents a BROADCAST message sent to all parties during Round 4 of the ECDSA TSS signing protocol.

func (*SignRound4Message) Descriptor deprecated

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

Deprecated: Use SignRound4Message.ProtoReflect.Descriptor instead.

func (*SignRound4Message) GetDeCommitment

func (x *SignRound4Message) GetDeCommitment() [][]byte

func (*SignRound4Message) GetProofAlphaX

func (x *SignRound4Message) GetProofAlphaX() []byte

func (*SignRound4Message) GetProofAlphaY

func (x *SignRound4Message) GetProofAlphaY() []byte

func (*SignRound4Message) GetProofT

func (x *SignRound4Message) GetProofT() []byte

func (*SignRound4Message) ProtoMessage

func (*SignRound4Message) ProtoMessage()

func (*SignRound4Message) ProtoReflect

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

func (*SignRound4Message) Reset

func (x *SignRound4Message) Reset()

func (*SignRound4Message) String

func (x *SignRound4Message) String() string

func (*SignRound4Message) UnmarshalDeCommitment

func (m *SignRound4Message) UnmarshalDeCommitment() []*big.Int

func (*SignRound4Message) UnmarshalZKProof

func (m *SignRound4Message) UnmarshalZKProof(ec elliptic.Curve) (*schnorr.ZKProof, error)

func (*SignRound4Message) ValidateBasic

func (m *SignRound4Message) ValidateBasic() bool

type SignRound5Message

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

Represents a BROADCAST message sent to all parties during Round 5 of the ECDSA TSS signing protocol.

func (*SignRound5Message) Descriptor deprecated

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

Deprecated: Use SignRound5Message.ProtoReflect.Descriptor instead.

func (*SignRound5Message) GetCommitment

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

func (*SignRound5Message) ProtoMessage

func (*SignRound5Message) ProtoMessage()

func (*SignRound5Message) ProtoReflect

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

func (*SignRound5Message) Reset

func (x *SignRound5Message) Reset()

func (*SignRound5Message) String

func (x *SignRound5Message) String() string

func (*SignRound5Message) UnmarshalCommitment

func (m *SignRound5Message) UnmarshalCommitment() *big.Int

func (*SignRound5Message) ValidateBasic

func (m *SignRound5Message) ValidateBasic() bool

type SignRound6Message

type SignRound6Message struct {
	DeCommitment [][]byte `protobuf:"bytes,1,rep,name=de_commitment,json=deCommitment,proto3" json:"de_commitment,omitempty"`
	ProofAlphaX  []byte   `protobuf:"bytes,2,opt,name=proof_alpha_x,json=proofAlphaX,proto3" json:"proof_alpha_x,omitempty"`
	ProofAlphaY  []byte   `protobuf:"bytes,3,opt,name=proof_alpha_y,json=proofAlphaY,proto3" json:"proof_alpha_y,omitempty"`
	ProofT       []byte   `protobuf:"bytes,4,opt,name=proof_t,json=proofT,proto3" json:"proof_t,omitempty"`
	VProofAlphaX []byte   `protobuf:"bytes,5,opt,name=v_proof_alpha_x,json=vProofAlphaX,proto3" json:"v_proof_alpha_x,omitempty"`
	VProofAlphaY []byte   `protobuf:"bytes,6,opt,name=v_proof_alpha_y,json=vProofAlphaY,proto3" json:"v_proof_alpha_y,omitempty"`
	VProofT      []byte   `protobuf:"bytes,7,opt,name=v_proof_t,json=vProofT,proto3" json:"v_proof_t,omitempty"`
	VProofU      []byte   `protobuf:"bytes,8,opt,name=v_proof_u,json=vProofU,proto3" json:"v_proof_u,omitempty"`
	// contains filtered or unexported fields
}

Represents a BROADCAST message sent to all parties during Round 6 of the ECDSA TSS signing protocol.

func (*SignRound6Message) Descriptor deprecated

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

Deprecated: Use SignRound6Message.ProtoReflect.Descriptor instead.

func (*SignRound6Message) GetDeCommitment

func (x *SignRound6Message) GetDeCommitment() [][]byte

func (*SignRound6Message) GetProofAlphaX

func (x *SignRound6Message) GetProofAlphaX() []byte

func (*SignRound6Message) GetProofAlphaY

func (x *SignRound6Message) GetProofAlphaY() []byte

func (*SignRound6Message) GetProofT

func (x *SignRound6Message) GetProofT() []byte

func (*SignRound6Message) GetVProofAlphaX

func (x *SignRound6Message) GetVProofAlphaX() []byte

func (*SignRound6Message) GetVProofAlphaY

func (x *SignRound6Message) GetVProofAlphaY() []byte

func (*SignRound6Message) GetVProofT

func (x *SignRound6Message) GetVProofT() []byte

func (*SignRound6Message) GetVProofU

func (x *SignRound6Message) GetVProofU() []byte

func (*SignRound6Message) ProtoMessage

func (*SignRound6Message) ProtoMessage()

func (*SignRound6Message) ProtoReflect

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

func (*SignRound6Message) Reset

func (x *SignRound6Message) Reset()

func (*SignRound6Message) String

func (x *SignRound6Message) String() string

func (*SignRound6Message) UnmarshalDeCommitment

func (m *SignRound6Message) UnmarshalDeCommitment() []*big.Int

func (*SignRound6Message) UnmarshalZKProof

func (m *SignRound6Message) UnmarshalZKProof(ec elliptic.Curve) (*schnorr.ZKProof, error)

func (*SignRound6Message) UnmarshalZKVProof

func (m *SignRound6Message) UnmarshalZKVProof(ec elliptic.Curve) (*schnorr.ZKVProof, error)

func (*SignRound6Message) ValidateBasic

func (m *SignRound6Message) ValidateBasic() bool

type SignRound7Message

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

Represents a BROADCAST message sent to all parties during Round 7 of the ECDSA TSS signing protocol.

func (*SignRound7Message) Descriptor deprecated

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

Deprecated: Use SignRound7Message.ProtoReflect.Descriptor instead.

func (*SignRound7Message) GetCommitment

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

func (*SignRound7Message) ProtoMessage

func (*SignRound7Message) ProtoMessage()

func (*SignRound7Message) ProtoReflect

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

func (*SignRound7Message) Reset

func (x *SignRound7Message) Reset()

func (*SignRound7Message) String

func (x *SignRound7Message) String() string

func (*SignRound7Message) UnmarshalCommitment

func (m *SignRound7Message) UnmarshalCommitment() *big.Int

func (*SignRound7Message) ValidateBasic

func (m *SignRound7Message) ValidateBasic() bool

type SignRound8Message

type SignRound8Message 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 all parties during Round 8 of the ECDSA TSS signing protocol.

func (*SignRound8Message) Descriptor deprecated

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

Deprecated: Use SignRound8Message.ProtoReflect.Descriptor instead.

func (*SignRound8Message) GetDeCommitment

func (x *SignRound8Message) GetDeCommitment() [][]byte

func (*SignRound8Message) ProtoMessage

func (*SignRound8Message) ProtoMessage()

func (*SignRound8Message) ProtoReflect

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

func (*SignRound8Message) Reset

func (x *SignRound8Message) Reset()

func (*SignRound8Message) String

func (x *SignRound8Message) String() string

func (*SignRound8Message) UnmarshalDeCommitment

func (m *SignRound8Message) UnmarshalDeCommitment() []*big.Int

func (*SignRound8Message) ValidateBasic

func (m *SignRound8Message) ValidateBasic() bool

type SignRound9Message

type SignRound9Message struct {
	S   []byte `protobuf:"bytes,1,opt,name=s,proto3" json:"s,omitempty"`
	YiX []byte `protobuf:"bytes,2,opt,name=Yi_x,json=YiX,proto3" json:"Yi_x,omitempty"`
	YiY []byte `protobuf:"bytes,3,opt,name=Yi_y,json=YiY,proto3" json:"Yi_y,omitempty"`
	QiX []byte `protobuf:"bytes,4,opt,name=Qi_x,json=QiX,proto3" json:"Qi_x,omitempty"`
	QiY []byte `protobuf:"bytes,5,opt,name=Qi_y,json=QiY,proto3" json:"Qi_y,omitempty"`
	// contains filtered or unexported fields
}

Represents a BROADCAST message sent to all parties during Round 9 of the ECDSA TSS signing protocol.

func (*SignRound9Message) Descriptor deprecated

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

Deprecated: Use SignRound9Message.ProtoReflect.Descriptor instead.

func (*SignRound9Message) GetQiX added in v0.0.4

func (x *SignRound9Message) GetQiX() []byte

func (*SignRound9Message) GetQiY added in v0.0.4

func (x *SignRound9Message) GetQiY() []byte

func (*SignRound9Message) GetS

func (x *SignRound9Message) GetS() []byte

func (*SignRound9Message) GetYiX added in v0.0.4

func (x *SignRound9Message) GetYiX() []byte

func (*SignRound9Message) GetYiY added in v0.0.4

func (x *SignRound9Message) GetYiY() []byte

func (*SignRound9Message) ProtoMessage

func (*SignRound9Message) ProtoMessage()

func (*SignRound9Message) ProtoReflect

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

func (*SignRound9Message) Reset

func (x *SignRound9Message) Reset()

func (*SignRound9Message) String

func (x *SignRound9Message) String() string

func (*SignRound9Message) UnmarshalS

func (m *SignRound9Message) UnmarshalS() *big.Int

func (*SignRound9Message) ValidateBasic

func (m *SignRound9Message) ValidateBasic() bool

func (*SignRound9Message) Verify_Part_Sign added in v0.0.4

func (m *SignRound9Message) Verify_Part_Sign(ec elliptic.Curve, message, rx *big.Int) bool

Jump to

Keyboard shortcuts

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