Documentation ¶
Index ¶
- Constants
- Variables
- func ComputeChallenge(R *ristretto.Element, groupKey *PublicKey, message []byte) *ristretto.Scalar
- type Public
- type PublicKey
- type SecretShare
- type Signature
- func (sig *Signature) BytesAppend(existing []byte) ([]byte, error)
- func (sig *Signature) Equal(other interface{}) bool
- func (sig *Signature) MarshalBinary() ([]byte, error)
- func (sig *Signature) Size() int
- func (sig *Signature) ToEd25519() []byte
- func (sig *Signature) UnmarshalBinary(data []byte) error
Constants ¶
const MessageLengthSig = 32 + 32
Variables ¶
var ErrInvalidMessage = errors.New("invalid message")
Functions ¶
Types ¶
type Public ¶
type Public struct { // PartyIDs is a party.Set that represents all parties with a share. PartyIDs party.IDSlice // Threshold returns the integer which defines the maximum number of parties that may be corrupted Threshold party.Size Shares map[party.ID]*ristretto.Element // GroupKey is the group's public key // It is the result of interpolating the Shamir shares at 0 GroupKey *PublicKey }
Public holds the public keys generated during a key generation protocol. It also stores the associated party list, the threshold used and the full group key.
func NewPublic ¶
NewPublic creates a Public structure given a map of public key shares as ristretto.Element, the threshold used.
func (*Public) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
func (*Public) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
type PublicKey ¶
type PublicKey struct {
// contains filtered or unexported fields
}
PublicKey represents a FROST-Ed25519 verification key.
func NewPublicKeyFromPoint ¶
NewPublicKeyFromPoint returns a PublicKey given an ristretto.Element.
func (PublicKey) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
func (*PublicKey) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
type SecretShare ¶
SecretShare is a share of a secret key computed during the KeyGen protocol.
func NewSecretShare ¶
func NewSecretShare(id party.ID, secret *ristretto.Scalar) *SecretShare
NewSecretShare returns a SecretShare given a party.ID and ristretto.Scalar. It additionally computes the associated public key
func (*SecretShare) Equal ¶
func (sk *SecretShare) Equal(sk2 *SecretShare) bool
func (*SecretShare) MarshalBinary ¶
func (sk *SecretShare) MarshalBinary() ([]byte, error)
MarshalBinary implements the encoding.BinaryMarshaler interface.
func (*SecretShare) MarshalJSON ¶
func (sk *SecretShare) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface.
func (*SecretShare) UnmarshalBinary ¶
func (sk *SecretShare) UnmarshalBinary(data []byte) error
UnmarshalBinary implements the encoding.BinaryUnmarshaler interface.
func (*SecretShare) UnmarshalJSON ¶
func (sk *SecretShare) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface.
type Signature ¶
Signature represents an EdDSA signature. When converted to bytes with .ToEd25519(), the signature is compatible with the standard ed25519 library.
func (*Signature) MarshalBinary ¶
MarshalBinary implements the encoding.BinaryMarshaler interface.
func (*Signature) ToEd25519 ¶
ToEd25519 returns a signature that can be validated by ed25519.Verify.
func (*Signature) UnmarshalBinary ¶
UnmarshalBinary implements the encoding.BinaryUnmarshaler interface.