Documentation
¶
Overview ¶
Package internal provides values, structures, and functions to operate FROST that are not part of the public API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalidParameters indicates that wrong input has been provided. ErrInvalidParameters = errors.New("invalid parameters") // ErrInvalidCiphersuite indicates a non-supported ciphersuite is being used. ErrInvalidCiphersuite = errors.New("ciphersuite not available") // ErrInvalidParticipantBackup indicates the participant's encoded backup is not valid. ErrInvalidParticipantBackup = errors.New("invalid backup") )
Functions ¶
func Concatenate ¶
Concatenate returns the concatenation of all bytes composing the input elements.
func IntegerToScalar ¶
IntegerToScalar creates a group.Scalar given an int.
func RandomBytes ¶
RandomBytes returns length random bytes (wrapper for crypto/rand).
Types ¶
type BindingFactor ¶
BindingFactor holds the binding factor scalar for the given identifier.
type BindingFactorList ¶
type BindingFactorList []*BindingFactor
BindingFactorList a list of BindingFactor.
func (BindingFactorList) BindingFactorForParticipant ¶
func (b BindingFactorList) BindingFactorForParticipant(id *group.Scalar) *group.Scalar
BindingFactorForParticipant returns the binding factor for a given participant identifier in the list.
type Ciphersuite ¶
Ciphersuite combines the group and hashing routines.
func (Ciphersuite) H1 ¶
func (c Ciphersuite) H1(input []byte) *group.Scalar
H1 hashes the input and proves the "rho" DST.
func (Ciphersuite) H2 ¶
func (c Ciphersuite) H2(input []byte) *group.Scalar
H2 hashes the input and proves the "chal" DST.
func (Ciphersuite) H3 ¶
func (c Ciphersuite) H3(input []byte) *group.Scalar
H3 hashes the input and proves the "nonce" DST.
func (Ciphersuite) H4 ¶
func (c Ciphersuite) H4(msg []byte) []byte
H4 hashes the input and proves the "msg" DST.
func (Ciphersuite) H5 ¶
func (c Ciphersuite) H5(msg []byte) []byte
H5 hashes the input and proves the "com" DST.