Versions in this module Expand all Collapse all v1 v1.3.3 May 7, 2024 v1.3.2 Nov 6, 2023 Changes in this version + const PublicKeySize + const SignatureSize + var ErrInvalidPublicKeySize = fmt.Errorf("public key must be %d bytes long", PublicKeySize) + var ErrInvalidSignatureSize = fmt.Errorf("signature must be %d bytes long", SignatureSize) + type PrivateKey struct + func CreateRandomBlsKeys(total int) ([]*PrivateKey, error) + func GenerateBlsKey() (*PrivateKey, error) + func NewZeroPrivateKey() *PrivateKey + func UnmarshalPrivateKey(data []byte) (*PrivateKey, error) + func (p *PrivateKey) Marshal() ([]byte, error) + func (p *PrivateKey) PublicKey() *PublicKey + func (p *PrivateKey) Sign(message, domain []byte) (*Signature, error) + type PublicKey struct + func UnmarshalPublicKey(data []byte) (*PublicKey, error) + func UnmarshalPublicKeyFromBigInt(b [4]*big.Int) (*PublicKey, error) + func (p *PublicKey) Marshal() []byte + func (p *PublicKey) MarshalText() ([]byte, error) + func (p *PublicKey) ToBigInt() [4]*big.Int + func (p *PublicKey) UnmarshalText(buf []byte) error + type PublicKeys []*PublicKey + func (pks PublicKeys) Aggregate() *PublicKey + type Signature struct + func UnmarshalSignature(raw []byte) (*Signature, error) + func (s *Signature) Marshal() ([]byte, error) + func (s *Signature) Verify(pub *PublicKey, message, domain []byte) bool + func (s *Signature) VerifyAggregated(publicKeys []*PublicKey, msg, domain []byte) bool + func (s Signature) ToBigInt() ([2]*big.Int, error) + type Signatures []*Signature + func (sigs Signatures) Aggregate() *Signature