Documentation ¶
Index ¶
- Constants
- func ConvertToPublicKey(pub crypto.PubKey) (*g1pubs.PublicKey, error)
- func ConvertToSignature(sig crypto.Signature) (*g1pubs.Signature, error)
- type Driver
- func (d Driver) Aggregate(sigs []crypto.Signature) (crypto.Signature, error)
- func (d Driver) AggregatePublic(pubs []crypto.PubKey) (crypto.PubKey, error)
- func (d Driver) GenKey() (crypto.PrivKey, error)
- func (d Driver) PrivKeyFromBytes(b []byte) (privKey crypto.PrivKey, err error)
- func (d Driver) PubKeyFromBytes(b []byte) (pubKey crypto.PubKey, err error)
- func (d Driver) SignatureFromBytes(b []byte) (sig crypto.Signature, err error)
- func (d Driver) Validate(msg, pub, sig []byte) error
- func (d Driver) VerifyAggregatedN(pubs []crypto.PubKey, ms [][]byte, sig crypto.Signature) error
- func (d Driver) VerifyAggregatedOne(pubs []crypto.PubKey, m []byte, sig crypto.Signature) error
- type PrivKeyBLS
- type PubKeyBLS
- type SignatureBLS
- type SignatureS
Constants ¶
View Source
const ( BLSPrivateKeyLength = 32 BLSPublicKeyLength = 48 BLSSignatureLength = 96 )
setting
View Source
const ID = 259
ID id
View Source
const Name = "bls"
Name name
Variables ¶
This section is empty.
Functions ¶
func ConvertToPublicKey ¶
ConvertToPublicKey convert to BLS PublicKey
Types ¶
type Driver ¶
type Driver struct{}
Driver driver
func (Driver) AggregatePublic ¶
AggregatePublic aggregates public keys together into a new PublicKey.
func (Driver) PrivKeyFromBytes ¶
PrivKeyFromBytes create private key from bytes
func (Driver) PubKeyFromBytes ¶
PubKeyFromBytes create public key from bytes
func (Driver) SignatureFromBytes ¶
SignatureFromBytes create signature from bytes
func (Driver) VerifyAggregatedN ¶
VerifyAggregatedN verifies each public key against each message.
type PrivKeyBLS ¶
type PrivKeyBLS [BLSPrivateKeyLength]byte
PrivKeyBLS PrivKey
func (PrivKeyBLS) Equals ¶
func (privKey PrivKeyBLS) Equals(other crypto.PrivKey) bool
Equals check privkey is equal
func (PrivKeyBLS) PubKey ¶
func (privKey PrivKeyBLS) PubKey() crypto.PubKey
PubKey convert to public key
type PubKeyBLS ¶
type PubKeyBLS [BLSPublicKeyLength]byte
PubKeyBLS PubKey
type SignatureBLS ¶
type SignatureBLS [BLSSignatureLength]byte
SignatureBLS Signature
func (SignatureBLS) Equals ¶
func (sig SignatureBLS) Equals(other crypto.Signature) bool
Equals check signature equals
func (SignatureBLS) String ¶
func (sig SignatureBLS) String() string
String convert signature to string
Click to show internal directories.
Click to hide internal directories.