The pieces / weirdnetctl

weirdnetctl

Holds and rotates Weirdnet signing keys, signs scheme records, and builds the signed canonical list.

v0.1.1 GitHub crates.io cargo install weirdnetctl

What it brings

The maintainer's tool for Weirdnet signing keys. It holds and rotates the WeirdBrains root key, signs prefix and scheme records for weirdnet-schemes, countersigns reserved weirdnet… records, builds the canonical list, and verifies all of them. App publishers use it to sign their own prefix and scheme.

What it is

The maintainer’s CLI for Weirdnet signing keys and the records they sign: the WeirdBrains root key, prefix and scheme records for weirdnet-schemes, countersignatures for reserved prefixes, and the canonical list.

How it works

  • Keys are Ed25519, sealed with a passphrase (Argon2id, then XChaCha20-Poly1305) in JSON key files created 0600 and never overwritten. The public key and label are in the clear and bound to the sealed key. The passphrase is prompted for, or read from --passphrase-file or WEIRDNETCTL_PASSPHRASE_FILE; typed passphrases need at least 12 characters. --unencrypted is for tests only.
  • Commands: key new, show, check and rotate; prefix and scheme (with --withdraw for withdrawals); countersign --as root and --as transfer; list (build and sign the canonical list, then check it loads); verify against --anchor keys.
  • Rotating the root: key rotate makes a new key and a rotation signed by both; publish the rotation, ship the new public key as an anchor in app updates (apps follow it with TrustAnchors::rotate), sign the next list with the new key, and keep the old key offline.

Key types and modules

  • key new|show|check|rotate: passphrase-sealed Ed25519 key files.
  • prefix, scheme: sign registrations and withdrawals.
  • countersign --as root|transfer, list, verify.

Feature flags

None: everything is on by default.

Install and use

Install:

cargo install weirdnetctl
weirdnetctl key new --label weirdbrains-root --out root.key
weirdnetctl key show root.key            # public key and id: ship it as the trust anchor
weirdnetctl prefix --key morph.key --prefix weirdnet-morph --seq 1 -o prefix.json
weirdnetctl list --key root.key --seq 42 prefix.json scheme.json -o canonical.json
weirdnetctl verify --anchor "$(weirdnetctl key show root.key | head -1)" canonical.json

Where it fits