refresh

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

Documentation

Index

Constants

View Source
const (
	BYTELENGTHKAPPA = 32
)
View Source
const (
	SAFEPUBKEYLENGTH = 2048
)

Variables

View Source
var (
	Type_name = map[int32]string{
		0: "Round1",
		1: "Round2",
		2: "Round3",
	}
	Type_value = map[string]int32{
		"Round1": 0,
		"Round2": 1,
		"Round3": 2,
	}
)

Enum value maps for Type.

View Source
var (

	// ErrSmallPublicKey is returned if the public key is small.
	ErrSmallPublicKey = errors.New("small public key")
	// ErrTrivialPoint is returned if the the point is the identity point.
	ErrTrivialPoint = errors.New("the identity point")
)
View Source
var (

	// ErrDifferentPoint is returned if the two points are different.
	ErrDifferentPoint = errors.New("the two points are different")
)
View Source
var (
	ErrNotEnoughRanks = errors.New("not enough ranks")
)
View Source
var File_github_com_getamis_alice_crypto_tss_ecdsa_cggmp_refresh_message_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type AuxiliaryInfoKeyRefeshErrorMessage

type AuxiliaryInfoKeyRefeshErrorMessage struct {
	Ciphertext []byte `protobuf:"bytes,1,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"`
	Plaintext  []byte `protobuf:"bytes,2,opt,name=plaintext,proto3" json:"plaintext,omitempty"`
	Mu         []byte `protobuf:"bytes,3,opt,name=mu,proto3" json:"mu,omitempty"`
	// contains filtered or unexported fields
}

func (*AuxiliaryInfoKeyRefeshErrorMessage) Descriptor deprecated

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

Deprecated: Use AuxiliaryInfoKeyRefeshErrorMessage.ProtoReflect.Descriptor instead.

func (*AuxiliaryInfoKeyRefeshErrorMessage) GetCiphertext

func (x *AuxiliaryInfoKeyRefeshErrorMessage) GetCiphertext() []byte

func (*AuxiliaryInfoKeyRefeshErrorMessage) GetMu

func (*AuxiliaryInfoKeyRefeshErrorMessage) GetPlaintext

func (x *AuxiliaryInfoKeyRefeshErrorMessage) GetPlaintext() []byte

func (*AuxiliaryInfoKeyRefeshErrorMessage) ProtoMessage

func (*AuxiliaryInfoKeyRefeshErrorMessage) ProtoMessage()

func (*AuxiliaryInfoKeyRefeshErrorMessage) ProtoReflect

func (*AuxiliaryInfoKeyRefeshErrorMessage) Reset

func (*AuxiliaryInfoKeyRefeshErrorMessage) String

type HashMsg

type HashMsg struct {
	PointCommitment *commitment.PointCommitmentMessage         `protobuf:"bytes,1,opt,name=pointCommitment,proto3" json:"pointCommitment,omitempty"`
	Y               *ecpointgrouplaw.EcPointMessage            `protobuf:"bytes,2,opt,name=Y,proto3" json:"Y,omitempty"`
	PedPar          *paillier.RingPederssenParameterMessage    `protobuf:"bytes,3,opt,name=pedPar,proto3" json:"pedPar,omitempty"`
	Rho             []byte                                     `protobuf:"bytes,4,opt,name=rho,proto3" json:"rho,omitempty"`
	U               []byte                                     `protobuf:"bytes,5,opt,name=u,proto3" json:"u,omitempty"`
	Ssid            []byte                                     `protobuf:"bytes,6,opt,name=ssid,proto3" json:"ssid,omitempty"`
	Bk              []byte                                     `protobuf:"bytes,7,opt,name=bk,proto3" json:"bk,omitempty"`
	A               map[string]*ecpointgrouplaw.EcPointMessage `` /* 143-byte string literal not displayed */
	B               *ecpointgrouplaw.EcPointMessage            `protobuf:"bytes,9,opt,name=B,proto3" json:"B,omitempty"`
	// contains filtered or unexported fields
}

func (*HashMsg) Descriptor deprecated

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

Deprecated: Use HashMsg.ProtoReflect.Descriptor instead.

func (*HashMsg) GetA

func (*HashMsg) GetB

func (*HashMsg) GetBk

func (x *HashMsg) GetBk() []byte

func (*HashMsg) GetPedPar

func (*HashMsg) GetPointCommitment

func (x *HashMsg) GetPointCommitment() *commitment.PointCommitmentMessage

func (*HashMsg) GetRho

func (x *HashMsg) GetRho() []byte

func (*HashMsg) GetSsid

func (x *HashMsg) GetSsid() []byte

func (*HashMsg) GetU

func (x *HashMsg) GetU() []byte

func (*HashMsg) GetY

func (*HashMsg) ProtoMessage

func (*HashMsg) ProtoMessage()

func (*HashMsg) ProtoReflect

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

func (*HashMsg) Reset

func (x *HashMsg) Reset()

func (*HashMsg) String

func (x *HashMsg) String() string

type Message

type Message struct {
	Type Type   `protobuf:"varint,1,opt,name=type,proto3,enum=getamis.alice.crypto.tss.ecdsa.cggmp.refresh.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
	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) EchoHash

func (m *Message) EchoHash() ([]byte, error)

func (*Message) GetBody

func (m *Message) GetBody() isMessage_Body

func (*Message) GetEchoMessage

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

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

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

func NewRefresh

func NewRefresh(oldShare *big.Int, pubKey *ecpointgrouplaw.ECPoint, peerManager types.PeerManager, threshold uint32, partialPubKey map[string]*ecpointgrouplaw.ECPoint, bks map[string]*birkhoffinterpolation.BkParameter, keySize int, ssid []byte, listener types.StateChangedListener) (*Refresh, error)

func (*Refresh) GetResult

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

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

func (*Refresh) Start

func (d *Refresh) Start()

type Result

type Result struct {
	Share         *big.Int
	PaillierKey   *paillier.Paillier
	PartialPubKey map[string]*pt.ECPoint
	Y             map[string]*pt.ECPoint
	PedParameter  map[string]*paillierzkproof.PederssenOpenParameter
	YSecret       *big.Int
}

type Round1Msg

type Round1Msg struct {
	Commitment *commitment.HashCommitmentMessage `protobuf:"bytes,1,opt,name=commitment,proto3" json:"commitment,omitempty"`
	// contains filtered or unexported fields
}

func (*Round1Msg) Descriptor deprecated

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

Deprecated: Use Round1Msg.ProtoReflect.Descriptor instead.

func (*Round1Msg) GetCommitment

func (x *Round1Msg) GetCommitment() *commitment.HashCommitmentMessage

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 {
	Decommitment *commitment.HashDecommitmentMessage `protobuf:"bytes,1,opt,name=decommitment,proto3" json:"decommitment,omitempty"`
	// contains filtered or unexported fields
}

func (*Round2Msg) Descriptor deprecated

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

Deprecated: Use Round2Msg.ProtoReflect.Descriptor instead.

func (*Round2Msg) GetDecommitment

func (x *Round2Msg) GetDecommitment() *commitment.HashDecommitmentMessage

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 {
	ModProof          *paillier.PaillierBlumMessage  `protobuf:"bytes,1,opt,name=modProof,proto3" json:"modProof,omitempty"`
	FacProof          *paillier.NoSmallFactorMessage `protobuf:"bytes,2,opt,name=facProof,proto3" json:"facProof,omitempty"`
	YschnorrProof     *zkproof.SchnorrProofMessage   `protobuf:"bytes,3,opt,name=yschnorrProof,proto3" json:"yschnorrProof,omitempty"`
	Encshare          []byte                         `protobuf:"bytes,4,opt,name=encshare,proto3" json:"encshare,omitempty"`
	ShareschnorrProof *zkproof.SchnorrProofMessage   `protobuf:"bytes,5,opt,name=shareschnorrProof,proto3" json:"shareschnorrProof,omitempty"`
	// contains filtered or unexported fields
}

func (*Round3Msg) Descriptor deprecated

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

Deprecated: Use Round3Msg.ProtoReflect.Descriptor instead.

func (*Round3Msg) GetEncshare

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

func (*Round3Msg) GetFacProof

func (x *Round3Msg) GetFacProof() *paillier.NoSmallFactorMessage

func (*Round3Msg) GetModProof

func (x *Round3Msg) GetModProof() *paillier.PaillierBlumMessage

func (*Round3Msg) GetShareschnorrProof

func (x *Round3Msg) GetShareschnorrProof() *zkproof.SchnorrProofMessage

func (*Round3Msg) GetYschnorrProof

func (x *Round3Msg) GetYschnorrProof() *zkproof.SchnorrProofMessage

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 Type

type Type int32
const (
	Type_Round1 Type = 0
	Type_Round2 Type = 1
	Type_Round3 Type = 2
)

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