sign

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrValidateSigShare  = errors.New("signature share is invalid")
	ErrValidateSignature = errors.New("full signature is invalid")
)

Functions

This section is empty.

Types

type Output

type Output struct {
	Signature *eddsa.Signature
}

func NewRound

func NewRound(partyIDs party.IDSlice, secret *eddsa.SecretShare, shares *eddsa.Public, message []byte) (state.Round, *Output, error)

type Round0

type Round0 struct {
	*state.BaseRound

	// Message is the message to be signed
	Message []byte

	// Parties maps IDs to a struct containing all intermediary data for each signer.
	Parties map[party.ID]*signer

	// GroupKey is the GroupKey, i.e. the public key associated to the group of signers.
	GroupKey       eddsa.PublicKey
	SecretKeyShare ristretto.Scalar

	// C = H(R, GroupKey, Message)
	C ristretto.Scalar
	// R = ∑ Ri
	R ristretto.Element

	Output *Output
	// contains filtered or unexported fields
}

func (*Round0) AcceptedMessageTypes

func (round *Round0) AcceptedMessageTypes() []messages.MessageType

func (*Round0) GenerateMessages

func (round *Round0) GenerateMessages() ([]*messages.Message, *state.Error)

func (*Round0) GetOutput

func (round *Round0) GetOutput() interface{}

func (*Round0) MarshalJSON

func (round *Round0) MarshalJSON() ([]byte, error)

func (*Round0) MarshalRound

func (round *Round0) MarshalRound() ([]byte, error)

func (*Round0) NextRound

func (round *Round0) NextRound() state.Round

func (*Round0) ProcessMessage

func (round *Round0) ProcessMessage(*messages.Message) *state.Error

func (*Round0) Reset

func (round *Round0) Reset()

func (*Round0) UnmarshalJSON

func (round *Round0) UnmarshalJSON(data []byte) error

func (*Round0) UnmarshalRound

func (round *Round0) UnmarshalRound(data []byte) (state.Round, error)

type Round0JSON

type Round0JSON struct {
	Base           []byte               `json:"base,omitempty"`
	Messages       []byte               `json:"messages,omitempty"`
	Parties        map[party.ID]*signer `json:"parties,omitempty"`
	GroupKey       []byte               `json:"group_key,omitempty"`
	SecretKeyShare []byte               `json:"secret_key_share,omitempty"`
	E              []byte               `json:"e_scalar,omitempty"`
	D              []byte               `json:"d_scalar,omitempty"`
	C              []byte               `json:"c_scalar,omitempty"`
	R              []byte               `json:"r_scalar,omitempty"`
	Output         []byte               `json:"output,omitempty"`
}

type Round1

type Round1 struct {
	*Round0
}

func (*Round1) GenerateMessages

func (round *Round1) GenerateMessages() ([]*messages.Message, *state.Error)

func (*Round1) GetOutput

func (round *Round1) GetOutput() interface{}

func (*Round1) MarshalJSON

func (round *Round1) MarshalJSON() ([]byte, error)

func (*Round1) NextRound

func (round *Round1) NextRound() state.Round

func (*Round1) ProcessMessage

func (round *Round1) ProcessMessage(msg *messages.Message) *state.Error

func (*Round1) UnmarshalJSON

func (round *Round1) UnmarshalJSON(data []byte) error

type Round2

type Round2 struct {
	*Round1
}

func (*Round2) GenerateMessages

func (round *Round2) GenerateMessages() ([]*messages.Message, *state.Error)

func (*Round2) GetOutput

func (round *Round2) GetOutput() interface{}

func (*Round2) MarshalJSON

func (round *Round2) MarshalJSON() ([]byte, error)

func (*Round2) NextRound

func (round *Round2) NextRound() state.Round

func (*Round2) ProcessMessage

func (round *Round2) ProcessMessage(msg *messages.Message) *state.Error

func (*Round2) UnmarshalJSON

func (round *Round2) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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