config

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VerifySignature

func VerifySignature(publicKey []byte, message []byte, signature []byte) bool

VerifySignature verifies a Ringtail signature

Types

type Config

type Config struct {
	// ID is this party's identifier
	ID party.ID

	// Threshold is the minimum number of parties needed to sign
	Threshold int

	// Level is the security level (alias for SecurityLevel)
	Level SecurityLevel

	// SecurityLevel defines the post-quantum security parameters
	SecurityLevel SecurityLevel

	// PublicKey is the shared public key (lattice-based)
	PublicKey []byte

	// PrivateShare is this party's share of the private key
	PrivateShare []byte

	// VerificationShares allow verification of individual shares
	VerificationShares map[party.ID][]byte

	// ChainKey for key derivation
	ChainKey []byte

	// Participants is the list of parties in the protocol
	Participants []party.ID
	// contains filtered or unexported fields
}

Config represents a party's configuration after key generation

func NewConfig

func NewConfig(id party.ID, threshold int, level SecurityLevel) *Config

NewConfig creates a new Ringtail configuration

func (*Config) DeriveChildKey

func (c *Config) DeriveChildKey(index uint32) (*Config, error)

DeriveChildKey derives a child key using the chain key

func (*Config) GetParameters

func (c *Config) GetParameters() Parameters

GetParameters returns the lattice parameters for this configuration

func (*Config) ValidateShare

func (c *Config) ValidateShare(from party.ID, share []byte) bool

ValidateShare verifies that a share from another party is valid

type Parameters

type Parameters struct {
	N            int     // Lattice dimension
	Q            int     // Modulus
	Sigma        float64 // Gaussian noise parameter
	SecurityBits int
}

Parameters holds the lattice parameters for different security levels

type SecurityLevel

type SecurityLevel int

SecurityLevel defines the security parameters for Ringtail

const (
	// Security128 provides 128-bit post-quantum security
	Security128 SecurityLevel = iota
	// Security192 provides 192-bit post-quantum security
	Security192
	// Security256 provides 256-bit post-quantum security
	Security256
)

Jump to

Keyboard shortcuts

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