mesa-doc /mesa/docs/requirements/pack-signing
docs

Pack signing (Ed25519, pack.sig)

Status: base verifier + Pro signer implemented (2026-11-28). Pro mesa-pack sign writes this format; cross-repo e2e verified against modu pack verify.

Format

A signed pack carries a detached pack.sig next to pack.json:

{
  "version": 1,
  "alg": "ed25519",
  "createdAt": "2026-11-28T00:00:00.000Z",
  "files": [{ "path": "pack.json", "sha256": "…" }, { "path": "menus.json", "sha256": "…" }],
  "signature": "base64(ed25519)"
}
  • The signature covers canonical JSON of {version,alg,createdAt,files}: keys sorted recursively, arrays in order, compact separators.
  • files must cover every regular file in the pack except pack.sig; missing, extra or changed files fail. Symlinks are rejected.
  • sha256 is lowercase hex of the raw file bytes.
  • Signing is commercial (MESA Pro); verification is free in the base.

Verify

modu pack verify <packDir> --public-key <base64 raw 32-byte ed25519> [--signature pack.sig] [--json]

Exit 0 = signature valid and all file hashes match; 1 = invalid/missing/tampered; 2 = usage. modu pack validate still checks pack semantics separately; signature verification is about integrity.

Trust

The public key is operator configuration (env/secret), not embedded in the pack — a pack cannot vouch for itself. Rotation: publish the new public key with the new signed packs; old key only when the operator explicitly keeps it.

Roadmap

  • MESA Pro pack install should refuse unsigned packs when a pack public key is configured (next slice).
  • Optional: include the signer key id/kid in the envelope for rotation.
  • Optional: attach the verified public key/fingerprint to .modu/audit/pack.jsonl.

源文件 · mesa/docs/requirements/pack-signing.md