Documentation
¶
Overview ¶
Package client implements the Katzenpost voting authority client.
Index ¶
- func New(cfg *Config) (pki.Client, error)
- type Client
- func (c *Client) Deserialize(raw []byte) (*pki.Document, error)
- func (c *Client) GetPKIDocumentForEpoch(ctx context.Context, epoch uint64) (*pki.Document, []byte, error)
- func (c *Client) Post(ctx context.Context, epoch uint64, signingPrivateKey sign.PrivateKey, ...) error
- func (c *Client) PostReplica(ctx context.Context, epoch uint64, signingPrivateKey sign.PrivateKey, ...) error
- type Config
- type PeerResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a PKI client.
func (*Client) Deserialize ¶
Deserialize returns PKI document given the raw bytes.
func (*Client) GetPKIDocumentForEpoch ¶ added in v0.0.64
func (c *Client) GetPKIDocumentForEpoch(ctx context.Context, epoch uint64) (*pki.Document, []byte, error)
Get returns the PKI document along with the raw serialized form for the provided epoch.
func (*Client) Post ¶
func (c *Client) Post(ctx context.Context, epoch uint64, signingPrivateKey sign.PrivateKey, signingPublicKey sign.PublicKey, d *pki.MixDescriptor, loopstats *loops.LoopStats) error
Post posts the node's descriptor to the PKI for the provided epoch.
func (*Client) PostReplica ¶ added in v0.0.44
func (c *Client) PostReplica(ctx context.Context, epoch uint64, signingPrivateKey sign.PrivateKey, signingPublicKey sign.PublicKey, d *pki.ReplicaDescriptor) error
PostReplica posts the node's descriptor to the PKI for the provided epoch.
type Config ¶
type Config struct {
// KEMScheme indicates the KEM scheme used for the LinkKey/wire protocol.
KEMScheme kem.Scheme
// PKISignatureScheme specifies the cryptographic signature scheme
PKISignatureScheme sign.Scheme
// LinkKey is the link key for the client's wire connections.
LinkKey kem.PrivateKey
// LogBackend is the `core/log` Backend instance to use for logging.
LogBackend *log.Backend
// Authorities is the set of Directory Authority servers.
Authorities []*config.Authority
// DialContextFn is the optional alternative Dialer.DialContext function
// to be used when creating outgoing network connections.
DialContextFn func(ctx context.Context, network, address string) (net.Conn, error)
// Geo is the geometry used for the Sphinx packet construction.
Geo *geo.Geometry
// Network timeouts (seconds) - should match server config
DialTimeoutSec int // TCP connection (default: 30)
HandshakeTimeoutSec int // Wire handshake (default: 180)
ResponseTimeoutSec int // Command exchange (default: 90)
}
Config is a voting authority pki.Client instance.
Click to show internal directories.
Click to hide internal directories.