quasar

package
v1.13.4-lux Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2025 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

SPDX-License-Identifier: BUSL-1.1

Index

Constants

View Source
const RT_L128 = 128
View Source
const (
	Security = RT_L128 // 128-bit PQ security
)

Variables

This section is empty.

Functions

func BindShare

func BindShare(share Share, data []byte) ([]byte, error)

BindShare binds a share to data

func ConvertToRTShare

func ConvertToRTShare(share Share) ringtail.Share

ConvertToRTShare converts a quasar.Share to ringtail.Share

func GenerateKey

func GenerateKey(security int, reader interface{}) (SecretKey, PublicKey, error)

GenerateKey generates a new key pair

func Hash

func Hash(c Cert) [32]byte

Hash returns the SHA-256 of the serialized cert (for header field).

func KeyGen

func KeyGen() (SecretKey, PublicKey, error)

KeyGen returns (sk, pk) for validator use.

func QuickSign

func QuickSign(share Share, blockID [32]byte) ([]byte, error)

QuickSign binds a pre-computed share to blockID. Panics if share & block mismatch.

func QuickVerify

func QuickVerify(pk PublicKey, blockID [32]byte, sig []byte) bool

QuickVerify single-share (for tx-level checks, optional).

Types

type Aggregator

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

Aggregator collects Ringtail shares → certificate once quorum reached.

func NewAggregator

func NewAggregator(quorum int, d time.Duration) *Aggregator

func (*Aggregator) Add

func (a *Aggregator) Add(blockID [32]byte, s rt.Share)

func (*Aggregator) Certs

func (a *Aggregator) Certs() <-chan Cert

Certs returns read-only channel of sealed certificates.

type Cert

type Cert = Certificate

type Certificate

type Certificate []byte

type Pool

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

Pool keeps <N> ready-made Ringtail shares in RAM per validator.

func NewPool

func NewPool(sk SecretKey, warm int) *Pool

func (*Pool) Get

func (p *Pool) Get() Share

Get pops one share or blocks until available.

type PublicKey

type PublicKey []byte

type SecretKey

type SecretKey []byte

type Share

type Share []byte

func Precompute

func Precompute(sk SecretKey) (Share, error)

Precompute performs precomputation

Directories

Path Synopsis
Package ringtail provides placeholder implementations for the Ringtail cryptographic library
Package ringtail provides placeholder implementations for the Ringtail cryptographic library

Jump to

Keyboard shortcuts

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