authority: github.com/katzenpost/authority/voting/server/config Index | Files

package config

import "github.com/katzenpost/authority/voting/server/config"

Package config implements the Katzenpost voting authority server configuration.

Index

Package Files

config.go

type Authority Uses

type Authority struct {
    // Identifier is the human readable identifier for the node (eg: FQDN).
    Identifier string

    // Addresses are the IP address/port combinations that the authority will
    // bind to for incoming connections.
    Addresses []string

    // DataDir is the absolute path to the authority's state files.
    DataDir string
}

Authority is the authority configuration.

type AuthorityPeer Uses

type AuthorityPeer struct {
    // IdentityPublicKey is the peer's identity signing key.
    IdentityPublicKey *eddsa.PublicKey
    // LinkPublicKey is the peer's public link layer key.
    LinkPublicKey *ecdh.PublicKey
    // Addresses are the IP address/port combinations that the peer authority
    // uses for the Directory Authority service.
    Addresses []string
}

AuthorityPeer is the connecting information and identity key for the Authority peers

func (*AuthorityPeer) Validate Uses

func (a *AuthorityPeer) Validate() error

Validate parses and checks the AuthorityPeer configuration.

type Config Uses

type Config struct {
    Authority   *Authority
    Authorities []*AuthorityPeer
    Logging     *Logging
    Parameters  *Parameters
    Debug       *Debug

    Mixes     []*Node
    Providers []*Node
}

Config is the top level authority configuration.

func Load Uses

func Load(b []byte, forceGenOnly bool) (*Config, error)

Load parses and validates the provided buffer b as a config file body and returns the Config.

func LoadFile Uses

func LoadFile(f string, forceGenOnly bool) (*Config, error)

LoadFile loads, parses and validates the provided file and returns the Config.

func (*Config) FixupAndValidate Uses

func (cfg *Config) FixupAndValidate() error

FixupAndValidate applies defaults to config entries and validates the supplied configuration. Most people should call one of the Load variants instead.

type Debug Uses

type Debug struct {
    // IdentityKey specifies the identity private key.
    IdentityKey *eddsa.PrivateKey `toml:"-"`

    // LinkKey specifies the link layer private key.
    LinkKey *ecdh.PrivateKey `toml:"-"`

    // Layers is the number of non-provider layers in the network topology.
    Layers int

    // MinNodesPerLayer is the minimum number of nodes per layer required to
    // form a valid Document.
    MinNodesPerLayer int

    // GenerateOnly halts and cleans up the server right after long term
    // key generation.
    GenerateOnly bool
}

Debug is the authority debug configuration.

type Logging Uses

type Logging struct {
    // Disable disables logging entirely.
    Disable bool

    // File specifies the log file, if omitted stdout will be used.
    File string

    // Level specifies the log level.
    Level string
}

Logging is the authority logging configuration.

type Node Uses

type Node struct {
    // Identifier is the human readable node identifier, to be set iff
    // the node is a Provider.
    Identifier string

    // IdentityKey is the node's identity signing key.
    IdentityKey *eddsa.PublicKey
}

Node is an authority mix node or provider entry.

type Parameters Uses

type Parameters struct {
    // SendRatePerMinute is the rate per minute.
    SendRatePerMinute uint64

    // Mu is the inverse of the mean of the exponential distribution
    // that is used to select the delay for each hop.
    Mu  float64

    // MuMaxDelay sets the maximum delay for Mu.
    MuMaxDelay uint64

    // LambdaP is the inverse of the mean of the exponential distribution
    // that is used to select the delay between clients sending from their egress
    // FIFO queue or drop decoy message.
    LambdaP float64

    // LambdaPMaxDelay sets the maximum delay for LambdaP.
    LambdaPMaxDelay uint64

    // LambdaL is the inverse of the mean of the exponential distribution
    // that is used to select the delay between clients sending from their egress
    // FIFO queue or drop decoy message.
    LambdaL float64

    // LambdaLMaxDelay sets the maximum delay for LambdaP.
    LambdaLMaxDelay uint64

    // LambdaD is the inverse of the mean of the exponential distribution
    // that is used to select the delay between clients sending from their egress
    // FIFO queue or drop decoy message.
    LambdaD float64

    // LambdaDMaxDelay sets the maximum delay for LambdaP.
    LambdaDMaxDelay uint64

    // LambdaM is the inverse of the mean of the exponential distribution
    // that is used to select the delay between clients sending from their egress
    // FIFO queue or drop decoy message.
    LambdaM float64

    // LambdaMMaxDelay sets the maximum delay for LambdaP.
    LambdaMMaxDelay uint64
}

Parameters is the network parameters.

Package config imports 11 packages (graph) and is imported by 8 packages. Updated 2019-05-04. Refresh now. Tools for package owners.