bls

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2021 License: BSD-3-Clause Imports: 6 Imported by: 3

README

BLS

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Verify

func Verify(sig *Signature, msg []byte, pubk *PublicKey) bool

func Verify1ForN

func Verify1ForN(sig *Signature, pubk *PublicKey, msgs ...[]byte) bool

func VerifyGroupMessage

func VerifyGroupMessage(sig *Signature, msgs ...*VerifiableMessage) bool

func VerifyNFor1

func VerifyNFor1(sig *Signature, msg []byte, pubks ...*PublicKey) bool

Types

type HashPoint

type HashPoint struct {
	// contains filtered or unexported fields
}

func (*HashPoint) Aggregate

func (hpt *HashPoint) Aggregate(hpts ...*HashPoint) *HashPoint

func (*HashPoint) Marshal

func (hp *HashPoint) Marshal() []byte

func (*HashPoint) Sum

func (hpt *HashPoint) Sum(msg []byte) *HashPoint

func (*HashPoint) SumAggregate

func (hpt *HashPoint) SumAggregate(msgs ...[]byte) *HashPoint

func (*HashPoint) Unmarshal

func (hp *HashPoint) Unmarshal(in []byte) error

type KeyPair

type KeyPair struct {
	// contains filtered or unexported fields
}

func GenerateKey

func GenerateKey() *KeyPair

func KeyFromSeed

func KeyFromSeed(seed []byte) *KeyPair

func (*KeyPair) Marshal

func (kp *KeyPair) Marshal() []byte

func (*KeyPair) MarshalPrivate

func (kp *KeyPair) MarshalPrivate() []byte

func (*KeyPair) MarshalPublic

func (kp *KeyPair) MarshalPublic() []byte

func (*KeyPair) Private

func (kp *KeyPair) Private() *PrivateKey

func (*KeyPair) Public

func (kp *KeyPair) Public() *PublicKey

func (*KeyPair) Unmarshal

func (kp *KeyPair) Unmarshal(in []byte) error

func (*KeyPair) UnmarshalPrivate

func (kp *KeyPair) UnmarshalPrivate(in []byte) error

func (*KeyPair) UnmarshalPublic

func (kp *KeyPair) UnmarshalPublic(in []byte) error

type PrivateKey

type PrivateKey struct {
	// contains filtered or unexported fields
}

func (*PrivateKey) Copy

func (pvtk *PrivateKey) Copy() *PrivateKey

func (*PrivateKey) IsNull

func (pvtk *PrivateKey) IsNull() bool

func (*PrivateKey) Marshal

func (pvtk *PrivateKey) Marshal() []byte

func (*PrivateKey) Null

func (pvtk *PrivateKey) Null() *PrivateKey

func (*PrivateKey) Public

func (pvtk *PrivateKey) Public() *PublicKey

func (*PrivateKey) Unmarshal

func (pvtk *PrivateKey) Unmarshal(in []byte) error

type PublicKey

type PublicKey struct {
	// contains filtered or unexported fields
}

func Private2Public

func Private2Public(pvtk *PrivateKey) *PublicKey

func (*PublicKey) Aggregate

func (pubk *PublicKey) Aggregate(pubks ...*PublicKey) *PublicKey

func (*PublicKey) Copy

func (pubk *PublicKey) Copy() *PublicKey

func (*PublicKey) IsNull

func (pubk *PublicKey) IsNull() bool

func (*PublicKey) Marshal

func (pubk *PublicKey) Marshal() []byte

func (*PublicKey) Null

func (pubk *PublicKey) Null() *PublicKey

func (*PublicKey) Unmarshal

func (pubk *PublicKey) Unmarshal(in []byte) error

type Signature

type Signature struct {
	// contains filtered or unexported fields
}

func Sign

func Sign(msg []byte, pvtk *PrivateKey) *Signature

func (*Signature) Aggregate

func (sig *Signature) Aggregate(sigs ...*Signature) *Signature

func (*Signature) Marshal

func (sig *Signature) Marshal() []byte

func (*Signature) Sign

func (sig *Signature) Sign(hpt *HashPoint, pvtk *PrivateKey) *Signature

func (*Signature) Unmarshal

func (sig *Signature) Unmarshal(in []byte) error

type VerifiableMessage

type VerifiableMessage struct {
	// contains filtered or unexported fields
}

func NewVerifiableMessage

func NewVerifiableMessage(msg []byte, pubk *PublicKey) *VerifiableMessage

Directories

Path Synopsis
Package bn256 implements a particular bilinear group at the 128-bit security level.
Package bn256 implements a particular bilinear group at the 128-bit security level.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL