bls

package
v0.0.0-...-c9b5afb Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PublicKey

type PublicKey bls.G2Affine

func PublicKeyFromBytes

func PublicKeyFromBytes(b []byte) (*PublicKey, error)

PublicKeyFromBytes returns a PublicKey from a byte slice.

func PublicKeyFromHexString

func PublicKeyFromHexString(s string) (*PublicKey, error)

PublicKeyFromHexString returns a PublicKey from a hex string.

type SecretKey

type SecretKey fr.Element

func NewSecretKeyByCSPRNG

func NewSecretKeyByCSPRNG() *SecretKey

NewSecretKeyByCSPRNG returns a new SecretKey generated by CSPRNG.

func (*SecretKey) PublicKey

func (sk *SecretKey) PublicKey() *PublicKey

func (*SecretKey) Sign

func (sk *SecretKey) Sign(msg []byte) (*Signature, error)

type Signature

type Signature bls.G1Affine

func SignatureFromBytes

func SignatureFromBytes(b []byte) (*Signature, error)

SignatureFromBytes returns a Signature from a byte slice.

func SignatureFromHexString

func SignatureFromHexString(s string) (*Signature, error)

SignatureFromHexString returns a Signature from a hex string.

func (*Signature) Verify

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

Jump to

Keyboard shortcuts

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