Versions in this module Expand all Collapse all v1 v1.0.0 Apr 25, 2019 Changes in this version + var ErrDuplicatedShare = fmt.Errorf("invalid share") + var ErrEmptySignature = fmt.Errorf("invalid empty signature") + var ErrNoIDToRecover = fmt.Errorf("no id to recover private key") + var ErrShareNotFound = fmt.Errorf("share not found") + func NewPrivateKeyShares(t int) (*PrivateKeyShares, *PublicKeyShares) + func RecoverSignature(sigs []PartialSignature, signerIDs IDs) (crypto.Signature, error) + type ID = bls.ID + func BytesID(id []byte) (ID, error) + func NewID(id []byte) ID + type IDs []ID + type PartialSignature crypto.Signature + type PrivateKey struct + func NewPrivateKey() *PrivateKey + func (prv *PrivateKey) Bytes() []byte + func (prv *PrivateKey) DecodeRLP(s *rlp.Stream) error + func (prv *PrivateKey) EncodeRLP(w io.Writer) error + func (prv *PrivateKey) MarshalJSON() ([]byte, error) + func (prv *PrivateKey) PublicKey() crypto.PublicKey + func (prv *PrivateKey) SetBytes(bytes []byte) error + func (prv *PrivateKey) Sign(hash common.Hash) (crypto.Signature, error) + func (prv *PrivateKey) String() string + func (prv *PrivateKey) UnmarshalJSON(data []byte) error + type PrivateKeyShares struct + func NewEmptyPrivateKeyShares() *PrivateKeyShares + func NewRandomPrivateKeyShares() *PrivateKeyShares + func (prvs *PrivateKeyShares) AddShare(ID ID, share *PrivateKey) error + func (prvs *PrivateKeyShares) DecodeRLP(s *rlp.Stream) error + func (prvs *PrivateKeyShares) EncodeRLP(w io.Writer) error + func (prvs *PrivateKeyShares) Equal(other *PrivateKeyShares) bool + func (prvs *PrivateKeyShares) RecoverPrivateKey(qualifyIDs IDs) (*PrivateKey, error) + func (prvs *PrivateKeyShares) RecoverPublicKey(qualifyIDs IDs) (*PublicKey, error) + func (prvs *PrivateKeyShares) SetParticipants(IDs IDs) + func (prvs *PrivateKeyShares) Share(ID ID) (*PrivateKey, bool) + type PublicKey struct + func RecoverGroupPublicKey(pubShares []*PublicKeyShares) *PublicKey + func (pub *PublicKey) Deserialize(b []byte) error + func (pub *PublicKey) Serialize() []byte + func (pub PublicKey) Bytes() []byte + func (pub PublicKey) VerifySignature(hash common.Hash, signature crypto.Signature) bool + type PublicKeyShares struct + func NewEmptyPublicKeyShares() *PublicKeyShares + func (pubs *PublicKeyShares) AddShare(shareID ID, share *PublicKey) error + func (pubs *PublicKeyShares) Clone() *PublicKeyShares + func (pubs *PublicKeyShares) DecodeRLP(s *rlp.Stream) error + func (pubs *PublicKeyShares) EncodeRLP(w io.Writer) error + func (pubs *PublicKeyShares) Equal(other *PublicKeyShares) bool + func (pubs *PublicKeyShares) MarshalJSON() ([]byte, error) + func (pubs *PublicKeyShares) MasterKeyBytes() []byte + func (pubs *PublicKeyShares) Move() *PublicKeyShares + func (pubs *PublicKeyShares) RecoverPublicKey(qualifyIDs IDs) (*PublicKey, error) + func (pubs *PublicKeyShares) Share(ID ID) (*PublicKey, error) + func (pubs *PublicKeyShares) UnmarshalJSON(data []byte) error + func (pubs *PublicKeyShares) VerifyPrvShare(ID ID, share *PrivateKey) (bool, error) + func (pubs *PublicKeyShares) VerifyPubShare(ID ID, share *PublicKey) (bool, error)