Skip to main content

A thinclient for the Katzenpost client daemon

Project description

katzenpost_thinclient

A thin client for sending and receiving messages via the Katzenpost mix network.

This PyPI package provides an async Python thin client library for interacting with a Katzenpost mixnet.

A mix network is a type of anonymous communications network. A thin client library is code you may use as a dependency in your application so that it can anonymously interact with services on the mix network. The Katzenpost client daemon (kpclientd) is a multiplexing client; many applications on the same device may use their thin client libraries to connect to the daemon and interact with mixnet services concurrently. All cryptographic operations, including PQ Noise transport, Sphinx packet construction, and ARQ retransmission, are performed by the daemon, not by this library.

Pigeonhole, in brief

Beyond simple request-response services, Katzenpost provides a storage layer called Pigeonhole. Applications communicate through encrypted, append-only streams composed of fixed-size, padded Boxes, sharded across storage replicas via consistent hashing. Access is governed by cryptographic capabilities: a write capability appends messages or places tombstones, whilst a separate read capability decrypts and verifies without conferring any ability to write. Streams are single-writer, multi-reader, and unlinkable to outside observers. Storage is ephemeral: Boxes are garbage-collected after roughly two weeks, so Pigeonhole is not intended for long-term archival storage. For a developer-oriented introduction, see Understanding Pigeonhole.

Documentation

Installation

Install from PyPI:

pip install katzenpost_thinclient

Or, from a checkout of this repository:

pip install -e .

Compatibility

This package is intended to be used with the version of kpclientd listed in Build from source. That page is the canonical record of currently pinned tags for the whole stack; please consult it before pinning a version of your own.

Running the tests

The tests/ directory contains the integration suite, which doubles as a working reference for the API. The tests expect a running Katzenpost mixnet; the most convenient way to obtain one is the docker test mixnet shipped with the Katzenpost monorepo. Full instructions are in Docker test network; the short form is:

cd katzenpost/docker
make start wait run-ping

The mixnet runs kpclientd inside a container exposed on 127.0.0.1:64331, and writes a thin client configuration to voting_mixnet/client/thinclient.toml. The test suite locates a preconfigured fixture at testdata/thinclient.toml, which dials the daemon on that port:

pytest

Applications using this library

Two larger programs that use this library:

  1. stats, a terminal application that prints the current mixnet status.
  2. worldmap, which renders an image of the mixnet transposed over a world map.

Contributions

This is a work in progress, and we welcome feedback from developers who try to use it. Pull requests are welcome at https://github.com/katzenpost/thin_client.

License

AGPLv3.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

katzenpost_thinclient-0.0.19.tar.gz (177.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

katzenpost_thinclient-0.0.19-py3-none-any.whl (75.6 kB view details)

Uploaded Python 3

File details

Details for the file katzenpost_thinclient-0.0.19.tar.gz.

File metadata

  • Download URL: katzenpost_thinclient-0.0.19.tar.gz
  • Upload date:
  • Size: 177.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for katzenpost_thinclient-0.0.19.tar.gz
Algorithm Hash digest
SHA256 74bc364c9107f870d3c774008b6bc31a75cc855b934dcfc3cf49c9c86d4a8b7b
MD5 318f7bc4313cc1b5bdf0183019aee70f
BLAKE2b-256 5b721e9ee8ee7085453437ec15e35cdbe1e6c641fc16350bb61f1f399517cd46

See more details on using hashes here.

Provenance

The following attestation bundles were made for katzenpost_thinclient-0.0.19.tar.gz:

Publisher: publish-py.yml on katzenpost/thin_client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file katzenpost_thinclient-0.0.19-py3-none-any.whl.

File metadata

File hashes

Hashes for katzenpost_thinclient-0.0.19-py3-none-any.whl
Algorithm Hash digest
SHA256 fb5769311f4205d129fea96c563bc17425822430b42e0d19112843b3a4cf1f53
MD5 9cfccf0ecddd62f5ca125499942f0b9c
BLAKE2b-256 6060df5300e1fd563bfa0589fdeb9569477e4a50addeb648a84471deff1c9389

See more details on using hashes here.

Provenance

The following attestation bundles were made for katzenpost_thinclient-0.0.19-py3-none-any.whl:

Publisher: publish-py.yml on katzenpost/thin_client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page