Skip to main content

Module keys

Module keys 

Source
Expand description

Publisher signing-key management for ctxpkg (GL #406).

One ed25519 keypair per machine user, stored as a 32-byte hex seed under the XDG data dir at <data_dir>/keys/ctxpkg-ed25519.key (mode 0600 on unix). Created lazily on first pack export --sign. The public key identifies the publisher across releases — registries and clients surface it per version.

Constants§

KEY_REL_PATH

Functions§

key_path
Resolves through the XDG data dir (not a hardcoded ~/.lean-ctx) so the key follows the migrated layout and never re-creates the legacy dir (GH #436).
load_or_create
Load the signing key, creating it on first use. Returns the key and whether it was newly generated (so the CLI can tell the user once).
public_key_hex
Hex of the public verifying key — the publisher’s stable identity.