types

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// For immediate clarity, using literal numbers instead of blst named constants
	SecretKeyLength = 32
	PublicKeyLength = 48
	SignatureLength = 96
	// draft-irtf-cfrg-pairing-friendly-curves-11#4.2.1 BLS12_381
	CurveOrderHex = "0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001"
	// draft-irtf-cfrg-bls-signature-05#4.2.3
	DomainSeparationTagSig = []byte("BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_")
	DomainSeparationTagPop = []byte("BLS_POP_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_")
)
View Source
var (
	ErrSecretKeyGen       = errors.New("BLS secret keygen failed")
	ErrSecretKeyUnmarshal = errors.New("BLS secret key unmarshal failed")
	ErrPublicKeyUnmarshal = errors.New("BLS public key unmarshal failed")
	ErrPublicKeyAggregate = errors.New("BLS public key aggregation failed")
	ErrSignatureUnmarshal = errors.New("BLS signature unmarshal failed")
	ErrSignatureAggregate = errors.New("BLS signature aggregation failed")
	ErrEmptyArray         = errors.New("BLS aggregation failed due to empty array")
)

Functions

func ErrPublicKeyLength

func ErrPublicKeyLength(have int) error

func ErrSecretKeyLength

func ErrSecretKeyLength(have int) error

func ErrSignatureLength

func ErrSignatureLength(have int) error

Types

type PublicKey

type PublicKey interface {
	Marshal() []byte
	Copy() PublicKey
}

type SecretKey

type SecretKey interface {
	PublicKey() PublicKey
	Marshal() []byte
}

type Signature

type Signature interface {
	Marshal() []byte
	Copy() Signature
}

Jump to

Keyboard shortcuts

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