Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

hivemind-usenet

An experimental HiveMind transport over Usenet: anonymous, store-and-forward, censorship-resistant mesh links carried by alt.anonymous.messages. Nodes post PGP-encrypted, hSub-addressed articles to a newsgroup and poll for replies. There is no direct connection, no shared IP, and no registered account on the public anon-post servers.

Usenet is high-latency and poll-based. Treat this as a covert or control-plane link, or as a fallback for nodes that are never reachable directly, not as a low-latency audio channel.

Where it sits

Standard HiveMind links are live encrypted WebSocket connections to a hivemind-core hub. hivemind-usenet swaps the carrier for Usenet and keeps the HiveMind handshake and AES session on top, unchanged. It ships three surfaces in one package:

  • UsenetCarrier: the shared framing layer. It chunks arbitrary payloads into roughly 8 KB base64 frames, PGP-encrypts each to the peer's key, posts under an hSub subject, and reassembles on poll. You can test it fully without a live NNTP connection.
  • UsenetWormhole (a NetworkProtocol): the full HiveMessage transport. A point-to-point link whose poll loop reassembles kind="hive" frames and routes them through hm_protocol.handle_message. It is registered under the hivemind.network.protocol entry point.
  • UsenetBridge (a threading.Thread): a natural-language gateway. It polls a code-word hSub for text posts, injects them into the hive as utterances, and posts the spoken answers back. Per-peer session ids and per-session FIFO queues keep concurrent conversations separate.

A satellite-side client (UsenetClient) mirrors the HTTP/WS client API, so the same connect/emit/run/close usage works over the Usenet carrier.

How it works

local node  ◀──── UsenetCarrier (PGP + hSub frames) ────▶  peer node
                 post to alt.anonymous.messages
                 poll + match hSub + decrypt + reassemble
  • Addressing is hSub (hashed subject): a shared passphrase per peer. The sender stamps the subject with create_hsub(peer_secret). The receiver filters articles with match_hsub(subject, my_secret).
  • Confidentiality is PGP. Each frame is encrypted to the peer's public key.
  • Reassembly dedupes on (message-id, chunk) and rebuilds the payload once all chunks arrive.

Prerequisites

  • Python 3.10-3.12. The carrier's PGP crypto (remailers to PGPy) imports the standard-library imghdr module, which was removed in Python 3.13 (PEP 594). The package is capped >=3.10,<3.13. See the security docs.
  • A PGP identity per node. remailers.Credentials generates one automatically at the configured key_path if it is missing.
  • For each peer link, an out-of-band exchange of an hSub passphrase and the peer's PGP public key (see first contact).
  • Network access to a Usenet server that accepts anonymous posts. This defaults to paganini.bofh.team. news.tcpreset.net also accepts anonymous posts.

Install

pip install hivemind-usenet

From source:

git clone https://github.com/JarbasHiveMind/hivemind-usenet
cd hivemind-usenet
pip install -e .

This pulls in the usenet and remailers carrier libraries plus the HiveMind packages.

Quickstart

Two nodes that have exchanged passphrases and public keys out of band:

# Wormhole node (full HiveMessage transport)
hivemind-usenet-wormhole \
    --my-secret   "my-passphrase" \
    --peer-secret "their-passphrase" \
    --peer-pubkey /path/to/peer.asc \
    --server-url  paganini.bofh.team

# NL bridge (text in/out of a local hive)
hivemind-usenet-bridge \
    --my-secret "bridge-codeword" \
    --hive-host 127.0.0.1 \
    --hive-key  "my-hivemind-api-key" \
    --hive-password "my-hivemind-password"

--hive-key is the access key and --hive-password is the Noise PSK password -- both are required to authenticate against a v3-Noise-only HiveMind hub. The legacy crypto_key is not used for authentication.

--my-secret is the hSub passphrase you read with. --peer-secret is the one you post with, and the peer reads it. They are the mirror image on the other node.

First contact / hSub addressing

hSub addressing is shared-secret symmetric: both peers must agree on a passphrase and exchange PGP public keys out of band before any post. There is no in-band key exchange in v1. A discovery "lobby" hSub is a planned stretch goal.

Configuration

CLI flags map to config keys read by each component. See configuration for the full table and the JSON config-file form.

Documentation

See docs/:

Related projects

  • HiveMind-core: the hub this transport connects to.
  • hivescope: the in-process HiveMind test harness used by this package's end-to-end tests.

Tests

All tests run offline. There is no live news server and no network. The carrier's NNTP transport is the only thing faked. The end-to-end suite drives a real hivemind-core master and satellite through a real handshake and bus round-trip over the real UsenetCarrier. The package is capped at Python 3.12, as noted above:

uv venv --python 3.12
uv pip install --prerelease=allow -e .[test]
uv run pytest tests/

See docs/testing.md for the full layout and how the carrier is faked.

License

Apache-2.0

Download files

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

Source Distribution

hivemind_usenet-0.1.3a3.tar.gz (29.0 kB view details)

Uploaded Source

Built Distribution

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

hivemind_usenet-0.1.3a3-py3-none-any.whl (23.3 kB view details)

Uploaded Python 3

File details

Details for the file hivemind_usenet-0.1.3a3.tar.gz.

File metadata

  • Download URL: hivemind_usenet-0.1.3a3.tar.gz
  • Upload date:
  • Size: 29.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for hivemind_usenet-0.1.3a3.tar.gz
Algorithm Hash digest
SHA256 c3d461441ea7f087a6b51d920e11b873f90dc7a89b5f5e2d1c73e26f5a9412a8
MD5 e71c6b1fbf3146e6a153a576de757231
BLAKE2b-256 8c52b0e6d461d05a64bba824949e9ca97059aad339760d15c7cb6b29857b092a

See more details on using hashes here.

File details

Details for the file hivemind_usenet-0.1.3a3-py3-none-any.whl.

File metadata

File hashes

Hashes for hivemind_usenet-0.1.3a3-py3-none-any.whl
Algorithm Hash digest
SHA256 1122f6eedf47d3c8b7602e27800872378360b3a4f5d2263a0a49c7f140f11f92
MD5 81fae9a0aa2333759426434acd3e464c
BLAKE2b-256 cf2ef5961b19aa834536ad6b6b2847166caa3993d1408d6333ff375c2fe54f3c

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.3a3 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page