Help us shape the future of Go! Take the 2026 Go Developer Survey

ringtail

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2025 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SKSize      = 96    // Secret key size (estimated)
	PKSize      = 192   // Public key size (estimated)
	ShareSize   = 430   // Share size (≈ 430 B as per docs)
	CertSize    = 3072  // Certificate size (≈ 3 kB as per docs)
	PrecompSize = 40960 // Precomputation size (32-40 kB as per docs)
)

Constants - estimated sizes based on Ringtail implementation

Variables

This section is empty.

Functions

func Aggregate

func Aggregate(shares []Share) ([]byte, error)

Aggregate combines shares into a certificate

func CreateMockRingtailCertificate added in v1.14.2

func CreateMockRingtailCertificate(msg []byte, shares []Share) ([]byte, error)

CreateMockRingtailCertificate creates a mock certificate for testing

func KeyGen

func KeyGen(seed []byte) (sk, pk []byte, err error)

KeyGen generates a new key pair

func Sign

func Sign(sk, msg []byte) ([]byte, error)

Sign creates a signature for a message

func Verify

func Verify(pk, msg, cert []byte) bool

Verify verifies a certificate

func VerifyShare

func VerifyShare(pk, msg, share []byte) bool

VerifyShare verifies a signature share

Types

type Precomp

type Precomp []byte

Precomp is precomputed randomness

func Precompute

func Precompute(sk []byte) (Precomp, error)

Precompute generates precomputation data

type Share

type Share []byte

Share is a signer-specific quick signature

func CreateMockRingtailShare added in v1.14.2

func CreateMockRingtailShare(msg []byte, skIndex int) Share

CreateMockRingtailShare creates a mock share for testing

func QuickSign

func QuickSign(pre Precomp, msg []byte) (Share, error)

QuickSign creates a signature share

type Signature added in v1.14.2

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

Signature represents a Ringtail signature

func (*Signature) Bytes added in v1.14.2

func (s *Signature) Bytes() []byte

Bytes returns the byte representation

type Verifier added in v1.14.2

type Verifier struct{}

Verifier verifies Ringtail signatures

func NewVerifier added in v1.14.2

func NewVerifier() *Verifier

NewVerifier creates a new Ringtail verifier

func (*Verifier) Verify added in v1.14.2

func (v *Verifier) Verify(msg []byte, sig *Signature) error

Verify verifies a Ringtail signature

type Witness added in v1.14.2

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

Witness represents a Ringtail witness for verification

Jump to

Keyboard shortcuts

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