Documentation ¶
Index ¶
- Variables
- func IsDuplicatedSignerIdxError(err error) bool
- func IsInsufficientSignaturesError(err error) bool
- func IsInvalidSignatureIncludedError(err error) bool
- func IsInvalidSignerIdxError(err error) bool
- func NewDuplicatedSignerIdxErrorf(msg string, args ...interface{}) error
- func NewInsufficientSignaturesErrorf(msg string, args ...interface{}) error
- func NewInvalidSignatureIncludedErrorf(msg string, args ...interface{}) error
- func NewInvalidSignerIdxErrorf(msg string, args ...interface{}) error
- func RandomBeaconThreshold(size int) int
- type DuplicatedSignerIdxError
- type InsufficientSignaturesError
- type InvalidSignatureIncludedError
- type InvalidSignerIdxError
- type SignatureAggregatorSameMessage
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func IsDuplicatedSignerIdxError ¶ added in v0.23.9
IsDuplicatedSignerIdxError returns whether err is an DuplicatedSignerIdxError
func IsInsufficientSignaturesError ¶ added in v0.23.9
IsInsufficientSignaturesError returns whether err is an InsufficientSignaturesError
func IsInvalidSignatureIncludedError ¶ added in v0.23.9
IsInvalidSignatureIncludedError returns whether err is an InvalidSignatureIncludedError
func IsInvalidSignerIdxError ¶ added in v0.23.9
IsInvalidSignerIdxError returns whether err is an InvalidSignerIdxError
func NewDuplicatedSignerIdxErrorf ¶ added in v0.23.9
func NewInsufficientSignaturesErrorf ¶ added in v0.23.9
func NewInvalidSignatureIncludedErrorf ¶ added in v0.23.9
func NewInvalidSignerIdxErrorf ¶ added in v0.23.9
func RandomBeaconThreshold ¶ added in v0.23.9
RandomBeaconThreshold returns the threshold (t) to allow the largest number of malicious nodes (m) assuming the protocol requires:
m<=t for unforgeability n-m>=t+1 for robustness
Types ¶
type DuplicatedSignerIdxError ¶ added in v0.23.9
type DuplicatedSignerIdxError struct {
// contains filtered or unexported fields
}
DuplicatedSignerIdxError indicates that a signature from the respective signer index was already added
func (DuplicatedSignerIdxError) Error ¶ added in v0.23.9
func (e DuplicatedSignerIdxError) Error() string
func (DuplicatedSignerIdxError) Unwrap ¶ added in v0.23.9
func (e DuplicatedSignerIdxError) Unwrap() error
type InsufficientSignaturesError ¶ added in v0.23.9
type InsufficientSignaturesError struct {
// contains filtered or unexported fields
}
InsufficientSignaturesError indicates that not enough signatures have been stored to complete the operation.
func (InsufficientSignaturesError) Error ¶ added in v0.23.9
func (e InsufficientSignaturesError) Error() string
func (InsufficientSignaturesError) Unwrap ¶ added in v0.23.9
func (e InsufficientSignaturesError) Unwrap() error
type InvalidSignatureIncludedError ¶ added in v0.23.9
type InvalidSignatureIncludedError struct {
// contains filtered or unexported fields
}
InvalidSignatureIncludedError indicates that some signatures, included via TrustedAdd, are invalid
func (InvalidSignatureIncludedError) Error ¶ added in v0.23.9
func (e InvalidSignatureIncludedError) Error() string
func (InvalidSignatureIncludedError) Unwrap ¶ added in v0.23.9
func (e InvalidSignatureIncludedError) Unwrap() error
type InvalidSignerIdxError ¶ added in v0.23.9
type InvalidSignerIdxError struct {
// contains filtered or unexported fields
}
InvalidSignerIdxError indicates that the signer index is invalid
func (InvalidSignerIdxError) Error ¶ added in v0.23.9
func (e InvalidSignerIdxError) Error() string
func (InvalidSignerIdxError) Unwrap ¶ added in v0.23.9
func (e InvalidSignerIdxError) Unwrap() error
type SignatureAggregatorSameMessage ¶ added in v0.23.9
type SignatureAggregatorSameMessage struct{}
These functions are the non-relic versions of some public functions from the package. The functions are here to allow the build of flow-emulator, since the emulator is built without the "relic" build tag, and does not run the functions below.
func NewSignatureAggregatorSameMessage ¶ added in v0.23.9
func (*SignatureAggregatorSameMessage) Aggregate ¶ added in v0.23.9
func (s *SignatureAggregatorSameMessage) Aggregate() ([]int, crypto.Signature, error)
func (*SignatureAggregatorSameMessage) TrustedAdd ¶ added in v0.23.9
func (s *SignatureAggregatorSameMessage) TrustedAdd(signer int, sig crypto.Signature) error