# Signed updates, rollback and the licence

Aegis Core never contacts qblackbit: not to install, not to update, not to check a licence. Everything arrives as files you carry in and verify yourself.

## Signed bundles

A release is one file, `aegis-core-<version>.aegisbundle`: the binaries, the packages, the container image, the software and cryptography bills of materials (CycloneDX), the build provenance, and the signed metadata that covers every byte. The metadata follows The Update Framework, with separate roles that each need a threshold of signatures **in both families**, Ed25519 and ML-DSA-87. A damaged, swapped, older or mixed bundle is refused, with the reason.

What a bundle cannot prove is which root to start from. That is why the SHA-256 of the first root (`1.root.json`) reaches you by a second route, such as a letter, a call or the contract annex, and you compare it before trusting anything.

> **Planned:**
>
> Releases are signed with production roots made at a key ceremony, which has not been held yet. The trusted root compiled into `aegis-verify`, and an optional online check that fetches updates for you, are also Planned. Installing from a file works today.

## Install from a bundle

On a transfer station (any Linux x86-64 machine, no network needed):

```bash
sha256sum 1.root.json        # compare with the value received by the second route
./aegis-verify-0.13.0-linux-x86_64 aegis-core-0.13.0.aegisbundle --trusted-root 1.root.json
```

`aegis-verify` is one static binary with no network code. It checks the archive, the root chain, the timestamp, snapshot and targets metadata in both signature families, and every file, then prints the bundle's SHA-256 to compare with the value you were given. `--extract <file> --to <path>` writes one file of the bundle, such as the deb or rpm package, only after the whole bundle has verified.

On the Aegis host, the installation keeps releases side by side and switches between them:

```bash
aegis update import aegis-core-0.13.0.aegisbundle --root /var/lib/aegis/install \
  --trusted-root 1.root.json --trust-anchor-file /etc/aegis/trusted-root.sha256
aegis update apply 0.13.0 --root /var/lib/aegis/install \
  --trust-anchor-file /etc/aegis/trusted-root.sha256 \
  --health-command "{release}/bin/aegisd selftest"
aegis update commit --root /var/lib/aegis/install   # after a soak period that suits you
```

`apply` checks the host first, takes a verified backup when asked (`--backup-server`), switches atomically, runs the health check, and goes back to the previous release by itself if the check fails. Until you `commit`, a rollback loses nothing. A journal lets `aegis update recover` finish or reverse an update cut short by a crash or a power cut. The console's Updates screen does the same from a browser.

## Roll back

```bash
aegis update rollback --root /var/lib/aegis/install \
  --trust-anchor-file /etc/aegis/trusted-root.sha256 \
  --health-command "{release}/bin/aegisd selftest"
aegis update status --root /var/lib/aegis/install
```

You can roll back to any release still on disk at or above qblackbit's **signed floor**. A signed upgrade graph names the releases you must pass through and the changes that cannot be undone, and both are enforced offline before every switch.

## Directives: what qblackbit can and cannot do

qblackbit can send an **advisory bundle** of signed directives: a new floor, a revoked release or module, or a **forced minimum** version. A forced minimum never stops anything: before its grace date the console warns; after it, only **new** protection with the affected algorithm is refused until you install the fixed release. qblackbit can require, warn and restrict. It cannot push, and it cannot stop a running system.

## The offline licence

The licence is one signed file (Ed25519 and ML-DSA-87), checked on the host against an issuer compiled into the daemon. It lists the edition, modules and limits (`GET /v1/sys/licence`; install with `POST /v1/sys/licence`). Without a licence, or after one expires, Aegis runs the community modules for new protection, and **every existing key stays readable, decryptable, verifiable and exportable**: the routes that are never gated are listed in `GET /v1/sys/licence`.

The full procedure for a machine with no network is in the [government guide](https://docs.qblackbit.com/guides/government.md).

Next: [Quantum-safe transport](https://docs.qblackbit.com/concepts/transport.md).
