signer

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 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: "Pubkey",
		1: "EncK",
		2: "Mta",
		3: "Delta",
		4: "ProofAi",
		5: "CommitViAi",
		6: "DecommitViAi",
		7: "CommitUiTi",
		8: "DecommitUiTi",
		9: "Si",
	}
	Type_value = map[string]int32{
		"Pubkey":       0,
		"EncK":         1,
		"Mta":          2,
		"Delta":        3,
		"ProofAi":      4,
		"CommitViAi":   5,
		"DecommitViAi": 6,
		"CommitUiTi":   7,
		"DecommitUiTi": 8,
		"Si":           9,
	}
)

Enum value maps for Type.

View Source
var (
	ErrInconsistentUT = errors.New("inconsistent U and T")
)
View Source
var (
	// ErrIndentityR is returned if the R is an identity element
	ErrIndentityR = errors.New("identity r")
)
View Source
var (
	ErrPeerNotFound = errors.New("peer message not found")
)
View Source
var (
	// ErrUnexpectedPublickey is returned if the public key is unexpected
	ErrUnexpectedPublickey = errors.New("unexpected public key")
)
View Source
var (

	// ErrZeroS is returned if the s is zero
	ErrZeroS = errors.New("zero s")
)
View Source
var File_github_com_getamis_alice_crypto_tss_ecdsa_gg18_signer_message_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type BodyCommitUiTi

type BodyCommitUiTi struct {
	UiCommitment *commitment.HashCommitmentMessage `protobuf:"bytes,1,opt,name=uiCommitment,proto3" json:"uiCommitment,omitempty"`
	TiCommitment *commitment.HashCommitmentMessage `protobuf:"bytes,2,opt,name=tiCommitment,proto3" json:"tiCommitment,omitempty"`
	// contains filtered or unexported fields
}

func (*BodyCommitUiTi) Descriptor deprecated

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

Deprecated: Use BodyCommitUiTi.ProtoReflect.Descriptor instead.

func (*BodyCommitUiTi) GetTiCommitment

func (x *BodyCommitUiTi) GetTiCommitment() *commitment.HashCommitmentMessage

func (*BodyCommitUiTi) GetUiCommitment

func (x *BodyCommitUiTi) GetUiCommitment() *commitment.HashCommitmentMessage

func (*BodyCommitUiTi) ProtoMessage

func (*BodyCommitUiTi) ProtoMessage()

func (*BodyCommitUiTi) ProtoReflect

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

func (*BodyCommitUiTi) Reset

func (x *BodyCommitUiTi) Reset()

func (*BodyCommitUiTi) String

func (x *BodyCommitUiTi) String() string

type BodyCommitViAi

type BodyCommitViAi struct {
	ViCommitment *commitment.HashCommitmentMessage `protobuf:"bytes,1,opt,name=viCommitment,proto3" json:"viCommitment,omitempty"`
	AiCommitment *commitment.HashCommitmentMessage `protobuf:"bytes,2,opt,name=aiCommitment,proto3" json:"aiCommitment,omitempty"`
	// contains filtered or unexported fields
}

func (*BodyCommitViAi) Descriptor deprecated

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

Deprecated: Use BodyCommitViAi.ProtoReflect.Descriptor instead.

func (*BodyCommitViAi) GetAiCommitment

func (x *BodyCommitViAi) GetAiCommitment() *commitment.HashCommitmentMessage

func (*BodyCommitViAi) GetViCommitment

func (x *BodyCommitViAi) GetViCommitment() *commitment.HashCommitmentMessage

func (*BodyCommitViAi) ProtoMessage

func (*BodyCommitViAi) ProtoMessage()

func (*BodyCommitViAi) ProtoReflect

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

func (*BodyCommitViAi) Reset

func (x *BodyCommitViAi) Reset()

func (*BodyCommitViAi) String

func (x *BodyCommitViAi) String() string

type BodyDecommitUiTi

type BodyDecommitUiTi struct {
	UiDecommitment *commitment.HashDecommitmentMessage `protobuf:"bytes,1,opt,name=uiDecommitment,proto3" json:"uiDecommitment,omitempty"`
	TiDecommitment *commitment.HashDecommitmentMessage `protobuf:"bytes,2,opt,name=tiDecommitment,proto3" json:"tiDecommitment,omitempty"`
	// contains filtered or unexported fields
}

func (*BodyDecommitUiTi) Descriptor deprecated

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

Deprecated: Use BodyDecommitUiTi.ProtoReflect.Descriptor instead.

func (*BodyDecommitUiTi) GetTiDecommitment

func (x *BodyDecommitUiTi) GetTiDecommitment() *commitment.HashDecommitmentMessage

func (*BodyDecommitUiTi) GetUiDecommitment

func (x *BodyDecommitUiTi) GetUiDecommitment() *commitment.HashDecommitmentMessage

func (*BodyDecommitUiTi) ProtoMessage

func (*BodyDecommitUiTi) ProtoMessage()

func (*BodyDecommitUiTi) ProtoReflect

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

func (*BodyDecommitUiTi) Reset

func (x *BodyDecommitUiTi) Reset()

func (*BodyDecommitUiTi) String

func (x *BodyDecommitUiTi) String() string

type BodyDecommitViAi

type BodyDecommitViAi struct {
	ViDecommitment *commitment.HashDecommitmentMessage `protobuf:"bytes,1,opt,name=viDecommitment,proto3" json:"viDecommitment,omitempty"`
	AiDecommitment *commitment.HashDecommitmentMessage `protobuf:"bytes,2,opt,name=aiDecommitment,proto3" json:"aiDecommitment,omitempty"`
	RhoIProof      *zkproof.SchnorrProofMessage        `protobuf:"bytes,3,opt,name=rhoIProof,proto3" json:"rhoIProof,omitempty"`
	LiProof        *zkproof.SchnorrProofMessage        `protobuf:"bytes,4,opt,name=liProof,proto3" json:"liProof,omitempty"`
	// contains filtered or unexported fields
}

func (*BodyDecommitViAi) Descriptor deprecated

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

Deprecated: Use BodyDecommitViAi.ProtoReflect.Descriptor instead.

func (*BodyDecommitViAi) GetAiDecommitment

func (x *BodyDecommitViAi) GetAiDecommitment() *commitment.HashDecommitmentMessage

func (*BodyDecommitViAi) GetLiProof

func (x *BodyDecommitViAi) GetLiProof() *zkproof.SchnorrProofMessage

func (*BodyDecommitViAi) GetRhoIProof

func (x *BodyDecommitViAi) GetRhoIProof() *zkproof.SchnorrProofMessage

func (*BodyDecommitViAi) GetViDecommitment

func (x *BodyDecommitViAi) GetViDecommitment() *commitment.HashDecommitmentMessage

func (*BodyDecommitViAi) ProtoMessage

func (*BodyDecommitViAi) ProtoMessage()

func (*BodyDecommitViAi) ProtoReflect

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

func (*BodyDecommitViAi) Reset

func (x *BodyDecommitViAi) Reset()

func (*BodyDecommitViAi) String

func (x *BodyDecommitViAi) String() string

type BodyDelta

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

func (*BodyDelta) Descriptor deprecated

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

Deprecated: Use BodyDelta.ProtoReflect.Descriptor instead.

func (*BodyDelta) GetDelta

func (x *BodyDelta) GetDelta() []byte

func (*BodyDelta) ProtoMessage

func (*BodyDelta) ProtoMessage()

func (*BodyDelta) ProtoReflect

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

func (*BodyDelta) Reset

func (x *BodyDelta) Reset()

func (*BodyDelta) String

func (x *BodyDelta) String() string

type BodyEncK

type BodyEncK struct {
	Enck []byte `protobuf:"bytes,2,opt,name=enck,proto3" json:"enck,omitempty"`
	// contains filtered or unexported fields
}

func (*BodyEncK) Descriptor deprecated

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

Deprecated: Use BodyEncK.ProtoReflect.Descriptor instead.

func (*BodyEncK) GetEnck

func (x *BodyEncK) GetEnck() []byte

func (*BodyEncK) ProtoMessage

func (*BodyEncK) ProtoMessage()

func (*BodyEncK) ProtoReflect

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

func (*BodyEncK) Reset

func (x *BodyEncK) Reset()

func (*BodyEncK) String

func (x *BodyEncK) String() string

type BodyMta

type BodyMta struct {
	EncAiAlpha []byte `protobuf:"bytes,1,opt,name=encAiAlpha,proto3" json:"encAiAlpha,omitempty"`
	EncWiAlpha []byte `protobuf:"bytes,2,opt,name=encWiAlpha,proto3" json:"encWiAlpha,omitempty"`
	AiProof    []byte `protobuf:"bytes,3,opt,name=aiProof,proto3" json:"aiProof,omitempty"`
	WiProof    []byte `protobuf:"bytes,4,opt,name=wiProof,proto3" json:"wiProof,omitempty"`
	// contains filtered or unexported fields
}

func (*BodyMta) Descriptor deprecated

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

Deprecated: Use BodyMta.ProtoReflect.Descriptor instead.

func (*BodyMta) GetAiProof

func (x *BodyMta) GetAiProof() []byte

func (*BodyMta) GetEncAiAlpha

func (x *BodyMta) GetEncAiAlpha() []byte

func (*BodyMta) GetEncWiAlpha

func (x *BodyMta) GetEncWiAlpha() []byte

func (*BodyMta) GetWiProof

func (x *BodyMta) GetWiProof() []byte

func (*BodyMta) ProtoMessage

func (*BodyMta) ProtoMessage()

func (*BodyMta) ProtoReflect

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

func (*BodyMta) Reset

func (x *BodyMta) Reset()

func (*BodyMta) String

func (x *BodyMta) String() string

type BodyProofAi

type BodyProofAi struct {
	AgDecommitment *commitment.HashDecommitmentMessage `protobuf:"bytes,1,opt,name=agDecommitment,proto3" json:"agDecommitment,omitempty"`
	AiProof        *zkproof.SchnorrProofMessage        `protobuf:"bytes,2,opt,name=aiProof,proto3" json:"aiProof,omitempty"`
	// contains filtered or unexported fields
}

func (*BodyProofAi) Descriptor deprecated

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

Deprecated: Use BodyProofAi.ProtoReflect.Descriptor instead.

func (*BodyProofAi) GetAgDecommitment

func (x *BodyProofAi) GetAgDecommitment() *commitment.HashDecommitmentMessage

func (*BodyProofAi) GetAiProof

func (x *BodyProofAi) GetAiProof() *zkproof.SchnorrProofMessage

func (*BodyProofAi) ProtoMessage

func (*BodyProofAi) ProtoMessage()

func (*BodyProofAi) ProtoReflect

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

func (*BodyProofAi) Reset

func (x *BodyProofAi) Reset()

func (*BodyProofAi) String

func (x *BodyProofAi) String() string

type BodyPublicKey

type BodyPublicKey struct {
	Pubkey       []byte                            `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
	AgCommitment *commitment.HashCommitmentMessage `protobuf:"bytes,3,opt,name=agCommitment,proto3" json:"agCommitment,omitempty"`
	// contains filtered or unexported fields
}

func (*BodyPublicKey) Descriptor deprecated

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

Deprecated: Use BodyPublicKey.ProtoReflect.Descriptor instead.

func (*BodyPublicKey) GetAgCommitment

func (x *BodyPublicKey) GetAgCommitment() *commitment.HashCommitmentMessage

func (*BodyPublicKey) GetPubkey

func (x *BodyPublicKey) GetPubkey() []byte

func (*BodyPublicKey) ProtoMessage

func (*BodyPublicKey) ProtoMessage()

func (*BodyPublicKey) ProtoReflect

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

func (*BodyPublicKey) Reset

func (x *BodyPublicKey) Reset()

func (*BodyPublicKey) String

func (x *BodyPublicKey) String() string

type BodySi

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

func (*BodySi) Descriptor deprecated

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

Deprecated: Use BodySi.ProtoReflect.Descriptor instead.

func (*BodySi) GetSi

func (x *BodySi) GetSi() []byte

func (*BodySi) ProtoMessage

func (*BodySi) ProtoMessage()

func (*BodySi) ProtoReflect

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

func (*BodySi) Reset

func (x *BodySi) Reset()

func (*BodySi) String

func (x *BodySi) String() string

type Message

type Message struct {
	Type Type   `protobuf:"varint,1,opt,name=type,proto3,enum=getamis.alice.crypto.tss.ecdsa.gg18.signer.Type" json:"type,omitempty"`
	Id   string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// Types that are assignable to Body:
	//	*Message_Pubkey
	//	*Message_EncK
	//	*Message_Mta
	//	*Message_Delta
	//	*Message_ProofAi
	//	*Message_CommitViAi
	//	*Message_DecommitViAi
	//	*Message_CommitUiTi
	//	*Message_DecommitUiTi
	//	*Message_Si
	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) GetCommitUiTi

func (x *Message) GetCommitUiTi() *BodyCommitUiTi

func (*Message) GetCommitViAi

func (x *Message) GetCommitViAi() *BodyCommitViAi

func (*Message) GetDecommitUiTi

func (x *Message) GetDecommitUiTi() *BodyDecommitUiTi

func (*Message) GetDecommitViAi

func (x *Message) GetDecommitViAi() *BodyDecommitViAi

func (*Message) GetDelta

func (x *Message) GetDelta() *BodyDelta

func (*Message) GetEncK

func (x *Message) GetEncK() *BodyEncK

func (*Message) GetId

func (x *Message) GetId() string

func (*Message) GetMessageType

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

func (*Message) GetMta

func (x *Message) GetMta() *BodyMta

func (*Message) GetProofAi

func (x *Message) GetProofAi() *BodyProofAi

func (*Message) GetPubkey

func (x *Message) GetPubkey() *BodyPublicKey

func (*Message) GetSi

func (x *Message) GetSi() *BodySi

func (*Message) GetType

func (x *Message) GetType() Type

func (*Message) IsValid

func (m *Message) IsValid() bool

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

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

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type Message_CommitUiTi

type Message_CommitUiTi struct {
	CommitUiTi *BodyCommitUiTi `protobuf:"bytes,10,opt,name=commitUiTi,proto3,oneof"`
}

type Message_CommitViAi

type Message_CommitViAi struct {
	CommitViAi *BodyCommitViAi `protobuf:"bytes,8,opt,name=commitViAi,proto3,oneof"`
}

type Message_DecommitUiTi

type Message_DecommitUiTi struct {
	DecommitUiTi *BodyDecommitUiTi `protobuf:"bytes,11,opt,name=decommitUiTi,proto3,oneof"`
}

type Message_DecommitViAi

type Message_DecommitViAi struct {
	DecommitViAi *BodyDecommitViAi `protobuf:"bytes,9,opt,name=decommitViAi,proto3,oneof"`
}

type Message_Delta

type Message_Delta struct {
	Delta *BodyDelta `protobuf:"bytes,6,opt,name=delta,proto3,oneof"`
}

type Message_EncK

type Message_EncK struct {
	EncK *BodyEncK `protobuf:"bytes,4,opt,name=encK,proto3,oneof"`
}

type Message_Mta

type Message_Mta struct {
	Mta *BodyMta `protobuf:"bytes,5,opt,name=mta,proto3,oneof"`
}

type Message_ProofAi

type Message_ProofAi struct {
	ProofAi *BodyProofAi `protobuf:"bytes,7,opt,name=proofAi,proto3,oneof"`
}

type Message_Pubkey

type Message_Pubkey struct {
	Pubkey *BodyPublicKey `protobuf:"bytes,3,opt,name=pubkey,proto3,oneof"`
}

type Message_Si

type Message_Si struct {
	Si *BodySi `protobuf:"bytes,12,opt,name=si,proto3,oneof"`
}

type Result

type Result struct {
	R *big.Int
	S *big.Int
}

type Signer

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

func NewSigner

func NewSigner(peerManager types.PeerManager, expectedPubkey *pt.ECPoint, homo homo.Crypto, secret *big.Int, bks map[string]*birkhoffinterpolation.BkParameter, msg []byte, listener types.StateChangedListener) (*Signer, error)

func (*Signer) GetResult

func (s *Signer) GetResult() (*Result, error)

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

func (*Signer) Start

func (s *Signer) Start()

type Type

type Type int32
const (
	Type_Pubkey       Type = 0
	Type_EncK         Type = 1
	Type_Mta          Type = 2
	Type_Delta        Type = 3
	Type_ProofAi      Type = 4
	Type_CommitViAi   Type = 5
	Type_DecommitViAi Type = 6
	Type_CommitUiTi   Type = 7
	Type_DecommitUiTi Type = 8
	Type_Si           Type = 9
)

func (Type) Descriptor

func (Type) Descriptor() protoreflect.EnumDescriptor

func (Type) Enum

func (x Type) Enum() *Type

func (Type) EnumDescriptor deprecated

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

Deprecated: Use Type.Descriptor instead.

func (Type) Number

func (x Type) Number() protoreflect.EnumNumber

func (Type) String

func (x Type) String() string

func (Type) Type

func (Type) Type() protoreflect.EnumType

Jump to

Keyboard shortcuts

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