Documentation ¶
Index ¶
- func Verify(m []byte, pub *PublicKey, sig *Signature) bool
- type PublicKey
- type SecretKey
- type Signature
- func (s *Signature) Aggregate(other *Signature)
- func (s *Signature) Copy() *Signature
- func (s *Signature) GetPoint() *bls.G1Projective
- func (s *Signature) Serialize() [48]byte
- func (s *Signature) String() string
- func (s *Signature) VerifyAggregate(pubKeys []*PublicKey, msgs [][]byte) bool
- func (s *Signature) VerifyAggregateCommon(pubKeys []*PublicKey, msg []byte) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PublicKey ¶
type PublicKey struct {
// contains filtered or unexported fields
}
PublicKey is a public key.
func AggregatePublicKeys ¶
AggregatePublicKeys adds public keys together.
func DeserializePublicKey ¶
DeserializePublicKey deserializes a public key from bytes.
func NewAggregatePubkey ¶
func NewAggregatePubkey() *PublicKey
NewAggregatePubkey creates a blank public key.
func NewPublicKeyFromG2 ¶
NewPublicKeyFromG2 creates a new public key from a G2 element.
func (*PublicKey) GetPoint ¶
func (p *PublicKey) GetPoint() *bls.G2Projective
GetPoint gets the G2 point associated with the public key.
type SecretKey ¶
type SecretKey struct {
// contains filtered or unexported fields
}
SecretKey represents a BLS private key.
func DeriveSecretKey ¶
DeriveSecretKey derives a secret key from bytes.
func DeserializeSecretKey ¶
DeserializeSecretKey deserializes a secret key from bytes.
func KeyFromFQRepr ¶
KeyFromFQRepr returns a new key based on a FQRepr in FR.
func (SecretKey) GetFRElement ¶
GetFRElement gets the underlying FR element.
type Signature ¶
type Signature struct {
// contains filtered or unexported fields
}
Signature is a message signature.
func AggregateSignatures ¶
AggregateSignatures adds up all of the signatures.
func DeserializeSignature ¶
DeserializeSignature deserializes a signature from bytes.
func NewAggregateSignature ¶
func NewAggregateSignature() *Signature
NewAggregateSignature creates a blank aggregate signature.
func NewSignatureFromG1 ¶
NewSignatureFromG1 creates a new signature from a G1 element.
func (*Signature) GetPoint ¶
func (s *Signature) GetPoint() *bls.G1Projective
GetPoint gets the G1 point associated with the signature.
func (*Signature) VerifyAggregate ¶
VerifyAggregate verifies each public key against each message.