helpers

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeneratePublic

func GeneratePublic(threshold party.Size, secretShares map[party.ID]*eddsa.SecretShare) *eddsa.Public

func GenerateSecrets

func GenerateSecrets(set party.IDSlice, threshold party.Size) (*ristretto.Scalar, map[party.ID]*eddsa.SecretShare)

func GenerateSet

func GenerateSet(n party.Size) party.IDSlice

func MarshalKGOutState

func MarshalKGOutState(s *KeyGenOutState) ([]byte, error)

func NewPartySlice

func NewPartySlice(n party.Size) party.IDSlice

NewPartySlice returns n party.ID s in the range [1, ..., n].

func PartyRoutine

func PartyRoutine(in [][]byte, s *state.State) ([][]byte, error)

func ResetKeygenOutputPointee

func ResetKeygenOutputPointee(state *KeyGenOutState)

ResetKeygenOutputPointee 设置指针...

func ResetSignOutputPointee

func ResetSignOutputPointee(state *MPCSignatureOutState)

ResetSignOutputPointee 设置指针...

func UnmarshalKGOutState

func UnmarshalKGOutState(s *KeyGenOutState, data []byte) error

func UnmarshalKGState

func UnmarshalKGState(newState *state.State, data []byte) error

func UnmarshalSignRound

func UnmarshalSignRound(roundData []byte, roundNum int) (state.Round, error)

Types

type FKeyGenOutput

type FKeyGenOutput struct {
	Secrets map[party.ID]*eddsa.SecretShare
	Shares  *eddsa.Public
}

type KeyGenOutState

type KeyGenOutState struct {
	PartyID   party.ID
	State     *state.State
	Output    *keygen.Output
	Message1  [][]byte
	Message2  [][]byte
	StateData []byte
}

func (*KeyGenOutState) SetOutput

func (s *KeyGenOutState) SetOutput(o *keygen.Output)

SetOutput 改变 output 指针指向

type KeyGenOutStateJSON

type KeyGenOutStateJSON struct {
	PartyID   party.ID `json:"partyID"`
	State     []byte   `json:"state,omitempty"`
	Output    []byte   `json:"output,omitempty"`
	Message1  [][]byte `json:"message1,omitempty"`
	Message2  [][]byte `json:"message2,omitempty"`
	StateData []byte   `json:"stateData,omitempty"`
}

type MPCSignatureOutState

type MPCSignatureOutState struct {
	PartyID  party.ID
	State    *state.State
	Output   *sign.Output
	GroupKey *eddsa.PublicKey
	Message1 [][]byte
	Message2 [][]byte
}

func (*MPCSignatureOutState) MarshalJSON

func (s *MPCSignatureOutState) MarshalJSON() ([]byte, error)

func (*MPCSignatureOutState) UnmarshalJSON

func (s *MPCSignatureOutState) UnmarshalJSON(data []byte) error

type MPCSignatureOutStateJSON

type MPCSignatureOutStateJSON struct {
	PartyID  uint16   `json:"PartyID,omitempty"`
	State    []byte   `json:"state,omitempty"`
	Output   []byte   `json:"output,omitempty"`
	GroupKey []byte   `json:"groupKey,omitempty"`
	Message1 [][]byte `json:"message1,omitempty"`
	Message2 [][]byte `json:"message2,omitempty"`
}

Jump to

Keyboard shortcuts

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