# Plan a government's air-gapped installation

For an agency team and its auditors. Aegis Core runs on the agency's own device with no connection to the internet or to qblackbit, for ever: it installs, updates and checks its licence from files carried in on physical media. This guide rehearses that whole cycle in a test installation before anything touches production.

> **Hand it to your agent:**
>
> The [government prompt](https://docs.qblackbit.com/prompts/government.md) briefs an agent that runs inside your isolated environment, or that works only from the documents and test data you give it.

## 1. The transfer procedure

Write it as a checklist for two people, one reading, one doing:

1. On the connected side, copy the release bundle (`aegis-core-<version>.aegisbundle`), the verifier (`aegis-verify-<version>-linux-x86_64`) and the first root (`1.root.json`) to write-protected media.
2. Receive the SHA-256 of the root, and of the bundle, by a **second route**: a letter, a call, the contract annex.
3. On a transfer station with no network: `sha256sum 1.root.json`, compare, then `aegis-verify <bundle> --trusted-root 1.root.json`, and compare the bundle's SHA-256 it prints. Exit status `0` means every check passed in both signature families, Ed25519 and ML-DSA-87.
4. Only a bundle that passed crosses to the protected network.
5. On the Aegis host: `aegis update import`, then `aegis update apply` with the health check `--health-command "{release}/bin/aegisd selftest"`. A failed check rolls back by itself.
6. After the soak period you set: `aegis update commit`.

The commands in full: [Signed updates and rollback](https://docs.qblackbit.com/concepts/updates.md#install-from-a-bundle).

Rehearse a rollback in the test installation (`aegis update rollback`, then `aegis update status`), and a crash in the middle of an update (`aegis update recover`).

## 2. Officers and dual control

- **Unseal by quorum.** Change the vault's unlock to Shamir shares with `POST /v1/sys/rekey` (a threshold and the officers): each officer holds one share, optionally protected by their own passphrase, and hands it in with `POST /v1/sys/unseal` (or `aegis remote unseal --share-file`) until the threshold is met. `GET /v1/sys/unseal` shows the progress; shares handed in are wiped if the threshold is not reached in time.
- **Dual control.** Destroying or exporting a key and changing access need a second person by default (`GET /v1/sys/access/policy`). Add what your rules require.
- **Break-glass.** Holders of the `emergency` role can act as administrators for a limited time, with a written reason and an alarm in the audit chain.

## 3. National rules

Choose the [policy pack](https://docs.qblackbit.com/concepts/algorithms.md#policy-packs) with your policy owner: `us-nist-ir8547`, `us-cnsa-2.0`, `de-bsi-tr02102`, `fr-anssi-hybrid` or `baseline`. Each rule cites its source and section. Activate it in the test installation (`POST /v1/policy/activate`) and give the network teams what it allows as protocol values (`GET /v1/policy/protocols`).

National algorithms (for example the Korean KpqC selections) run in sandboxed processes, only under their own country's profile and only where a citable standard exists; those without one run only in a laboratory deployment. A sovereign module of your own algorithms is (Planned).

## 4. Rehearse the operations

With test keys: create (`POST /v1/keys`), sign and verify, encapsulate (`POST /v1/tools/encapsulate`) and decapsulate (`POST /v1/keys/{name}/decapsulate`), encrypt and decrypt envelopes, rotate and re-wrap (`POST /v1/rewrap/jobs`), schedule a deletion and cancel it. Every one of them lands in the audit chain.

## 5. The evidence pack

| Evidence | Where it comes from | How an auditor checks it |
| --- | --- | --- |
| The audit chain | `GET /v1/audit/export`, `GET /v1/audit/checkpoint` | `aegis-verify audit --records … --checkpoint …`, offline |
| What was installed | The verified bundle, `aegis update status` | `aegis-verify` against the root received by the second route |
| What the software contains | The release's SBOM and CBOM (CycloneDX) and build provenance, in the bundle | Against the agency's own approved lists |
| What it may do | `GET /v1/sys/licence`, `GET /v1/policy` | The licence file's signatures; the pack's cited sources |

## 6. What Aegis never does

- It never connects to qblackbit: no telemetry, no licence check, no update check. A test proves the daemon opens no outbound connection with default settings.
- A licence that expires, a directive or an update never makes existing data unreadable: reading, decrypting, verifying and exporting are never gated.
- qblackbit can sign directives that warn, set a floor, or restrict new protection with an affected algorithm after a grace period. It cannot push anything, and it cannot stop a running system.

## Planned, not available yet

- Production release signing with roots made at a key ceremony: (Planned). The ceremony has not been held; until then, verify against the root qblackbit gives you and confirm its digest by a second route.
- The trusted root compiled into `aegis-verify`: (Planned).
- Root keys held in an HSM or a TPM: (Planned).
- Aegis Appliance (a qblackbit device), licences bound to a device's TPM, and a signed desktop console for post-quantum-only access: (Planned).
- Optional online update checks: (Planned), and never required.
