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.3a2.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.3a2-py3-none-any.whl (23.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hivemind_usenet-0.1.3a2.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.3a2.tar.gz
Algorithm Hash digest
SHA256 d8dddb44ab23f02634c84dce44c30322606652137b28a9b27b9af254796aa709
MD5 72d895227557f803a74275dd01240642
BLAKE2b-256 fa47d485cd38976b4edbdef48cea97ed8c36bdab890a3a2610cf8b41485dbfab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for hivemind_usenet-0.1.3a2-py3-none-any.whl
Algorithm Hash digest
SHA256 cb6f731bbea6c08a695c88c7628b6f7bab22214e50968792c6baa0979e6a3e5c
MD5 d2eabe00541fdadd17e9dfc62eae202f
BLAKE2b-256 963dc89c9c51c4b6e68824e28b058260be915029f896829284e76c8a4f6a6b26

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.3a2 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