Documentation
¶
Overview ¶
Package config implements the Katzenpost voting authority server configuration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authority ¶
type Authority struct { // Identifier is the human readable identifier for the node (eg: FQDN). Identifier string // IdentityPublicKeyPem is a string in PEM format containing // the public identity key key. IdentityPublicKey sign.PublicKey // PKISignatureScheme specifies the cryptographic signature scheme PKISignatureScheme string // LinkPublicKeyPem is string containing the PEM format of the peer's public link layer key. LinkPublicKey kem.PublicKey // WireKEMScheme is the wire protocol KEM scheme to use. WireKEMScheme string // Addresses are the listener addresses specified by a URL, e.g. tcp://1.2.3.4:1234 or quic://1.2.3.4:1234 // Both IPv4 and IPv6 as well as hostnames are valid. Addresses []string }
Authority is the authority configuration for a peer.
func (*Authority) UnmarshalTOML ¶
UnmarshalTOML deserializes into non-nil instances of sign.PublicKey and kem.PublicKey
type Config ¶
type Config struct { Server *Server Authorities []*Authority Logging *Logging Parameters *Parameters Debug *Debug Mixes []*Node GatewayNodes []*Node ServiceNodes []*Node StorageReplicas []*Node Topology *Topology SphinxGeometry *geo.Geometry }
Config is the top level authority configuration.
func Load ¶
Load parses and validates the provided buffer b as a config file body and returns the Config.
func (*Config) FixupAndValidate ¶
FixupAndValidate applies defaults to config entries and validates the supplied configuration. Most people should call one of the Load variants instead.
func (*Config) ValidateAuthorities ¶ added in v0.0.31
ValidateAuthorities takes as an argument the dirauth server's own public key and tries to find a match in the dirauth peers. Returns an error if no match is found. Dirauths must be their own peer.
type Debug ¶
type Debug struct { // 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 ¶
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 ¶
type Node struct { // Identifier is the human readable node identifier, to be set iff // the node is a Provider. Identifier string // IdentityPublicKeyPem is the node's public signing key also known // as the identity key. IdentityPublicKeyPem string }
Node is an authority mix node or provider entry.
type Parameters ¶
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 loop decoys. 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 deop decoys. 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 sending mix node decoys. LambdaM float64 // LambdaG is the inverse of the mean of the exponential distribution // that is used to select the delay between sending gateway node decoys. // // WARNING: This is not used via the TOML config file; this field is only // used internally by the dirauth server state machine. LambdaG float64 // LambdaMMaxDelay sets the maximum delay for LambdaP. LambdaMMaxDelay uint64 // LambdaGMaxDelay sets the maximum delay for LambdaG. LambdaGMaxDelay uint64 }
Parameters is the network parameters.
type Server ¶
type Server struct { // Identifier is the human readable identifier for the node (eg: FQDN). Identifier string // WireKEMScheme is the wire protocol KEM scheme to use. WireKEMScheme string // PKISignatureScheme specifies the cryptographic signature scheme PKISignatureScheme string // Addresses are the IP address/port combinations that the server will bind // to for incoming connections. Addresses []string // DataDir is the absolute path to the server's state files. DataDir string }