defend-audit key-rotate retires the audit subsystem’s active Ed25519 signing key and makes a new one. From then on, every new daily manifest and evidence pack is signed with the new key, and every earlier one still verifies against the key it was signed with.
You rarely need it, but when you do, you need it. Reasons to rotate:
Where to run it: open Device → Terminal in the web interface, and run it with
sudo.
sudo defend-audit key-rotate [--json]
--json prints the result as JSON, for scripts. There are no other options.
$ sudo defend-audit key-rotate
rotated: retired ed25519:<old key ID>, active is now ed25519:<new key ID> (at 2026-05-16T18:00:00Z)
It prints the retired key, the new active key, and the time of the rotation, in UTC. A key ID is ed25519: followed by 32 hexadecimal characters, taken from the key’s SHA-256 hash. That time is also recorded in the key ring, as the retired key’s retired_at and the new key’s valid_from.
retired_at time. Its public key stays in the ring, so earlier evidence can still be verified./opt/data/auditor/keys/manifest.key (mode 0400, root only), replacing the old one, and a copy is written to the boot partition at /boot/defend-o-tron-auditor.key.bak./opt/data/auditor/keys/manifest.pubring.json, with valid_from set to now.Each rotation adds one entry to the key ring. A device that rotates every year for ten years has ten entries, and all of them are needed to verify evidence from those ten years.
defend-audit verify reads the key named in a document’s signature block, finds that key in the ring, and checks against it. It does not matter whether the key is active or long retired, only that it is in the ring. Because entries are never removed, rotation does not invalidate past evidence.
This is the point of the key ring: you can rotate freely without losing the ability to verify earlier evidence.
defend-audit verify handles it without extra steps.| Exit code | Meaning |
|---|---|
0 |
Rotated. The new active key is printed. |
1 |
The rotation failed, for example because audit.conf or the current key could not be read. The reason is printed. |
2 |
Wrong usage. |