signSix

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: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BYTELENGTHKAPPA = 32
)

Variables

View Source
var (
	Type_name = map[int32]string{
		0: "Round1",
		1: "Round2",
		2: "Round3",
		3: "Round4",
		4: "Round5",
		5: "Round6",
		6: "Round7",
		7: "Err1",
		8: "Err2",
	}
	Type_value = map[string]int32{
		"Round1": 0,
		"Round2": 1,
		"Round3": 2,
		"Round4": 3,
		"Round5": 4,
		"Round6": 5,
		"Round7": 6,
		"Err1":   7,
		"Err2":   8,
	}
)

Enum value maps for Type.

View Source
var (
	ErrNotEnoughRanks = errors.New("not enough ranks")
)
View Source
var (
	// ErrZeroR is returned if the r is zero
	ErrZeroR = errors.New("zero r")
)
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_cggmp_signSix_message_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Err1Msg

type Err1Msg struct {
	K           []byte                   `protobuf:"bytes,1,opt,name=k,proto3" json:"k,omitempty"`
	RhoNPower   []byte                   `protobuf:"bytes,2,opt,name=rhoNPower,proto3" json:"rhoNPower,omitempty"`
	PsiRhoProof *paillier.NthRootMessage `protobuf:"bytes,3,opt,name=psiRhoProof,proto3" json:"psiRhoProof,omitempty"`
	Gamma       []byte                   `protobuf:"bytes,4,opt,name=gamma,proto3" json:"gamma,omitempty"`
	// key => id
	Peers map[string]*Err1PeerMsg `` /* 151-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Err1Msg) Descriptor deprecated

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

Deprecated: Use Err1Msg.ProtoReflect.Descriptor instead.

func (*Err1Msg) GetGamma

func (x *Err1Msg) GetGamma() []byte

func (*Err1Msg) GetK

func (x *Err1Msg) GetK() []byte

func (*Err1Msg) GetPeers

func (x *Err1Msg) GetPeers() map[string]*Err1PeerMsg

func (*Err1Msg) GetPsiRhoProof

func (x *Err1Msg) GetPsiRhoProof() *paillier.NthRootMessage

func (*Err1Msg) GetRhoNPower

func (x *Err1Msg) GetRhoNPower() []byte

func (*Err1Msg) ProtoMessage

func (*Err1Msg) ProtoMessage()

func (*Err1Msg) ProtoReflect

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

func (*Err1Msg) Reset

func (x *Err1Msg) Reset()

func (*Err1Msg) String

func (x *Err1Msg) String() string

type Err1PeerMsg

type Err1PeerMsg struct {
	Alpha      []byte                   `protobuf:"bytes,1,opt,name=alpha,proto3" json:"alpha,omitempty"`
	MuNPower   []byte                   `protobuf:"bytes,2,opt,name=muNPower,proto3" json:"muNPower,omitempty"`
	PsiMuProof *paillier.NthRootMessage `protobuf:"bytes,3,opt,name=psiMuProof,proto3" json:"psiMuProof,omitempty"`
	// contains filtered or unexported fields
}

func (*Err1PeerMsg) Descriptor deprecated

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

Deprecated: Use Err1PeerMsg.ProtoReflect.Descriptor instead.

func (*Err1PeerMsg) GetAlpha

func (x *Err1PeerMsg) GetAlpha() []byte

func (*Err1PeerMsg) GetMuNPower

func (x *Err1PeerMsg) GetMuNPower() []byte

func (*Err1PeerMsg) GetPsiMuProof

func (x *Err1PeerMsg) GetPsiMuProof() *paillier.NthRootMessage

func (*Err1PeerMsg) ProtoMessage

func (*Err1PeerMsg) ProtoMessage()

func (*Err1PeerMsg) ProtoReflect

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

func (*Err1PeerMsg) Reset

func (x *Err1PeerMsg) Reset()

func (*Err1PeerMsg) String

func (x *Err1PeerMsg) String() string

type Err2Msg

type Err2Msg struct {
	K           []byte                          `protobuf:"bytes,1,opt,name=k,proto3" json:"k,omitempty"`
	RhoNPower   []byte                          `protobuf:"bytes,2,opt,name=rhoNPower,proto3" json:"rhoNPower,omitempty"`
	PsiRhoProof *paillier.NthRootMessage        `protobuf:"bytes,3,opt,name=psiRhoProof,proto3" json:"psiRhoProof,omitempty"`
	Ytilde      *ecpointgrouplaw.EcPointMessage `protobuf:"bytes,4,opt,name=ytilde,proto3" json:"ytilde,omitempty"`
	PsipaiProof *paillier.LogMessage            `protobuf:"bytes,5,opt,name=psipaiProof,proto3" json:"psipaiProof,omitempty"`
	// key => id
	Peers map[string]*Err2PeerMsg `` /* 151-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Err2Msg) Descriptor deprecated

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

Deprecated: Use Err2Msg.ProtoReflect.Descriptor instead.

func (*Err2Msg) GetK

func (x *Err2Msg) GetK() []byte

func (*Err2Msg) GetPeers

func (x *Err2Msg) GetPeers() map[string]*Err2PeerMsg

func (*Err2Msg) GetPsiRhoProof

func (x *Err2Msg) GetPsiRhoProof() *paillier.NthRootMessage

func (*Err2Msg) GetPsipaiProof

func (x *Err2Msg) GetPsipaiProof() *paillier.LogMessage

func (*Err2Msg) GetRhoNPower

func (x *Err2Msg) GetRhoNPower() []byte

func (*Err2Msg) GetYtilde

func (x *Err2Msg) GetYtilde() *ecpointgrouplaw.EcPointMessage

func (*Err2Msg) ProtoMessage

func (*Err2Msg) ProtoMessage()

func (*Err2Msg) ProtoReflect

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

func (*Err2Msg) Reset

func (x *Err2Msg) Reset()

func (*Err2Msg) String

func (x *Err2Msg) String() string

type Err2PeerMsg

type Err2PeerMsg struct {
	Alphahat    []byte                   `protobuf:"bytes,1,opt,name=alphahat,proto3" json:"alphahat,omitempty"`
	MuhatNPower []byte                   `protobuf:"bytes,2,opt,name=muhatNPower,proto3" json:"muhatNPower,omitempty"`
	PsiMuProof  *paillier.NthRootMessage `protobuf:"bytes,3,opt,name=psiMuProof,proto3" json:"psiMuProof,omitempty"`
	// contains filtered or unexported fields
}

func (*Err2PeerMsg) Descriptor deprecated

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

Deprecated: Use Err2PeerMsg.ProtoReflect.Descriptor instead.

func (*Err2PeerMsg) GetAlphahat

func (x *Err2PeerMsg) GetAlphahat() []byte

func (*Err2PeerMsg) GetMuhatNPower

func (x *Err2PeerMsg) GetMuhatNPower() []byte

func (*Err2PeerMsg) GetPsiMuProof

func (x *Err2PeerMsg) GetPsiMuProof() *paillier.NthRootMessage

func (*Err2PeerMsg) ProtoMessage

func (*Err2PeerMsg) ProtoMessage()

func (*Err2PeerMsg) ProtoReflect

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

func (*Err2PeerMsg) Reset

func (x *Err2PeerMsg) Reset()

func (*Err2PeerMsg) String

func (x *Err2PeerMsg) String() string

type Message

type Message struct {
	Type Type   `protobuf:"varint,1,opt,name=type,proto3,enum=getamis.alice.crypto.tss.ecdsa.cggmp.signSix.Type" json:"type,omitempty"`
	Id   string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// Types that are assignable to Body:
	//	*Message_Round1
	//	*Message_Round2
	//	*Message_Round3
	//	*Message_Round4
	//	*Message_Round5
	//	*Message_Round6
	//	*Message_Round7
	//	*Message_Err1
	//	*Message_Err2
	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) GetEchoMessage

func (m *Message) GetEchoMessage() types.Message

func (*Message) GetErr1

func (x *Message) GetErr1() *Err1Msg

func (*Message) GetErr2

func (x *Message) GetErr2() *Err2Msg

func (*Message) GetId

func (x *Message) GetId() string

func (*Message) GetMessageType

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

func (*Message) GetRound1

func (x *Message) GetRound1() *Round1Msg

func (*Message) GetRound2

func (x *Message) GetRound2() *Round2Msg

func (*Message) GetRound3

func (x *Message) GetRound3() *Round3Msg

func (*Message) GetRound4

func (x *Message) GetRound4() *Round4Msg

func (*Message) GetRound5

func (x *Message) GetRound5() *Round5Msg

func (*Message) GetRound6

func (x *Message) GetRound6() *Round6Msg

func (*Message) GetRound7

func (x *Message) GetRound7() *Round7Msg

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_Err1

type Message_Err1 struct {
	// Error message
	Err1 *Err1Msg `protobuf:"bytes,11,opt,name=err1,proto3,oneof"`
}

type Message_Err2

type Message_Err2 struct {
	Err2 *Err2Msg `protobuf:"bytes,12,opt,name=err2,proto3,oneof"`
}

type Message_Round1

type Message_Round1 struct {
	Round1 *Round1Msg `protobuf:"bytes,4,opt,name=round1,proto3,oneof"`
}

type Message_Round2

type Message_Round2 struct {
	Round2 *Round2Msg `protobuf:"bytes,5,opt,name=round2,proto3,oneof"`
}

type Message_Round3

type Message_Round3 struct {
	Round3 *Round3Msg `protobuf:"bytes,6,opt,name=round3,proto3,oneof"`
}

type Message_Round4

type Message_Round4 struct {
	Round4 *Round4Msg `protobuf:"bytes,7,opt,name=round4,proto3,oneof"`
}

type Message_Round5

type Message_Round5 struct {
	Round5 *Round5Msg `protobuf:"bytes,8,opt,name=round5,proto3,oneof"`
}

type Message_Round6

type Message_Round6 struct {
	Round6 *Round6Msg `protobuf:"bytes,9,opt,name=round6,proto3,oneof"`
}

type Message_Round7

type Message_Round7 struct {
	Round7 *Round7Msg `protobuf:"bytes,10,opt,name=round7,proto3,oneof"`
}

type Result

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

type Round1Msg

type Round1Msg struct {
	KCiphertext     []byte                          `protobuf:"bytes,1,opt,name=kCiphertext,proto3" json:"kCiphertext,omitempty"`
	GammaCiphertext []byte                          `protobuf:"bytes,2,opt,name=gammaCiphertext,proto3" json:"gammaCiphertext,omitempty"`
	Z1              *ecpointgrouplaw.EcPointMessage `protobuf:"bytes,3,opt,name=z1,proto3" json:"z1,omitempty"`
	Z2              *ecpointgrouplaw.EcPointMessage `protobuf:"bytes,4,opt,name=z2,proto3" json:"z2,omitempty"`
	Psi             *paillier.EncElgMessage         `protobuf:"bytes,5,opt,name=psi,proto3" json:"psi,omitempty"`
	// contains filtered or unexported fields
}

func (*Round1Msg) Descriptor deprecated

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

Deprecated: Use Round1Msg.ProtoReflect.Descriptor instead.

func (*Round1Msg) GetGammaCiphertext

func (x *Round1Msg) GetGammaCiphertext() []byte

func (*Round1Msg) GetKCiphertext

func (x *Round1Msg) GetKCiphertext() []byte

func (*Round1Msg) GetPsi

func (x *Round1Msg) GetPsi() *paillier.EncElgMessage

func (*Round1Msg) GetZ1

func (*Round1Msg) GetZ2

func (*Round1Msg) ProtoMessage

func (*Round1Msg) ProtoMessage()

func (*Round1Msg) ProtoReflect

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

func (*Round1Msg) Reset

func (x *Round1Msg) Reset()

func (*Round1Msg) String

func (x *Round1Msg) String() string

type Round2Msg

type Round2Msg struct {
	D      []byte                                          `protobuf:"bytes,1,opt,name=D,proto3" json:"D,omitempty"`
	F      []byte                                          `protobuf:"bytes,2,opt,name=F,proto3" json:"F,omitempty"`
	Dhat   []byte                                          `protobuf:"bytes,3,opt,name=Dhat,proto3" json:"Dhat,omitempty"`
	Fhat   []byte                                          `protobuf:"bytes,4,opt,name=Fhat,proto3" json:"Fhat,omitempty"`
	Psi    *paillier.PaillierOperationAndCommitmentMessage `protobuf:"bytes,5,opt,name=psi,proto3" json:"psi,omitempty"`
	Psihat *paillier.PaillierAffAndGroupRangeMessage       `protobuf:"bytes,6,opt,name=psihat,proto3" json:"psihat,omitempty"`
	// contains filtered or unexported fields
}

func (*Round2Msg) Descriptor deprecated

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

Deprecated: Use Round2Msg.ProtoReflect.Descriptor instead.

func (*Round2Msg) GetD

func (x *Round2Msg) GetD() []byte

func (*Round2Msg) GetDhat

func (x *Round2Msg) GetDhat() []byte

func (*Round2Msg) GetF

func (x *Round2Msg) GetF() []byte

func (*Round2Msg) GetFhat

func (x *Round2Msg) GetFhat() []byte

func (*Round2Msg) GetPsi

func (*Round2Msg) GetPsihat

func (*Round2Msg) ProtoMessage

func (*Round2Msg) ProtoMessage()

func (*Round2Msg) ProtoReflect

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

func (*Round2Msg) Reset

func (x *Round2Msg) Reset()

func (*Round2Msg) String

func (x *Round2Msg) String() string

type Round3Msg

type Round3Msg struct {
	Delta []byte                          `protobuf:"bytes,1,opt,name=delta,proto3" json:"delta,omitempty"`
	Z1Hat *ecpointgrouplaw.EcPointMessage `protobuf:"bytes,2,opt,name=z1hat,proto3" json:"z1hat,omitempty"`
	Z2Hat *ecpointgrouplaw.EcPointMessage `protobuf:"bytes,3,opt,name=z2hat,proto3" json:"z2hat,omitempty"`
	// contains filtered or unexported fields
}

func (*Round3Msg) Descriptor deprecated

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

Deprecated: Use Round3Msg.ProtoReflect.Descriptor instead.

func (*Round3Msg) GetDelta

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

func (*Round3Msg) GetZ1Hat

func (x *Round3Msg) GetZ1Hat() *ecpointgrouplaw.EcPointMessage

func (*Round3Msg) GetZ2Hat

func (x *Round3Msg) GetZ2Hat() *ecpointgrouplaw.EcPointMessage

func (*Round3Msg) ProtoMessage

func (*Round3Msg) ProtoMessage()

func (*Round3Msg) ProtoReflect

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

func (*Round3Msg) Reset

func (x *Round3Msg) Reset()

func (*Round3Msg) String

func (x *Round3Msg) String() string

type Round4Msg

type Round4Msg struct {
	Gamma  *ecpointgrouplaw.EcPointMessage `protobuf:"bytes,1,opt,name=gamma,proto3" json:"gamma,omitempty"`
	Psipai *paillier.LogStarMessage        `protobuf:"bytes,2,opt,name=psipai,proto3" json:"psipai,omitempty"`
	// contains filtered or unexported fields
}

func (*Round4Msg) Descriptor deprecated

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

Deprecated: Use Round4Msg.ProtoReflect.Descriptor instead.

func (*Round4Msg) GetGamma

func (x *Round4Msg) GetGamma() *ecpointgrouplaw.EcPointMessage

func (*Round4Msg) GetPsipai

func (x *Round4Msg) GetPsipai() *paillier.LogStarMessage

func (*Round4Msg) ProtoMessage

func (*Round4Msg) ProtoMessage()

func (*Round4Msg) ProtoReflect

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

func (*Round4Msg) Reset

func (x *Round4Msg) Reset()

func (*Round4Msg) String

func (x *Round4Msg) String() string

type Round5Msg

type Round5Msg struct {
	Delta *ecpointgrouplaw.EcPointMessage `protobuf:"bytes,1,opt,name=delta,proto3" json:"delta,omitempty"`
	Psi   *paillier.ELogMessage           `protobuf:"bytes,2,opt,name=psi,proto3" json:"psi,omitempty"`
	// contains filtered or unexported fields
}

func (*Round5Msg) Descriptor deprecated

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

Deprecated: Use Round5Msg.ProtoReflect.Descriptor instead.

func (*Round5Msg) GetDelta

func (x *Round5Msg) GetDelta() *ecpointgrouplaw.EcPointMessage

func (*Round5Msg) GetPsi

func (x *Round5Msg) GetPsi() *paillier.ELogMessage

func (*Round5Msg) ProtoMessage

func (*Round5Msg) ProtoMessage()

func (*Round5Msg) ProtoReflect

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

func (*Round5Msg) Reset

func (x *Round5Msg) Reset()

func (*Round5Msg) String

func (x *Round5Msg) String() string

type Round6Msg

type Round6Msg struct {
	S  *ecpointgrouplaw.EcPointMessage `protobuf:"bytes,1,opt,name=s,proto3" json:"s,omitempty"`
	Pi *paillier.ELogMessage           `protobuf:"bytes,2,opt,name=pi,proto3" json:"pi,omitempty"`
	// contains filtered or unexported fields
}

func (*Round6Msg) Descriptor deprecated

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

Deprecated: Use Round6Msg.ProtoReflect.Descriptor instead.

func (*Round6Msg) GetPi

func (x *Round6Msg) GetPi() *paillier.ELogMessage

func (*Round6Msg) GetS

func (*Round6Msg) ProtoMessage

func (*Round6Msg) ProtoMessage()

func (*Round6Msg) ProtoReflect

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

func (*Round6Msg) Reset

func (x *Round6Msg) Reset()

func (*Round6Msg) String

func (x *Round6Msg) String() string

type Round7Msg

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

func (*Round7Msg) Descriptor deprecated

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

Deprecated: Use Round7Msg.ProtoReflect.Descriptor instead.

func (*Round7Msg) GetSigma

func (x *Round7Msg) GetSigma() []byte

func (*Round7Msg) ProtoMessage

func (*Round7Msg) ProtoMessage()

func (*Round7Msg) ProtoReflect

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

func (*Round7Msg) Reset

func (x *Round7Msg) Reset()

func (*Round7Msg) String

func (x *Round7Msg) String() string

type Sign

type Sign struct {
	types.MessageMain
	// contains filtered or unexported fields
}

func NewSign

func NewSign(threshold uint32, ssid []byte, share *big.Int, ySecret *big.Int, pubKey *pt.ECPoint, partialPubKey, allY map[string]*pt.ECPoint, bks map[string]*birkhoffinterpolation.BkParameter, paillierKey *paillier.Paillier, ped map[string]*paillierzkproof.PederssenOpenParameter, msg []byte, peerManager types.PeerManager, listener types.StateChangedListener) (*Sign, error)

func (*Sign) GetResult

func (d *Sign) GetResult() (*Result, error)

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

func (*Sign) Start

func (d *Sign) Start()

type Type

type Type int32
const (
	Type_Round1 Type = 0
	Type_Round2 Type = 1
	Type_Round3 Type = 2
	Type_Round4 Type = 3
	Type_Round5 Type = 4
	Type_Round6 Type = 5
	Type_Round7 Type = 6
	Type_Err1   Type = 7
	Type_Err2   Type = 8
)

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