config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Network parameters
	NetworkConfig NetworkConfig `json:"network"`

	// Signature scheme parameters
	SignatureParams SignatureParams `json:"signature"`

	// Consensus integration
	ConsensusConfig ConsensusConfig `json:"consensus"`
}

Config holds all configurable parameters for the signature scheme

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns the default configuration

func LoadConfig

func LoadConfig(path string) (*Config, error)

LoadConfig loads configuration from a JSON file

func (*Config) SaveConfig

func (c *Config) SaveConfig(path string) error

SaveConfig saves configuration to a JSON file

type ConsensusConfig

type ConsensusConfig struct {
	Enabled           bool   `json:"enabled"`
	ConsensusTimeout  int    `json:"consensus_timeout_ms"`
	SignatureTimeout  int    `json:"signature_timeout_ms"`
	MaxConcurrentSigs int    `json:"max_concurrent_signatures"`
	NodeID            string `json:"node_id"`
}

ConsensusConfig holds Lux consensus integration parameters

type NetworkConfig

type NetworkConfig struct {
	ListenPort    int      `json:"listen_port"`
	PeerAddresses []string `json:"peer_addresses"`
	Timeout       int      `json:"timeout_seconds"`
	MaxRetries    int      `json:"max_retries"`
}

NetworkConfig holds network-related configuration

type SignatureParams

type SignatureParams struct {
	M               int     `json:"m"`
	N               int     `json:"n"`
	Dbar            int     `json:"dbar"`
	B               float64 `json:"b"`
	Kappa           int     `json:"kappa"`
	LogN            int     `json:"log_n"`
	SigmaE          float64 `json:"sigma_e"`
	SigmaStar       float64 `json:"sigma_star"`
	SigmaU          float64 `json:"sigma_u"`
	KeySize         int     `json:"key_size"`
	Q               uint64  `json:"q"`
	QNu             uint64  `json:"q_nu"`
	QXi             uint64  `json:"q_xi"`
	TrustedDealerID int     `json:"trusted_dealer_id"`
	CombinerID      int     `json:"combiner_id"`
	Xi              int     `json:"xi"`
	Nu              int     `json:"nu"`
	EtaEpsilon      float64 `json:"eta_epsilon"`
	PartyCount      int     `json:"party_count"`
	Threshold       int     `json:"threshold"`
}

SignatureParams holds signature scheme parameters

Jump to

Keyboard shortcuts

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