Skip to content

A mod can move to a new author key (key-handover.json), so each mod can have its own - #458

Open
AwsomeFox wants to merge 4 commits into
catalog/auto-updatefrom
catalog/key-handover
Open

AwsomeFox wants to merge 4 commits into
catalog/auto-updatefrom
catalog/key-handover

Conversation

@AwsomeFox

@AwsomeFox AwsomeFox commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Lets a mod move to a new author key without owners removing it, so each mod (starting with Open-HMG's) can have its own key instead of the shared 7251ce71-….

How it works

  • The old key signs a handover: key-handover.json at the top of the mod folder holds {"format": 1, "steps": [{"id", "from", "from_key", "to", "signature"}]}. Each signature is the leaving key's ECDSA over HMG-API key handover / id / from / to. Signing handover <mod> <old key> <new key.pub> adds a step, and Signing handover-check <mod> <installed uuid> verifies a chain.
  • The engine (Packages.check) still refuses an update signed with another key, unless the steps lead from the installed key to the release's key, each signed by the key it leaves and naming this mod id. It then says the key moved, and from then on only the new key updates the mod. Steps chain (old → new → newer), so a car that skipped a release follows. The file is an ordinary file of the mod, so the new key's signature covers it too.
    • Release updates pass the installed key as expected, and that is allowed when the handover checks.
    • Automatic catalogue staging accepts an entry whose "key_from" names the installed key. That field is a hint only: the install checks the handover itself.
  • The catalogue:
    • catalog.py add takes the new key when the zip hands the old one over, lists it in maps/authors.json and records "key_from".
    • check --base allows a key change only with "key_from".
    • check --download verifies the zip's handover from every key in "key_from".
    • A key change is never an auto-merged bump, so a maintainer merges it. The hourly updates job (Catalogue: open each listed mod's new release as a bump PR, hourly #457) opens it like any new release.
  • Nobody else can take a mod over: a handover only counts when the installed key signed it, and it names one mod id.

Docs

  • The mod reference has a new section, "Moving to a new key".
  • docs/mod-repos.md gains "Later: each mod its own key". It is the plan for wireless-carplay-aa, adb, adbd and nemesis-shortcut: VysseCodes makes each key, commits the handover, swaps MOD_KEY and raises "hmgapi" to the release that reads handovers. Phone Turn-by-Turn starts with its own key.
  • Also a CHANGELOG line and a mkmodpkg.sh note.

The catch: a head unit on an older HMG-API refuses the new key's update, whatever the file says. Each moved mod's "hmgapi" floor names the release that first reads handovers, so the catalogue tells those owners to update HMG-API first.

Tested (off-car)

  • signing-test.sh (+14 checks): a handover, the old key handing over twice refused, a chain and from its middle, a forged step (another key's signature, claiming the real key) refused, another mod's handover refused.
  • packages-test.sh (+10 checks): a new key without a handover refused, a handover from a key that isn't the installed one refused, a handed-over install (the release-updates path), the old key refused after the move, and the new key's next release.
  • tools/catalog-test.sh (+13 checks): add with and without a handover, "key_from" and the new author listed, check --base with and without "key_from", check --download verifying the handover and refusing a zip without one.
  • Unchanged and passing: core/runtime/catalog-test.sh, engine-test.sh, safety-test.sh, homewifi-test.sh, tools/sdk-test.sh.
  • Not on the car yet.

On #457 (catalog/auto-update), which is on #423.

🤖 Generated with Claude Code

An update signed with another key than the installed mod's is still
refused, unless the mod carries key-handover.json: steps, each signed by
the key it leaves, that lead from the installed key to the release's.
Signing handover adds a step, handover-check verifies a chain. The engine
then installs it, says the key moved, and only the new key updates it
from then on; automatic staging accepts a catalogue entry whose
"key_from" names the installed key. catalog.py add takes the new key
from such a zip (recording "key_from"), check --base allows the change
only with it, and check --download verifies the handover. A key change
is never an auto-merged bump.

This is what lets each Open-HMG mod have its own key (docs/mod-repos.md).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@VysseCodes VysseCodes left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid. Each handover step must be signed by the key it leaves, the old key can't come back after a move, and a key change is never auto-merged. The mod-repos plan fits projection-tbt starting with its own key (asked for in #428).

Merge order: after #457, before #424.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AwsomeFox and others added 2 commits December 2, 2026 11:22
…dover

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e release)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants