# qblackbit docs: Aegis (every page in one file) > Developer documentation for Aegis by qblackbit: post-quantum keys, signatures and key exchange through Aegis Cloud and Aegis Core, with quickstarts, migration guides, the API reference, llms.txt and briefs for your own AI agent. Generated from the same sources as https://docs.qblackbit.com. Index: https://docs.qblackbit.com/llms.txt. Planned items are marked Planned. --- Source: https://docs.qblackbit.com/ # Post-quantum keys, signatures and key exchange through one API Start free on Aegis Cloud with ML-DSA signatures and the X25519 + ML-KEM-768 hybrid, or run Aegis Core on your own machines, air-gapped if you need it. These docs describe what exists today; anything not built yet says Planned. - [Quickstart: Aegis Cloud](https://docs.qblackbit.com/quickstart/cloud.md): Sign up, make an API key, then create a key, sign, verify and encapsulate with curl. - [Quickstart: Aegis Core](https://docs.qblackbit.com/quickstart/core.md): The aegis command on your machine, then a running Core over TLS with hybrid key exchange. - [Migration guides](https://docs.qblackbit.com/guides/index.md): A personal project, a small business, a bank, a blockchain project and a government, with steps that use only what exists. - [Copy prompts for your agent](https://docs.qblackbit.com/prompts/index.md): Self-contained briefs your own AI agent follows to do the migration through Aegis, with the safety rules built in. - [API reference](https://docs.qblackbit.com/api/index.md): The Cloud API and every Aegis Core operation, generated from their OpenAPI documents. - [llms.txt for agents](https://docs.qblackbit.com/agents.md): An index of every page as plain Markdown, and the whole site in one file for your agent to read. --- Source: https://docs.qblackbit.com/overview/ # What Aegis is Aegis is qblackbit's platform for moving cryptography to post-quantum standards. It holds keys and uses them to sign, verify, encapsulate and encrypt with the NIST post-quantum algorithms and with published hybrids. It writes every action to a hash-chained audit record, and every ciphertext and signature it makes records the algorithm and specification revision that made it, so data can be moved again when standards change. The same engine runs in two places. | | Aegis Cloud | Aegis Core | | --- | --- | --- | | For | Developers, start-ups, small and mid-sized businesses | Governments, central banks, banks, telecoms, critical infrastructure | | Runs | In qblackbit's cloud, at `aegis.qblackbit.com` | On the customer's own machines, air-gapped if required, with no connection to qblackbit | | Editions | Free (self-serve) and Pro (by request from the app) | Enterprise (by contract) | | You use it through | The web app and an HTTPS API called with API keys | A REST and gRPC API, the `aegis` command and a web console | | Keys | In Aegis Core, each organisation in its own tenant under its own key-encryption key | In the customer's own vault, unsealed by their officers | ## What you can do today **On Aegis Cloud** you sign up with Google or an email address, make API keys for your programs and agents, and then create keys, sign, verify, encapsulate and hash through the [Cloud API](https://docs.qblackbit.com/api/cloud.md). Free includes 10,000 operations a month with ML-DSA-65 signatures and the X25519 + ML-KEM-768 hybrid; Pro adds every NIST standard parameter set the cloud offers and a much larger allowance. Start with the [cloud quickstart](https://docs.qblackbit.com/quickstart/cloud.md). **On Aegis Core** you run the whole vault: keys with versions, states and dates; signatures, envelopes, key encapsulation and HPKE; PKCS #8, X.509, CMS, JOSE and COSE; signed policy packs; the audit chain; dual control; tenants; signed updates with rollback; and an offline licence. Its [API](https://docs.qblackbit.com/api/core/index.md) has 126 operations. Start with the [Core quickstart](https://docs.qblackbit.com/quickstart/core.md). What is built and what is planned, item by item: [Built and planned](https://docs.qblackbit.com/overview/status.md). ## The algorithms - **ML-KEM** (FIPS 203) establishes shared secrets. **ML-DSA** (FIPS 204) and **SLH-DSA** (FIPS 205) sign. NIST published all three in August 2024. - **Hybrids** pair a post-quantum algorithm with a classical one, so the result holds while either holds: X25519 + ML-KEM-768 for key establishment, composite ML-DSA for signatures. - **Classical algorithms** (RSA, ECDSA, Ed25519, X25519) stay available, flagged as not quantum-safe, for hybrids, for interoperability and to read old data. - Every algorithm carries a **maturity label**. Candidates, research and broken algorithms run only in a deployment declared a laboratory, and every result says so. More in [Post-quantum and hybrids](https://docs.qblackbit.com/concepts/post-quantum.md) and [Algorithms and policy packs](https://docs.qblackbit.com/concepts/algorithms.md). ## What Aegis does not claim - **Not quantum-proof.** No product can promise that. Aegis uses standardised algorithms designed to resist known quantum attacks, paired with classical ones where a hybrid is chosen. - **No certification.** None is claimed for Aegis or for the cloud service. Until a certificate names Aegis, none should be assumed. - **No published audit or penetration test.** None has taken place yet. - **No named customers.** - **No secret algorithms.** Every algorithm and every combination comes from a published document. - **Not quantum hardware.** Aegis runs on ordinary servers and networks. The security limits Aegis states about itself are on [Security and trust](https://docs.qblackbit.com/security.md). ## Where to go next - Writing code: [Quickstart: Aegis Cloud](https://docs.qblackbit.com/quickstart/cloud.md), then the [Cloud API](https://docs.qblackbit.com/api/cloud.md). - Working with an AI agent: the [prompt library](https://docs.qblackbit.com/prompts/index.md) and [llms.txt](https://docs.qblackbit.com/agents.md). - Planning a migration: the [migration guides](https://docs.qblackbit.com/guides/index.md). - Running Aegis yourself: [Quickstart: Aegis Core](https://docs.qblackbit.com/quickstart/core.md). --- Source: https://docs.qblackbit.com/overview/status # Built and planned What exists today and what does not, in one place. **Available** means you can use it now. **Planned** means qblackbit intends to build it; it is not available and no date is promised here. Every other page links here instead of repeating the list. Checked on 4 December 2026 against Aegis Core 0.13.0, the Aegis Cloud service at `aegis.qblackbit.com`, and qblackbit's product plan. ## Aegis Cloud (Free and Pro) | Feature | Status | Notes | | --- | --- | --- | | Sign-up with Google, or an email address and a password | (Available) | Passwords of 12 characters or more; an email sign-up is confirmed by a link | | Authenticator app (TOTP) with ten recovery codes | (Available) | Passkeys are not offered at launch | | Organisations, members, roles (owner, admin, developer, auditor), invitations | (Available) | | | API keys with the `developer` or `auditor` role, shown once, revocable | (Available) | A key never acts above the role of the member who made it | | API keys that expire, or are scoped below a role | (Planned) | Revoke a key when you no longer need it | | Create keys, list them, read a key and its public key | (Available) | [Cloud API](https://docs.qblackbit.com/api/cloud.md) | | Sign, verify, encapsulate, hash | (Available) | Metered | | Decapsulate, encrypt and decrypt through the cloud API | (Not offered) | Use [Aegis Core](https://docs.qblackbit.com/quickstart/core.md) where the private key must be used | | Export a key wrapped to your own hybrid post-quantum key | (Not available yet) | The route exists for admins in the app; exporting a cloud key does not complete in the current release | | Free: 10,000 operations a month, 60 requests a minute, 10 keys, `ml-dsa-65` and `x25519-ml-kem-768` | (Available) | Reading and usage are never counted or blocked | | Pro: 1,000,000 operations a month, 1,200 requests a minute, 1,000 keys, 15 parameter sets, a prepaid balance | (Available) | By request from the app; qblackbit then gets in touch and switches the plan | | Card payment, monthly or yearly Pro billing, prepaid credits | (Planned) | | | Composite ML-DSA on Free and Pro; more SLH-DSA sets on Pro | (Planned) | | | Free shows every Pro feature, locked, with its limit | (Planned) | | | Data held in the European Union | (Available) | `GET /api/config` states where data is held | | A home region chosen at sign-up | (Planned) | | | `llms.txt` on the cloud host | (Available) | `https://aegis.qblackbit.com/llms.txt` | | The `aegis-mcp` server (MCP over standard input and output, or HTTP on a loopback address) | (Not available yet) | Built; a public download is Planned. See [AI agents](https://docs.qblackbit.com/agents.md) | | A hosted MCP server with sign-in | (Planned) | | ## Aegis Core (Enterprise) | Feature | Status | Notes | | --- | --- | --- | | The engine: ML-KEM, ML-DSA, SLH-DSA, hybrids, composite ML-DSA, HPKE, symmetric and classical algorithms, checked against official test vectors where they exist | (Available) | [Algorithms](https://docs.qblackbit.com/concepts/algorithms.md) | | Candidate, research and national algorithms in sandboxed processes, in laboratories or under their country's profile | (Available) | Never selectable by a production policy | | The vault: versions, rotation, states and dates, import, export rules, scheduled deletion, crypto-shredding | (Available) | [Vault and keys](https://docs.qblackbit.com/concepts/vault.md) | | Self-describing envelopes and signatures, bulk re-wrap jobs | (Available) | | | Unseal by passphrase or by officers' Shamir shares; rekey | (Available) | | | Tenants with their own key-encryption keys | (Available) | | | Audit chain with Ed25519 and ML-DSA-87 checkpoints, checked offline by `aegis-verify` | (Available) | [Audit chain](https://docs.qblackbit.com/concepts/audit.md) | | Roles, custom roles, scoped and expiring tokens, mutual TLS, OpenID Connect sign-in | (Available) | [Dual control](https://docs.qblackbit.com/concepts/dual-control.md) | | Dual control and break-glass | (Available) | | | SAML sign-in | (Planned) | | | Policy packs: baseline, NIST IR 8547, CNSA 2.0, BSI TR-02102-1, ANSSI; signed imports and advisories | (Available) | | | Asking for a policy name (such as `qbb-hybrid-1`) instead of an algorithm; pack defaults per purpose | (Planned) | | | Encodings: PKCS #8, SPKI, X.509, PKCS #10, CMS, JOSE, COSE | (Available) | | | TLS 1.3 with hybrid key exchange only on the API; an internal ML-DSA-87 authority | (Available) | [Quantum-safe transport](https://docs.qblackbit.com/concepts/transport.md) | | Signed update bundles, offline verification, side-by-side installs, health-checked apply, rollback, signed directives | (Available) | [Signed updates](https://docs.qblackbit.com/concepts/updates.md) | | The offline licence, signed with Ed25519 and ML-DSA-87 | (Available) | An expired licence never stops reading or exporting | | Packages: static binaries, deb, rpm, a Compose file, a Helm chart | (Available) | Linux x86-64 | | Releases signed with the production roots | (Planned) | Made at a key ceremony that has not been held yet | | Public downloads of releases and the verifier | (Planned) | Enterprise releases are delivered by qblackbit as signed bundles | | Optional online update check and fetch | (Planned) | Offline from a file works today | | The trusted root compiled into `aegis-verify` | (Planned) | | | Root keys in an HSM or TPM, auto-unseal | (Planned) | | | Clustering and replication | (Planned) | One daemon holds one vault today | | PKCS#11, KMIP, JCA and OpenSSL provider adapters | (Planned) | | | The daemon split into separate processes | (Planned) | One process today; see [Security and trust](https://docs.qblackbit.com/security.md) | | A customer's own sovereign algorithm module | (Planned) | | | Aegis Appliance (a qblackbit device), licences bound to a device, a desktop console | (Planned) | | | Demo instance at `aegis-core.qblackbit.com` | (Available) | Runs Aegis Core 0.12.0 on 4 December 2026; `GET /v1/sys/info` tells the release | ## Products built on Core | Product | What it will do | Status | | --- | --- | --- | | Discover | Find keys, certificates and protocols across networks, code and key stores | (Planned) | | Command | Rank findings, plan changes, approve them and keep the evidence | (Planned) | | Gate | Quantum-safe HTTPS in front of existing sites and APIs | (Planned) | | Link and Mesh | Post-quantum tunnels and service meshes | (Planned) | | PKI, Sign and ID | Certificate authorities, signing services and identities | (Planned) | | Data and Transfer | Data-at-rest encryption and file exchange | (Planned) | ## Developer tools | Tool | Status | Notes | | --- | --- | --- | | HTTPS API (Cloud); REST and gRPC API (Core); OpenAPI documents | (Available) | [API reference](https://docs.qblackbit.com/api/index.md) | | The `aegis` command (Linux x86-64) | (Available) | In the Enterprise release bundle only; a public download is Planned | | SDKs for TypeScript, Python, Go, Java, .NET, Rust and C | (Planned) | [SDKs and libraries](https://docs.qblackbit.com/sdks.md) | | These docs, `llms.txt`, `llms-full.txt` and the prompt library | (Available) | | --- Source: https://docs.qblackbit.com/quickstart/cloud # Quickstart: Aegis Cloud From sign-up to a verified post-quantum signature in a few minutes, with nothing to install beyond `curl`. Everything on this page works on the Free plan. ## 1. Sign up Open [aegis.qblackbit.com](https://aegis.qblackbit.com/sign-up) and sign up with Google, or with an email address and a password of at least 12 characters. An email sign-up is confirmed by a link sent to that address; Google is the quickest path. Your first organisation is made for you, on the Free plan. Then turn on the authenticator app in **Settings**. The account that makes API keys deserves a second factor. > **The Free plan:** > > 10,000 metered operations a month, 60 requests a minute and up to 10 keys, with `ml-dsa-65` for signatures, `x25519-ml-kem-768` for key encapsulation, and the hashes `sha2-256`, `sha2-384`, `sha2-512`, `sha3-256` and `sha3-512`. Creating a key, signing, verifying, encapsulating and hashing are metered; reading keys and usage are never counted or blocked. The service publishes every plan's limits at [`GET /api/config`](https://docs.qblackbit.com/api/cloud.md#cloud-config). ## 2. Make an API key In the app, open **API keys**, give the key a label (for example `quickstart`), choose the role **developer** and create it. The key starts with `agk_` and is shown once. Put it in your shell's environment, never in a file you commit: ```bash export AEGIS_URL=https://aegis.qblackbit.com read -rs AEGIS_API_KEY && export AEGIS_API_KEY # paste the key, press Enter ``` A key acts for the member who made it, never above that member's role, and stops working if the member leaves the organisation. `developer` keys create keys and run operations; `auditor` keys only read. Keys do not expire on their own: revoke this one under **API keys** when you are done. Expiring keys are (Planned). Check that it works: ```bash curl -sS "$AEGIS_URL/api/v1/algorithms" -H "Authorization: Bearer $AEGIS_API_KEY" ``` ```json {"plan":"free","algorithms":["ml-dsa-65","x25519-ml-kem-768"],"hashes":["sha2-256","sha2-384","sha2-512","sha3-256","sha3-512"],"export_kems":["hpke-mlkem768-x25519","hpke-mlkem1024-p384"]} ``` ## 3. Make a signing key ```bash curl -sS -X POST "$AEGIS_URL/api/v1/keys" \ -H "Authorization: Bearer $AEGIS_API_KEY" -H "Content-Type: application/json" \ -d '{"name": "quickstart-signing", "algorithm": "ml-dsa-65"}' ``` The answer is `201` with `{"name":"quickstart-signing","algorithm":"ml-dsa-65","version":1}`. The key pair lives in your organisation's tenant of Aegis Core, under your organisation's own key-encryption key. The private key stays there: you send messages to sign and receive signatures. ## 4. Sign and verify Messages and signatures travel as standard base64. This script signs a message, verifies it, then verifies a changed message, which must fail: curl and jq: ```bash #!/usr/bin/env bash # Sign and verify with an ML-DSA-65 key in Aegis Cloud, with curl and jq. # Set AEGIS_URL (https://aegis.qblackbit.com) and AEGIS_API_KEY (a developer key) in the environment first. set -euo pipefail : "${AEGIS_URL:=https://aegis.qblackbit.com}" : "${AEGIS_API_KEY:?set AEGIS_API_KEY to a developer key; never paste it into a file you commit}" NAME=${AEGIS_KEY_NAME:-quickstart-signing} aegis() { # aegis METHOD PATH [JSON]: one call; prints the body, fails on an HTTP error curl -sS --fail-with-body -X "$1" "$AEGIS_URL$2" \ -H "Authorization: Bearer $AEGIS_API_KEY" -H "Content-Type: application/json" ${3:+-d "$3"} } aegis GET /api/v1/algorithms | jq -c '{plan, algorithms}' # Make the key once; a second run answers 409 "a key of that name exists", which is fine. aegis POST /api/v1/keys "{\"name\": \"$NAME\", \"algorithm\": \"ml-dsa-65\"}" || true echo MESSAGE=$(printf '%s' 'hello from my first post-quantum signature' | base64 | tr -d '\n') SIGNED=$(aegis POST "/api/v1/keys/$NAME/sign" "{\"message\": \"$MESSAGE\"}") SIGNATURE=$(jq -r .signature <<<"$SIGNED") VERSION=$(jq -r .version <<<"$SIGNED") echo "signature: $(printf '%s' "$SIGNATURE" | base64 -d | wc -c | tr -d ' ') bytes, key version $VERSION" TAMPERED=$(printf '%s' 'hello from my first post-quantum signature!' | base64 | tr -d '\n') for CHECK in "original $MESSAGE" "tampered $TAMPERED"; do set -- $CHECK VALID=$(aegis POST "/api/v1/keys/$NAME/verify" \ "{\"message\": \"$2\", \"signature\": \"$SIGNATURE\", \"version\": $VERSION}" | jq -r .valid) echo "$1: valid = $VALID" done aegis GET /api/v1/usage | jq -r '"operations this month: \(.used.included) of \(.included)"' ``` Python: ```python #!/usr/bin/env python3 """Sign and verify with an ML-DSA-65 key in Aegis Cloud, with Python's standard library only. Set AEGIS_URL (https://aegis.qblackbit.com) and AEGIS_API_KEY (a developer key) in the environment first. """ import base64 import json import os import sys import urllib.error import urllib.request BASE = os.environ.get("AEGIS_URL", "https://aegis.qblackbit.com").rstrip("/") API_KEY = os.environ.get("AEGIS_API_KEY") or sys.exit("set AEGIS_API_KEY to a developer key") NAME = os.environ.get("AEGIS_KEY_NAME", "quickstart-signing") def call(method, path, body=None): """One call to the cloud API: returns (HTTP status, decoded JSON).""" data = json.dumps(body).encode() if body is not None else None request = urllib.request.Request(BASE + path, data=data, method=method) request.add_header("Authorization", "Bearer " + API_KEY) if data is not None: request.add_header("Content-Type", "application/json") try: with urllib.request.urlopen(request, timeout=30) as response: return response.status, json.load(response) except urllib.error.HTTPError as error: return error.code, json.load(error) def must(status, answer, *expected): if status not in expected: sys.exit(f"{status} {answer.get('code')}: {answer.get('error')}") return answer def b64(raw): return base64.b64encode(raw).decode() plan = must(*call("GET", "/api/v1/algorithms"), 200) print("plan:", plan["plan"], "| algorithms:", ", ".join(plan["algorithms"])) status, made = call("POST", "/api/v1/keys", {"name": NAME, "algorithm": "ml-dsa-65"}) print("key:", NAME, "made" if status == 201 else "already exists" if status == 409 else must(status, made)) message = b"hello from my first post-quantum signature" signed = must(*call("POST", f"/api/v1/keys/{NAME}/sign", {"message": b64(message)}), 200) print("signature:", len(base64.b64decode(signed["signature"])), "bytes, key version", signed["version"]) for label, candidate in (("original", message), ("tampered", message + b"!")): body = {"message": b64(candidate), "signature": signed["signature"], "version": signed["version"]} checked = must(*call("POST", f"/api/v1/keys/{NAME}/verify", body), 200) print(f"{label}: valid = {checked['valid']}") usage = must(*call("GET", "/api/v1/usage"), 200) print("operations this month:", usage["used"]["included"], "of", usage["included"]) ``` Node.js: ```js // Sign and verify with an ML-DSA-65 key in Aegis Cloud, with Node's built-in fetch (Node 18 or later). // Set AEGIS_URL (https://aegis.qblackbit.com) and AEGIS_API_KEY (a developer key) in the environment first. const base = (process.env.AEGIS_URL ?? 'https://aegis.qblackbit.com').replace(/\/$/, '') const apiKey = process.env.AEGIS_API_KEY const name = process.env.AEGIS_KEY_NAME ?? 'quickstart-signing' if (!apiKey) throw new Error('set AEGIS_API_KEY to a developer key') /** One call to the cloud API; throws on an unexpected status with the API's error code. */ async function call(method, path, body, ...expected) { const response = await fetch(base + path, { method, headers: { authorization: `Bearer ${apiKey}`, ...(body ? { 'content-type': 'application/json' } : {}) }, body: body ? JSON.stringify(body) : undefined }) const answer = await response.json() if (!(expected.length ? expected : [200]).includes(response.status)) { throw new Error(`${response.status} ${answer.code}: ${answer.error}`) } return { status: response.status, answer } } const b64 = (text) => Buffer.from(text).toString('base64') const plan = (await call('GET', '/api/v1/algorithms')).answer console.log(`plan: ${plan.plan} | algorithms: ${plan.algorithms.join(', ')}`) const made = await call('POST', '/api/v1/keys', { name, algorithm: 'ml-dsa-65' }, 201, 409) console.log(`key: ${name} ${made.status === 201 ? 'made' : 'already exists'}`) const message = 'hello from my first post-quantum signature' const signed = (await call('POST', `/api/v1/keys/${name}/sign`, { message: b64(message) })).answer console.log(`signature: ${Buffer.from(signed.signature, 'base64').length} bytes, key version ${signed.version}`) for (const [label, candidate] of [['original', message], ['tampered', message + '!']]) { const body = { message: b64(candidate), signature: signed.signature, version: signed.version } const checked = (await call('POST', `/api/v1/keys/${name}/verify`, body)).answer console.log(`${label}: valid = ${checked.valid}`) } const usage = (await call('GET', '/api/v1/usage')).answer console.log(`operations this month: ${usage.used.included} of ${usage.included}`) ``` Go: ```go // Sign and verify with an ML-DSA-65 key in Aegis Cloud, with Go's standard library only. // Set AEGIS_URL (https://aegis.qblackbit.com) and AEGIS_API_KEY (a developer key) in the environment first. // // go run quickstart.go package main import ( "bytes" "encoding/base64" "encoding/json" "fmt" "log" "net/http" "os" "strings" "time" ) var ( base = strings.TrimRight(envOr("AEGIS_URL", "https://aegis.qblackbit.com"), "/") apiKey = os.Getenv("AEGIS_API_KEY") name = envOr("AEGIS_KEY_NAME", "quickstart-signing") client = &http.Client{Timeout: 30 * time.Second} ) func envOr(key, fallback string) string { if value := os.Getenv(key); value != "" { return value } return fallback } // call makes one request and decodes the JSON answer into out; it returns the HTTP status. func call(method, path string, body any, out any) int { var reader *bytes.Reader if body != nil { encoded, err := json.Marshal(body) if err != nil { log.Fatal(err) } reader = bytes.NewReader(encoded) } else { reader = bytes.NewReader(nil) } request, err := http.NewRequest(method, base+path, reader) if err != nil { log.Fatal(err) } request.Header.Set("Authorization", "Bearer "+apiKey) if body != nil { request.Header.Set("Content-Type", "application/json") } response, err := client.Do(request) if err != nil { log.Fatal(err) } defer response.Body.Close() if err := json.NewDecoder(response.Body).Decode(out); err != nil { log.Fatal(err) } return response.StatusCode } type apiError struct { Error string `json:"error"` Code string `json:"code"` } func main() { if apiKey == "" { log.Fatal("set AEGIS_API_KEY to a developer key") } var plan struct { Plan string `json:"plan"` Algorithms []string `json:"algorithms"` } if status := call("GET", "/api/v1/algorithms", nil, &plan); status != 200 { log.Fatalf("algorithms: HTTP %d", status) } fmt.Printf("plan: %s | algorithms: %s\n", plan.Plan, strings.Join(plan.Algorithms, ", ")) var made apiError switch status := call("POST", "/api/v1/keys", map[string]string{"name": name, "algorithm": "ml-dsa-65"}, &made); status { case 201: fmt.Println("key:", name, "made") case 409: fmt.Println("key:", name, "already exists") default: log.Fatalf("create: %d %s: %s", status, made.Code, made.Error) } message := []byte("hello from my first post-quantum signature") var signed struct { Signature string `json:"signature"` Version int `json:"version"` } if status := call("POST", "/api/v1/keys/"+name+"/sign", map[string]string{"message": base64.StdEncoding.EncodeToString(message)}, &signed); status != 200 { log.Fatalf("sign: HTTP %d", status) } raw, _ := base64.StdEncoding.DecodeString(signed.Signature) fmt.Printf("signature: %d bytes, key version %d\n", len(raw), signed.Version) for _, check := range []struct { label string message []byte }{{"original", message}, {"tampered", append(append([]byte{}, message...), '!')}} { var checked struct { Valid bool `json:"valid"` } body := map[string]any{"message": base64.StdEncoding.EncodeToString(check.message), "signature": signed.Signature, "version": signed.Version} if status := call("POST", "/api/v1/keys/"+name+"/verify", body, &checked); status != 200 { log.Fatalf("verify: HTTP %d", status) } fmt.Printf("%s: valid = %t\n", check.label, checked.Valid) } var usage struct { Included int `json:"included"` Used struct { Included int `json:"included"` } `json:"used"` } call("GET", "/api/v1/usage", nil, &usage) fmt.Printf("operations this month: %d of %d\n", usage.Used.Included, usage.Included) } ``` The output ends like this: ```text signature: 3309 bytes, key version 1 original: valid = true tampered: valid = false operations this month: 4 of 10000 ``` An ML-DSA-65 signature is 3,309 bytes and its public key 1,952 bytes (FIPS 204). Fetch the public key with `GET /api/v1/keys/quickstart-signing/public` to give it to whoever verifies your signatures elsewhere. The service checks every signature it makes before it answers. The examples are tested against a stand-in for the API on every change to these docs. ## 5. Encapsulate to a public key Key encapsulation gives you a fresh shared secret and a ciphertext that carries it to the holder of a private key. The holder recovers the same secret by decapsulating: ```bash curl -sS -X POST "$AEGIS_URL/api/v1/encapsulate" \ -H "Authorization: Bearer $AEGIS_API_KEY" -H "Content-Type: application/json" \ -d "{\"algorithm\": \"x25519-ml-kem-768\", \"public_key\": \"$RECIPIENT_PUBLIC_KEY\"}" ``` The answer holds `ciphertext` (send it) and `shared_secret` (treat it as a key: never log it). `RECIPIENT_PUBLIC_KEY` is the recipient's public key in base64, for the same algorithm. > **Decapsulation is not in the cloud API:** > > The cloud API encapsulates but does not decapsulate, and exporting a key made in the cloud is not available yet. So the recipient should make the KEM key pair where they will decapsulate, for example in [Aegis Core](https://docs.qblackbit.com/quickstart/core.md) (`POST /v1/keys/{name}/decapsulate`), and give you only the public key. > **Which KEM to choose:** > > `x25519-ml-kem-768` (Free and Pro) is the hybrid group of TLS 1.3. In TLS the handshake transcript binds it; outside TLS, derive your key with HKDF over the shared secret with the ciphertext and the recipient's public key in the `info`, as HPKE does. On Pro, `ml-kem-768` and `ml-kem-1024` (FIPS 203) are complete KEMs on their own. More in [Post-quantum and hybrids](https://docs.qblackbit.com/concepts/post-quantum.md#kems-are-not-encryption). ## 6. Watch your usage ```bash curl -sS "$AEGIS_URL/api/v1/usage" -H "Authorization: Bearer $AEGIS_API_KEY" ``` ```json {"month":"2026-12","plan":"free","included":10000,"used":{"included":4,"from_balance":0},"remaining":9996,"balance":0} ``` When the month's operations are used up, metered calls answer `403` with the code `quota`; reading keys and usage keep working, and the allowance renews at the start of the next calendar month (UTC). On Pro, operations beyond the allowance are drawn from a prepaid balance. ## Errors Every error is JSON with a person's message and a stable code: `{"error": "…", "code": "…"}`. Handle `rate_limited` (wait and retry), `quota` (stop and tell someone), `unavailable` (retry later; the operation was not counted), `invalid`, `not_found` and `forbidden`. The full list is in the [API overview](https://docs.qblackbit.com/api/index.md#errors). ## Next - Every route, field and answer: the [Cloud API reference](https://docs.qblackbit.com/api/cloud.md). - Moving a real project: the [personal project guide](https://docs.qblackbit.com/guides/developer-project.md), or hand the work to your agent with the [matching prompt](https://docs.qblackbit.com/prompts/developer-project.md). - More room and every standard parameter set: request **Pro** from the **Plan** page in the app; qblackbit then gets in touch. --- Source: https://docs.qblackbit.com/quickstart/core # Quickstart: Aegis Core Aegis Core is the edition you run yourself, on Linux x86-64, with no connection to qblackbit. This page uses the `aegis` command in two ways: as a local engine on files, then against a running daemon (`aegisd`) over TLS 1.3 with hybrid key exchange. ## Get the software Aegis Core is delivered to Enterprise customers as one signed bundle per release (`aegis-core-.aegisbundle`), with the standalone verifier `aegis-verify` and the first root of qblackbit's update repository (`1.root.json`). Public downloads are (Planned). To evaluate Aegis Core, write to [sales@qblackbit.com](mailto:sales@qblackbit.com). Check the bundle before anything else, on any Linux x86-64 machine. The root's SHA-256 must match the value you received by a second route (a letter, a call, the contract annex): ```bash sha256sum 1.root.json ./aegis-verify-0.13.0-linux-x86_64 aegis-core-0.13.0.aegisbundle --trusted-root 1.root.json ``` Exit status `0` means every check passed: the archive, the root chain, the metadata in both signature families (Ed25519 and ML-DSA-87) and every file. Then install the package from the verified bundle, as [Signed updates and rollback](https://docs.qblackbit.com/concepts/updates.md#install-from-a-bundle) shows. It puts `aegis`, `aegisd` and `aegis-verify` on the path. ## Part 1: the engine on your machine Without a daemon, `aegis` runs the engine in its own process, on files. Production rules apply unless you add `--laboratory`, which also runs candidate and research algorithms and labels every result. ```bash aegis algorithms --kind kem --ready # the KEMs that may protect new data here aegis algorithm ml-dsa-65 # everything known about one algorithm aegis selftest ml-kem-768 ml-dsa-65 # run their known-answer self-tests again ``` ### Sign and verify ```bash aegis keygen ml-dsa-65 --public-key signer.pub --key signer.key printf 'release 1.2.3' > release.txt aegis sign ml-dsa-65 --key signer.key --in release.txt --signature release.sig aegis verify ml-dsa-65 --public-key signer.pub --in release.txt --signature release.sig ``` `verify` prints `ml-dsa-65: signature valid` and exits `0`; a changed file or signature makes it fail with a non-zero status. Private keys are written readable by their owner only. `--context` binds a context string (at most 255 bytes) and `--prehash sha2-256` signs a digest (HashML-DSA). ### Encapsulate and decapsulate ```bash aegis keygen ml-kem-768 --public-key recipient.pub --key recipient.key aegis encapsulate ml-kem-768 --public-key recipient.pub --ciphertext kem.ct --secret sender.secret aegis decapsulate ml-kem-768 --key recipient.key --ciphertext kem.ct --secret recipient.secret cmp sender.secret recipient.secret && echo "the same shared secret" ``` Use `x25519-ml-kem-768` for the TLS hybrid group, or `aegis algorithms --kind kem` for every KEM this build knows. `aegis hpke` seals and opens messages with HPKE (RFC 9180); `aegis --help` lists every command. ## Part 2: a running Core ### Start it with Docker Compose The bundle carries the daemon's container image and a Compose file for your own host. On a machine with no network, load the image from the verified bundle: ```bash ./aegis-verify-0.13.0-linux-x86_64 aegis-core-0.13.0.aegisbundle --trusted-root 1.root.json \ --extract share/aegis/images/aegisd.oci.tar --to aegisd.tar docker load -i aegisd.tar # prints the image; set AEGIS_IMAGE to it, by digest mkdir -p config && chmod 700 config docker compose run --rm aegisd token --name admin --role admin # prints the token once ``` Append the line `token` prints to `config/tokens` (the file holds only the token's hash), and keep the token itself in a file only you can read, such as `~/.aegis/admin.token`. Then create the vault and start the daemon: ```bash docker compose run --rm aegisd init --data /data/vault.db docker compose up -d docker compose cp aegisd:/var/lib/aegis/tls/ca.pem ./ca.pem # the daemon's own authority ``` The daemon starts **sealed**: it holds no key that opens the vault until an administrator unseals it. ### Talk to it `aegis remote` speaks TLS 1.3 with the hybrid groups only (X25519MLKEM768, SecP256r1MLKEM768, SecP384r1MLKEM1024) and refuses a server that offers only classical ones. Secrets are read from files, never from arguments: ```bash alias core='aegis remote --server https://127.0.0.1:8200 --ca-file ca.pem --token-file ~/.aegis/admin.token' core health # and the hybrid group the handshake used core unseal --passphrase-file ~/.aegis/passphrase # or officers' shares: --share-file core key create release-signing --algorithm ml-dsa-65 core key list ``` Any route of the [Core API](https://docs.qblackbit.com/api/core/index.md) is reachable with `core get ` and `core post --body-file `. Binary values are base64: ```bash printf '{"message": "%s"}' "$(printf 'release 1.2.3' | base64)" > sign.json core post /v1/keys/release-signing/sign --body-file sign.json # {"algorithm", "version", "signature"} ``` Other HTTPS clients work too, if their TLS library offers a hybrid group: for example `curl` built with OpenSSL 3.5 or later. A client that offers only classical key exchange cannot connect, by design. ### The demo instance qblackbit runs a demonstration of Aegis Core at `https://aegis-core.qblackbit.com`. Its health route is open to anyone: ```bash aegis remote --server https://aegis-core.qblackbit.com health curl -sS https://aegis-core.qblackbit.com/v1/health # {"status":"ok"} ``` The demo's public edge uses an ordinary web certificate, so no `--ca-file` is needed. Everything else needs a token; the demo is for evaluations arranged with qblackbit, and `GET /v1/sys/info` tells which release it runs. ## Next - The whole API, service by service: [Core API](https://docs.qblackbit.com/api/core/index.md). - How the vault, policy, audit and dual control fit together: start at [Vault and keys](https://docs.qblackbit.com/concepts/vault.md). - An installation with no network at all: the [government guide](https://docs.qblackbit.com/guides/government.md). --- Source: https://docs.qblackbit.com/sdks # SDKs and libraries Official SDKs are (Planned). Until they ship, every language calls the API directly over HTTPS with JSON: the cloud API has a dozen operations, and each needs one header and a base64 field or two. ## Status by language | Language | SDK | Use today | | --- | --- | --- | | TypeScript and JavaScript | (Planned) | `fetch` (Node.js 18 or later, Deno, Bun): [example](#node-js) | | Python | (Planned) | The standard library's `urllib.request`: [example](#python) | | Go | (Planned) | `net/http`: [example](#go) | | Java | (Planned) | `java.net.http.HttpClient` and any JSON library | | .NET | (Planned) | `System.Net.Http.HttpClient` and `System.Text.Json` | | Rust | (Planned) | Any HTTPS client with a JSON library | | C | (Planned) | Any HTTPS client with a JSON library | | Shell | | `curl` and `jq`: [example](#shell) | The planned SDKs will be generated from the same OpenAPI documents as the [API reference](https://docs.qblackbit.com/api/index.md), with a post-quantum transport for Aegis Core written by hand. Asking for a policy name such as `qbb-hybrid-1` instead of an algorithm is planned with them. ## Complete examples Each example below makes a key if it does not exist, signs a message, verifies it, checks that a changed message fails, and prints the month's usage. They read `AEGIS_URL` and `AEGIS_API_KEY` from the environment and need nothing beyond the language's standard library (the shell one needs `curl` and `jq`). Every change to these docs runs all four against a stand-in for the API. ### Shell ```bash #!/usr/bin/env bash # Sign and verify with an ML-DSA-65 key in Aegis Cloud, with curl and jq. # Set AEGIS_URL (https://aegis.qblackbit.com) and AEGIS_API_KEY (a developer key) in the environment first. set -euo pipefail : "${AEGIS_URL:=https://aegis.qblackbit.com}" : "${AEGIS_API_KEY:?set AEGIS_API_KEY to a developer key; never paste it into a file you commit}" NAME=${AEGIS_KEY_NAME:-quickstart-signing} aegis() { # aegis METHOD PATH [JSON]: one call; prints the body, fails on an HTTP error curl -sS --fail-with-body -X "$1" "$AEGIS_URL$2" \ -H "Authorization: Bearer $AEGIS_API_KEY" -H "Content-Type: application/json" ${3:+-d "$3"} } aegis GET /api/v1/algorithms | jq -c '{plan, algorithms}' # Make the key once; a second run answers 409 "a key of that name exists", which is fine. aegis POST /api/v1/keys "{\"name\": \"$NAME\", \"algorithm\": \"ml-dsa-65\"}" || true echo MESSAGE=$(printf '%s' 'hello from my first post-quantum signature' | base64 | tr -d '\n') SIGNED=$(aegis POST "/api/v1/keys/$NAME/sign" "{\"message\": \"$MESSAGE\"}") SIGNATURE=$(jq -r .signature <<<"$SIGNED") VERSION=$(jq -r .version <<<"$SIGNED") echo "signature: $(printf '%s' "$SIGNATURE" | base64 -d | wc -c | tr -d ' ') bytes, key version $VERSION" TAMPERED=$(printf '%s' 'hello from my first post-quantum signature!' | base64 | tr -d '\n') for CHECK in "original $MESSAGE" "tampered $TAMPERED"; do set -- $CHECK VALID=$(aegis POST "/api/v1/keys/$NAME/verify" \ "{\"message\": \"$2\", \"signature\": \"$SIGNATURE\", \"version\": $VERSION}" | jq -r .valid) echo "$1: valid = $VALID" done aegis GET /api/v1/usage | jq -r '"operations this month: \(.used.included) of \(.included)"' ``` ### Python ```python #!/usr/bin/env python3 """Sign and verify with an ML-DSA-65 key in Aegis Cloud, with Python's standard library only. Set AEGIS_URL (https://aegis.qblackbit.com) and AEGIS_API_KEY (a developer key) in the environment first. """ import base64 import json import os import sys import urllib.error import urllib.request BASE = os.environ.get("AEGIS_URL", "https://aegis.qblackbit.com").rstrip("/") API_KEY = os.environ.get("AEGIS_API_KEY") or sys.exit("set AEGIS_API_KEY to a developer key") NAME = os.environ.get("AEGIS_KEY_NAME", "quickstart-signing") def call(method, path, body=None): """One call to the cloud API: returns (HTTP status, decoded JSON).""" data = json.dumps(body).encode() if body is not None else None request = urllib.request.Request(BASE + path, data=data, method=method) request.add_header("Authorization", "Bearer " + API_KEY) if data is not None: request.add_header("Content-Type", "application/json") try: with urllib.request.urlopen(request, timeout=30) as response: return response.status, json.load(response) except urllib.error.HTTPError as error: return error.code, json.load(error) def must(status, answer, *expected): if status not in expected: sys.exit(f"{status} {answer.get('code')}: {answer.get('error')}") return answer def b64(raw): return base64.b64encode(raw).decode() plan = must(*call("GET", "/api/v1/algorithms"), 200) print("plan:", plan["plan"], "| algorithms:", ", ".join(plan["algorithms"])) status, made = call("POST", "/api/v1/keys", {"name": NAME, "algorithm": "ml-dsa-65"}) print("key:", NAME, "made" if status == 201 else "already exists" if status == 409 else must(status, made)) message = b"hello from my first post-quantum signature" signed = must(*call("POST", f"/api/v1/keys/{NAME}/sign", {"message": b64(message)}), 200) print("signature:", len(base64.b64decode(signed["signature"])), "bytes, key version", signed["version"]) for label, candidate in (("original", message), ("tampered", message + b"!")): body = {"message": b64(candidate), "signature": signed["signature"], "version": signed["version"]} checked = must(*call("POST", f"/api/v1/keys/{NAME}/verify", body), 200) print(f"{label}: valid = {checked['valid']}") usage = must(*call("GET", "/api/v1/usage"), 200) print("operations this month:", usage["used"]["included"], "of", usage["included"]) ``` ### Node.js ```js // Sign and verify with an ML-DSA-65 key in Aegis Cloud, with Node's built-in fetch (Node 18 or later). // Set AEGIS_URL (https://aegis.qblackbit.com) and AEGIS_API_KEY (a developer key) in the environment first. const base = (process.env.AEGIS_URL ?? 'https://aegis.qblackbit.com').replace(/\/$/, '') const apiKey = process.env.AEGIS_API_KEY const name = process.env.AEGIS_KEY_NAME ?? 'quickstart-signing' if (!apiKey) throw new Error('set AEGIS_API_KEY to a developer key') /** One call to the cloud API; throws on an unexpected status with the API's error code. */ async function call(method, path, body, ...expected) { const response = await fetch(base + path, { method, headers: { authorization: `Bearer ${apiKey}`, ...(body ? { 'content-type': 'application/json' } : {}) }, body: body ? JSON.stringify(body) : undefined }) const answer = await response.json() if (!(expected.length ? expected : [200]).includes(response.status)) { throw new Error(`${response.status} ${answer.code}: ${answer.error}`) } return { status: response.status, answer } } const b64 = (text) => Buffer.from(text).toString('base64') const plan = (await call('GET', '/api/v1/algorithms')).answer console.log(`plan: ${plan.plan} | algorithms: ${plan.algorithms.join(', ')}`) const made = await call('POST', '/api/v1/keys', { name, algorithm: 'ml-dsa-65' }, 201, 409) console.log(`key: ${name} ${made.status === 201 ? 'made' : 'already exists'}`) const message = 'hello from my first post-quantum signature' const signed = (await call('POST', `/api/v1/keys/${name}/sign`, { message: b64(message) })).answer console.log(`signature: ${Buffer.from(signed.signature, 'base64').length} bytes, key version ${signed.version}`) for (const [label, candidate] of [['original', message], ['tampered', message + '!']]) { const body = { message: b64(candidate), signature: signed.signature, version: signed.version } const checked = (await call('POST', `/api/v1/keys/${name}/verify`, body)).answer console.log(`${label}: valid = ${checked.valid}`) } const usage = (await call('GET', '/api/v1/usage')).answer console.log(`operations this month: ${usage.used.included} of ${usage.included}`) ``` ### Go ```go // Sign and verify with an ML-DSA-65 key in Aegis Cloud, with Go's standard library only. // Set AEGIS_URL (https://aegis.qblackbit.com) and AEGIS_API_KEY (a developer key) in the environment first. // // go run quickstart.go package main import ( "bytes" "encoding/base64" "encoding/json" "fmt" "log" "net/http" "os" "strings" "time" ) var ( base = strings.TrimRight(envOr("AEGIS_URL", "https://aegis.qblackbit.com"), "/") apiKey = os.Getenv("AEGIS_API_KEY") name = envOr("AEGIS_KEY_NAME", "quickstart-signing") client = &http.Client{Timeout: 30 * time.Second} ) func envOr(key, fallback string) string { if value := os.Getenv(key); value != "" { return value } return fallback } // call makes one request and decodes the JSON answer into out; it returns the HTTP status. func call(method, path string, body any, out any) int { var reader *bytes.Reader if body != nil { encoded, err := json.Marshal(body) if err != nil { log.Fatal(err) } reader = bytes.NewReader(encoded) } else { reader = bytes.NewReader(nil) } request, err := http.NewRequest(method, base+path, reader) if err != nil { log.Fatal(err) } request.Header.Set("Authorization", "Bearer "+apiKey) if body != nil { request.Header.Set("Content-Type", "application/json") } response, err := client.Do(request) if err != nil { log.Fatal(err) } defer response.Body.Close() if err := json.NewDecoder(response.Body).Decode(out); err != nil { log.Fatal(err) } return response.StatusCode } type apiError struct { Error string `json:"error"` Code string `json:"code"` } func main() { if apiKey == "" { log.Fatal("set AEGIS_API_KEY to a developer key") } var plan struct { Plan string `json:"plan"` Algorithms []string `json:"algorithms"` } if status := call("GET", "/api/v1/algorithms", nil, &plan); status != 200 { log.Fatalf("algorithms: HTTP %d", status) } fmt.Printf("plan: %s | algorithms: %s\n", plan.Plan, strings.Join(plan.Algorithms, ", ")) var made apiError switch status := call("POST", "/api/v1/keys", map[string]string{"name": name, "algorithm": "ml-dsa-65"}, &made); status { case 201: fmt.Println("key:", name, "made") case 409: fmt.Println("key:", name, "already exists") default: log.Fatalf("create: %d %s: %s", status, made.Code, made.Error) } message := []byte("hello from my first post-quantum signature") var signed struct { Signature string `json:"signature"` Version int `json:"version"` } if status := call("POST", "/api/v1/keys/"+name+"/sign", map[string]string{"message": base64.StdEncoding.EncodeToString(message)}, &signed); status != 200 { log.Fatalf("sign: HTTP %d", status) } raw, _ := base64.StdEncoding.DecodeString(signed.Signature) fmt.Printf("signature: %d bytes, key version %d\n", len(raw), signed.Version) for _, check := range []struct { label string message []byte }{{"original", message}, {"tampered", append(append([]byte{}, message...), '!')}} { var checked struct { Valid bool `json:"valid"` } body := map[string]any{"message": base64.StdEncoding.EncodeToString(check.message), "signature": signed.Signature, "version": signed.Version} if status := call("POST", "/api/v1/keys/"+name+"/verify", body, &checked); status != 200 { log.Fatalf("verify: HTTP %d", status) } fmt.Printf("%s: valid = %t\n", check.label, checked.Valid) } var usage struct { Included int `json:"included"` Used struct { Included int `json:"included"` } `json:"used"` } call("GET", "/api/v1/usage", nil, &usage) fmt.Printf("operations this month: %d of %d\n", usage.Used.Included, usage.Included) } ``` ## Rules that apply in every language - Read the API key from the environment or a secrets store; never commit it, log it or put it in a web page or a mobile app. - Send binary values as standard base64 with padding. - Handle the error codes: back off on `rate_limited`, stop on `quota`, retry later on `unavailable`. - Treat a `shared_secret` from encapsulation as a key: derive what you need from it and never log it. ## Aegis Core from code Aegis Core speaks the same JSON over REST, and gRPC on the same listener. Your HTTPS client must offer a hybrid key-exchange group (X25519MLKEM768 or the others in [Quantum-safe transport](https://docs.qblackbit.com/concepts/transport.md)): for example a client built on OpenSSL 3.5 or later, or Go 1.24 or later, whose TLS offers X25519MLKEM768 by default. Generate a client from the daemon's own OpenAPI document (`GET /v1/openapi.json`) or from the [published copy](https://docs.qblackbit.com/openapi/aegis-core-v1.json). --- Source: https://docs.qblackbit.com/agents # AI agents These docs are written to be read by your AI agent as much as by you. Point the agent at the files below, give it a credential made for the task, and it can do the migration work through Aegis while you approve each change. ## Files for agents | File | What it is | | --- | --- | | [`/llms.txt`](https://docs.qblackbit.com/llms.txt) | The index, in the [llms.txt](https://llmstxt.org) format: a short summary, then every page as a link to its plain Markdown version | | [`/llms-full.txt`](https://docs.qblackbit.com/llms-full.txt) | Every page of this site in one plain-text file | | `/.md` | Any page as plain Markdown: add `.md` to its address, for example [`/quickstart/cloud.md`](https://docs.qblackbit.com/quickstart/cloud.md), or `index.md` for a section, such as [`/guides/index.md`](https://docs.qblackbit.com/guides/index.md). Each page links to its own at the bottom | | [`/prompts.json`](https://docs.qblackbit.com/prompts.json) | The [prompt library](https://docs.qblackbit.com/prompts/index.md) as data, with each brief's full text | | [`/openapi/aegis-cloud-v1.json`](https://docs.qblackbit.com/openapi/aegis-cloud-v1.json), [`/openapi/aegis-core-v1.json`](https://docs.qblackbit.com/openapi/aegis-core-v1.json) | The OpenAPI documents the API reference is built from | | `https://aegis.qblackbit.com/llms.txt` | The cloud service's own short brief for agents | All of them are generated from the same sources as these pages on every build, so they never disagree with what you read here. ## Brief your agent The quickest way is a prompt from the [library](https://docs.qblackbit.com/prompts/index.md): pick your case, select **Copy prompt**, paste it into your agent. If you write your own brief, include: 1. The goal, and the repository or folder the agent works in. 2. "Read `https://docs.qblackbit.com/llms.txt` first, and use only endpoints and commands written there." 3. Where the credential is (an environment variable or a file), never the credential itself. 4. That every change is shown as a diff and waits for your approval. 5. That classical algorithms keep working until the new path is verified. ## Credentials for an agent | Where | What to give the agent | Ends | | --- | --- | --- | | Aegis Cloud | An API key with the `developer` role (or `auditor` to read), labelled for the task, made under **API keys** | When you revoke it in the app. Keys do not expire on their own; expiring keys are (Planned) | | Aegis Core | A token from `POST /v1/sys/tokens` with the `operator` role (or `auditor`), a `scope` limited to the task's routes, operations and keys, and `expires_in` of a few hours | When it expires, or when an administrator revokes it with `POST /v1/sys/tokens/{name}/revoke` | Never paste a key or token into a chat. Agents keep conversation history, and chat logs are not secret stores. ## The MCP server `aegis-mcp` is a Model Context Protocol server (protocol version 2025-06-18) that lets an agent use Aegis Cloud as tools, with your organisation's API key: | Tool | Calls | | --- | --- | | `list_algorithms` | `GET /api/v1/algorithms` | | `usage` | `GET /api/v1/usage` | | `hash` | `POST /api/v1/hash` | | `sign` | `POST /api/v1/keys/{name}/sign` | | `verify` | `POST /api/v1/keys/{name}/verify` | | `encapsulate` | `POST /api/v1/encapsulate` | It never makes, exports or deletes keys. It runs over standard input and output, or over HTTP on a loopback address only, with a bearer token from a file. A configuration looks like this: ```json { "mcpServers": { "aegis": { "command": "aegis-mcp", "env": { "AEGIS_CLOUD_URL": "https://aegis.qblackbit.com", "AEGIS_API_KEY_FILE": "/path/to/agent.key" } } } } ``` `aegis-mcp` is built, but a public download is (Planned), and so is a hosted MCP server with sign-in. Until then, agents call the [Cloud API](https://docs.qblackbit.com/api/cloud.md) directly, which is what the prompt library does. ## Facts an agent should state accurately - The post-quantum algorithms are the NIST standards FIPS 203 (ML-KEM), FIPS 204 (ML-DSA) and FIPS 205 (SLH-DSA); hybrids pair them with X25519 or the NIST curves. - Nothing is "quantum-proof", and qblackbit claims no certification for Aegis or the cloud service. - Free and Pro run in qblackbit's cloud, each organisation's keys under its own key-encryption key. Enterprise runs on the customer's own machines with no connection to qblackbit. - Anything marked Planned on [Built and planned](https://docs.qblackbit.com/overview/status.md) does not exist yet. --- Source: https://docs.qblackbit.com/concepts/post-quantum # Post-quantum cryptography and hybrids Public-key cryptography in use today (RSA, elliptic-curve Diffie-Hellman, ECDSA, EdDSA) rests on problems that a large enough quantum computer could solve. No such computer exists yet. Post-quantum algorithms rest on problems for which no efficient quantum attack is known, and they run on ordinary computers. ## Why now - **Recorded traffic.** Data encrypted with classical key exchange can be recorded today and decrypted once such a computer exists ("harvest now, decrypt later"). Anything that must stay confidential for years is already exposed. - **Signatures last.** Firmware, documents and certificates signed today must still be trusted years from now, and the systems that check them take years to change. - **Dates are set.** NIST's transition guidance (NIST IR 8547) deprecates quantum-vulnerable public-key algorithms at the 112-bit security level after 2030 and disallows quantum-vulnerable public-key algorithms after 2035. Other governments publish their own dates; the [migration guides](https://docs.qblackbit.com/guides/index.md) point to them. ## The NIST standards NIST published three post-quantum standards in August 2024: | Standard | Algorithm | What it does | Parameter sets in Aegis | | --- | --- | --- | --- | | [FIPS 203](https://csrc.nist.gov/pubs/fips/203/final) | ML-KEM | Key encapsulation: two parties establish a shared secret | `ml-kem-512`, `ml-kem-768`, `ml-kem-1024` | | [FIPS 204](https://csrc.nist.gov/pubs/fips/204/final) | ML-DSA | Digital signatures, from lattices | `ml-dsa-44`, `ml-dsa-65`, `ml-dsa-87` | | [FIPS 205](https://csrc.nist.gov/pubs/fips/205/final) | SLH-DSA | Digital signatures, from hash functions only | Twelve sets, such as `slh-dsa-sha2-128s` and `slh-dsa-shake-256s` | The numbers name the security category: `ml-kem-768` and `ml-dsa-65` are the usual general-purpose choice; `ml-kem-1024` and `ml-dsa-87` the highest category, which the US CNSA 2.0 suite requires. SLH-DSA's security rests only on its hash function, which makes it a conservative choice for long-lived signatures, at the cost of much larger signatures. Sizes change the engineering. From the standards: | Algorithm | Public key | Signature or ciphertext | | --- | --- | --- | | ML-DSA-65 | 1,952 bytes | 3,309-byte signature | | ML-DSA-87 | 2,592 bytes | 4,627-byte signature | | SLH-DSA-SHA2-128s | 32 bytes | 7,856-byte signature | | ML-KEM-768 | 1,184 bytes | 1,088-byte ciphertext, 32-byte shared secret | | ECDSA P-256 (classical, for comparison) | 33 or 65 bytes | 64 to 72-byte signature | ## Hybrids A hybrid pairs a post-quantum algorithm with a classical one, so the result holds as long as either holds. It protects against a flaw found later in the newer algorithm, and it is what many protocols and regulators ask for during the transition. Some rules require hybrids (BSI, ANSSI), others end in pure post-quantum (CNSA 2.0); in Aegis that choice belongs to the [policy pack](https://docs.qblackbit.com/concepts/algorithms.md#policy-packs), not to the product. Aegis builds hybrids only from published constructions: - **Key establishment for TLS 1.3**: `x25519-ml-kem-768` (X25519MLKEM768), `p256-ml-kem-768` (SecP256r1MLKEM768) and `p384-ml-kem-1024` (SecP384r1MLKEM1024), the hybrid groups the IETF standardised for TLS 1.3. - **Signatures**: composite ML-DSA, ML-DSA paired with RSA, ECDSA or EdDSA in one signature (16 sets, Aegis Core). - **Combiners** for key material from several sources (ETSI TS 103 744), and **HPKE** (RFC 9180). - Drafts that are not standards yet, such as X-Wing and composite ML-KEM, run only in a laboratory deployment and are labelled. qblackbit also publishes named **hybrid profiles**, one per job and level, each with its specification and test vectors: see [qblackbit hybrid profiles](https://docs.qblackbit.com/profiles/index.md). ## KEMs are not encryption A KEM gives you a shared secret and a ciphertext, not encrypted data. To encrypt, you derive a key from the shared secret with a key-derivation function and use it with an authenticated cipher such as AES-256-GCM; or you use a format that does all of it, such as HPKE or CMS. Two points matter when you build it yourself: - **The TLS hybrid groups lean on TLS.** `x25519-ml-kem-768` and its siblings concatenate the two shared secrets, and TLS binds them through its handshake transcript. The Aegis catalogue notes that they are meant for TLS-shaped protocols. Outside TLS, derive your key with HKDF over the shared secret with the ciphertext and the recipient's public key in the `info`, as HPKE's KEMs do, or use ML-KEM on its own (`ml-kem-768`, `ml-kem-1024`), which is a complete KEM. - **Prefer a standard format.** Aegis Core writes CMS `AuthEnvelopedData` to ML-KEM recipients (`POST /v1/encoding/cms/encrypt`) and self-describing envelopes (`POST /v1/keys/{name}/encrypt`) that record the algorithm and specification revision, so the data can move again later. ## Where Aegis fits Aegis gives you the keys and the operations, with the algorithm and revision recorded in every output, policy packs that say what is allowed, and an audit trail. Protocol settings that belong to other software (a web server's TLS groups, OpenSSH's key exchange) change in that software: the guides say which. Next: [Algorithms and policy packs](https://docs.qblackbit.com/concepts/algorithms.md). --- Source: https://docs.qblackbit.com/concepts/algorithms # Algorithms and policy packs Aegis knows far more algorithms than any policy should allow. Three things decide what actually runs: the **catalogue** says what each algorithm is, the **gates** decide whether an operation may run now, and the **policy pack** in force says what your organisation allows. ## The catalogue Every algorithm has one record, shipped with the engine: its kind (KEM, signature, cipher, hash…), family, parameter set, security category, sizes, the specification revision it implements, its standards and identifiers, its module, and a **maturity** label with its source and the date it was checked. Ask for it: - Aegis Core: `GET /v1/algorithms` and `GET /v1/algorithms/{id}`, or `aegis algorithms` and `aegis algorithm `. - Aegis Cloud: `GET /api/v1/algorithms` lists what your plan allows. | Maturity | Meaning | A production policy may | | --- | --- | --- | | `standard` | A final standard from a recognised body (FIPS, SP, RFC, ISO) | Use it | | `conservative` | A final standard kept for defence in depth or a regional profile | Use it when the profile says so | | `transition` | Classical public-key cryptography: not quantum-safe | Use it inside hybrids, or alone until the policy's retirement date | | `stateful` | Hash-based signatures whose key changes with every signature (LMS, XMSS) | Verify; signing needs hardware that keeps the state | | `candidate` | In an open standardisation process | Not use it | | `regional` | Selected or standardised by one country | Use it only under that country's profile | | `research`, `retired`, `broken` | No standard path, abandoned, or attacked | Never use it; a laboratory deployment can run it, labelled on every result | Algorithms are grouped in **modules** (`standard-pqc`, `symmetric`, `classical`, `hybrid`, `conservative`, the regional modules and others), which the licence and the policy switch on and off as units. ## The four gates An operation runs only if every gate allows it: | Gate | Question | Owner | | --- | --- | --- | | Build | Is an implementation present in this binary, or as a verified module? | qblackbit, at release | | Licence | Does the licence include this module? | qblackbit, by contract | | Policy | Does the policy in force allow this algorithm, for this operation, caller and key? | You | | Health | Did the algorithm pass its self-test, and is it free of a revocation advisory? | The engine | Gates tell **applying** protection (generate, sign, encrypt, encapsulate) from **processing** protection that already exists (verify, decrypt, decapsulate). Retiring an algorithm closes the first and leaves the second open until your data has moved. An expired licence also closes only new protection by licensed extras: nothing stops you reading your own data or exporting your own keys. ## Isolation Algorithms from final standards with reviewed implementations run inside the engine. Native reference code, candidates and national algorithms run in **separate sandboxed processes** with no file access, no network and a system-call allow-list, started only by a verified digest. A flaw in one of them cannot reach another algorithm's keys. ## Policy packs A policy pack is a signed set of rules per operation, caller role, key and date, with a rule for hybrids, each rule citing its source and section. Packs only ever narrow what the gates allow. Aegis Core ships five: | Pack | Follows | | --- | --- | | `baseline` | Aegis's own defaults | | `us-nist-ir8547` | NIST IR 8547, the US transition schedule | | `us-cnsa-2.0` | The NSA's CNSA 2.0 suite for national security systems | | `de-bsi-tr02102` | BSI TR-02102-1, Germany's technical guideline | | `fr-anssi-hybrid` | ANSSI's guidance, which asks for hybrids | Read and use them: - `GET /v1/policy`: the packs, the one in force, and whether signed imports can be checked. - `GET /v1/policy/packs/{id}`: a pack's rules with their sources. - `POST /v1/policy/activate`: put a pack in force, with a reason (audited). - `GET /v1/policy/protocols`: what the pack in force allows, as TLS groups and signature schemes, IKEv2 transforms, SSH methods, JOSE and COSE identifiers and X.509 algorithms. Give this to the teams that configure those protocols. - `POST /v1/policy/packs` and `POST /v1/policy/advisories`: import a signed pack or advisory. An advisory can only narrow, and one that would roll back is refused. - On the command line: `aegis policy list`, `aegis policy show us-cnsa-2.0`, `aegis policy protocols`. Asking for a policy name such as `qbb-hybrid-1` instead of an algorithm in your requests, with defaults per purpose in each pack, is (Planned). Today you name the algorithm and the pack decides whether it is allowed. Aegis Cloud plans carry a fixed list of standard and hybrid algorithms instead of a choice of pack. Next: [Vault and keys](https://docs.qblackbit.com/concepts/vault.md). --- Source: https://docs.qblackbit.com/concepts/vault # Vault and keys The vault is where Aegis keeps keys and the record of everything done with them. In Aegis Cloud each organisation is one tenant of a vault that qblackbit runs; in Aegis Core the vault is yours. ## Keys, versions and names You refer to a key by its **name**; the algorithm and material stay inside. A key has **versions**: rotating adds a version that new protection uses, while older versions keep opening and verifying what they protected. Every signature and ciphertext records the version that made it. - Create: `POST /v1/keys` (Core) or `POST /api/v1/keys` (Cloud), with a name and an algorithm. - Rotate: `POST /v1/keys/{name}/rotate` (Core). - Import material made elsewhere: `POST /v1/keys/{name}/import` (Core). The material must pass the algorithm's own key checks first. ## States and dates A Core key moves through the life cycle of NIST SP 800-57: | State | New protection (sign, encrypt, encapsulate) | Existing protection (decrypt, decapsulate) | | --- | --- | --- | | `pre-active` | No | No: it waits for activation, by hand or by its date | | `active` | Yes | Yes | | `suspended` | No | No: a hold, undone by resuming | | `deactivated` | No | Yes, so old data stays readable | | `compromised` | No | Yes, and every use is flagged in the audit | | `destroyed` | No | No: the material is gone | Activation and deactivation dates are enforced when the key is used (`POST /v1/keys/{name}/dates`). Deleting a key is **scheduled** after a waiting period (`POST /v1/keys/{name}/delete`, cancellable); crypto-shredding with `POST /v1/keys/{name}/destroy` erases every version at once and cannot be undone, which is why it sits under [dual control](https://docs.qblackbit.com/concepts/dual-control.md) by default. ## Export rules Each key is created with an export policy that never changes: `none` (the default: the private material never leaves), `wrapped` (it leaves only encrypted to an escrow key of the vault) or `plain`. An import never loosens the rules of the key it came from, and exporting sits under dual control by default. In Aegis Cloud, keys stay in the vault. Exporting a cloud key wrapped to your own key is (Not available yet). ## Envelopes and signatures that describe themselves `POST /v1/keys/{name}/encrypt` returns an **envelope** (`AGV2`) and `POST /v1/keys/{name}/sign` can return a signature envelope (`AGS2`). Each records the key, the version, the algorithm, the specification revision and what it is bound to, and is parsed strictly. `POST /v1/envelopes/describe` reads that header without opening anything. That record is what makes the next migration possible: a **re-wrap job** (`POST /v1/rewrap/jobs`) moves many envelopes to the newest version or to another key inside the daemon, without the plaintext ever leaving. ## Key hierarchy and tenants Keys are encrypted under their **tenant's key-encryption key**, which is encrypted under the vault's **root key**. Each level rotates without downtime (`POST /v1/tenants/{name}/rotate`, `POST /v1/sys/root/rotate`) while a background job re-wraps what lies below. Shredding a tenant (`POST /v1/tenants/{name}/shred`) destroys every key under it at once. Tenants keep organisations apart in every key, query and audit record. Aegis Cloud gives each organisation its own tenant and a token scoped to it, so Core refuses one organisation's access to another's keys even if the cloud were wrong. ## Seal and unseal An Aegis Core daemon starts **sealed**: it holds no key that can open the vault. An administrator unseals it with the vault's passphrase, or officers each hand in a Shamir share until the threshold is met (`POST /v1/sys/unseal`, progress at `GET /v1/sys/unseal`). Sealing (`POST /v1/sys/seal`) drops the open vault from memory. While the vault is open, its keys live in locked, guard-paged memory, and core dumps are off. Changing the unlock without touching the stored keys: `POST /v1/sys/rekey` (new passphrase, or new shares and threshold). Keeping the root key in an HSM or TPM, and unsealing automatically from one, are (Planned). ## Backups `POST /v1/sys/backup` returns the whole vault as a backup file; `POST /v1/sys/backup/snapshot` keeps a verified copy in the daemon's backup directory. A backup holds every value still encrypted and opens only under the vault's own root key. A restore checks the whole audit chain, and a daemon refuses to unseal a vault that was rolled back to an older copy of itself. Next: [Audit chain](https://docs.qblackbit.com/concepts/audit.md). --- Source: https://docs.qblackbit.com/concepts/audit # Audit chain Every action that uses or changes a key in Aegis Core is written to an audit record **in the same storage transaction** as the action itself, before its result is released. No operation can happen without its record, and no record can describe something that did not happen. ## What a record holds Who acted (the token's holder, with its tenant), what they did, which key and version, which algorithm and provider, the outcome, and a link to the previous record. Records never hold key material, passphrases or plaintext. Changes to tokens, switches and runtime state are recorded the same way, before they take effect. ## Why it is a chain Each record carries a keyed hash that covers the record before it. Removing, reordering or editing a record breaks every link after it, and the chain verifies end to end: - `GET /v1/audit`: a page of records, filtered; each tenant's callers see only their tenant's records. - `GET /v1/audit/verify`: checks every record, every link and the sealed head of the chain. ## Signed checkpoints The vault signs **checkpoints** of the chain's head with two signatures, Ed25519 and ML-DSA-87, so the evidence holds while either algorithm does. Checkpoints can be exported to a witness off the machine, and the daemon keeps its own checkpoint, so a vault file replaced by an older copy of itself is refused at unseal. - `GET /v1/audit/checkpoint`: a signed checkpoint. - `GET /v1/audit/export`: records with their links and tags, one JSON object per line, for checking elsewhere. ## Check it offline, without trusting Aegis The standalone `aegis-verify` checks an export against one or more checkpoints on any machine, with no network: ```bash aegis-verify audit --records export.jsonl --checkpoint checkpoint.json --vault ``` It recomputes every link and checks both signatures of each checkpoint. Pass `--vault` to pin the vault the evidence must come from. Exit status `0` means the chain is intact up to the newest checkpoint. ## In Aegis Cloud The cloud's staff back office keeps its own audit chain of every staff action, signed the same way (Ed25519 and ML-DSA-87) and checked by the same `aegis-verify audit`. Customer-facing audit exports in the cloud app are (Planned). Next: [Dual control](https://docs.qblackbit.com/concepts/dual-control.md). --- Source: https://docs.qblackbit.com/concepts/dual-control # Roles, tokens and dual control Aegis Core decides who may do what on every route, and asks a second person for the operations that cannot be undone. ## Roles | Role | May | | --- | --- | | `auditor` | Read: status, the catalogue, keys and public keys, the tenant's audit records and access policy; verify signatures | | `operator` | Everything an auditor may, and use keys: sign, encrypt, decrypt, decapsulate; the stateless tools | | `admin` | Everything, and manage keys, tokens and the tenant's access policy; in the system's namespace, also unseal, seal, back up, switch algorithms and manage tenants | | `emergency` | Nothing but `GET /v1/sys/whoami`, until its holder starts a break-glass session | | `monitor` | Only the metrics and the detailed readiness check, for monitoring systems | Every route has one row in an authorisation matrix with its operation (`key.sign`, `key.export`…), the lowest role and its reach; a route with no row is refused. Separation of duties is built in: an auditor never uses a key, an operator never changes access. A tenant's access policy can define **custom roles** narrowed by route patterns and operations, never above their base role. Aegis Cloud has its own organisation roles (`owner`, `admin`, `developer`, `auditor`), and its API keys carry `developer` or `auditor`. ## Tokens: scoped, expiring, bound Callers authenticate with a bearer token (`agt_…`). Administrators issue tokens with `POST /v1/sys/tokens`, and can make each one as narrow as the job: | Field | Narrows the token to | | --- | --- | | `role` | A built-in or custom role | | `scope.paths` | Route patterns, such as `/v1/keys/payments-*/**` | | `scope.operations` | Operations, such as `key.sign` or `key.*` | | `scope.keys` | Key names or patterns | | `expires_in` | A lifetime from 60 seconds to a year | | `bound` | A client certificate's public key: the token then works only over mutual TLS with that key | The token is shown once; the daemon stores only its hash. `POST /v1/sys/tokens/{name}/revoke` ends it at once and retires the name for good. `GET /v1/sys/whoami` shows what the current token may do. For an AI agent, issue a token with the `operator` role (or `auditor` to read), a scope that covers only the task, and an `expires_in` of a few hours, and revoke it when the task ends. The [prompt library](https://docs.qblackbit.com/prompts/index.md) asks for exactly that. Other ways in: mutual TLS with client certificates from the daemon's own ML-DSA-87 authority, and single sign-on through OpenID Connect with PKCE. SAML is (Planned). ## Dual control The operations a tenant's access policy lists need approval from other people who may perform them. By default: destroying a key (`key.destroy`), exporting one (`key.export`), changing the access policy (`access.policy`) and importing with looser export rules. 1. The request answers `202` with an approval and does nothing. 2. Other principals approve it: `POST /v1/sys/approvals/{id}/approve`. The requester cannot approve their own request, and neither can a break-glass session. 3. Once approved, the **same request** is sent again, unchanged, with the header `x-aegis-approval: `. It runs once. A changed request answers `409`. Every step is in the [audit chain](https://docs.qblackbit.com/concepts/audit.md). `GET /v1/sys/approvals` lists what is pending; a requester can withdraw with `POST /v1/sys/approvals/{id}/cancel`, and an approver can refuse with `POST /v1/sys/approvals/{id}/deny`. ## Break-glass A holder of the `emergency` role can start a session (`POST /v1/sys/break-glass`) with a written reason and a length, and acts as an administrator of their tenant until it ends. The start and the end are recorded with an `ALARM` in the audit chain, and `GET /v1/sys/info` shows the alarm while any session runs. Next: [Signed updates and rollback](https://docs.qblackbit.com/concepts/updates.md). --- Source: https://docs.qblackbit.com/concepts/updates # 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-.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 --to ` 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). --- Source: https://docs.qblackbit.com/concepts/transport # Quantum-safe transport Aegis protects its own connections with the same algorithms it offers: every hop Aegis owns uses TLS 1.3 with hybrid post-quantum key exchange, and nothing else. ## Aegis Core's listener `aegisd` serves its API (REST and gRPC on one listener) over TLS 1.3 with three key-exchange groups only, each pairing ML-KEM with a classical curve: | Group | Parts | | --- | --- | | X25519MLKEM768 | ML-KEM-768 and X25519 | | SecP256r1MLKEM768 | ML-KEM-768 and ECDH on P-256 | | SecP384r1MLKEM1024 | ML-KEM-1024 and ECDH on P-384 | A client that offers only classical key exchange cannot connect. On first start the daemon creates its own certificate authority and server certificate, both **ML-DSA-87**, so the connection is authenticated post-quantum as well; ECDSA P-384 is available for a client or proxy that cannot verify ML-DSA yet. The daemon renews its certificate itself, keeping the same key, so a pinned key stays valid. Plain HTTP exists only for laboratories and is refused otherwise. ## Clients - `aegis remote` offers the hybrid groups only, trusts the daemon's authority file (`--ca-file`), a pinned key (`--pin-sha256`), both, or the system's authorities, and says which group the handshake used. - Any other client works if its TLS library offers one of the three groups, for example `curl` built with OpenSSL 3.5 or later. Current browsers offer X25519MLKEM768 for key exchange. - Mutual TLS: clients can present certificates from the daemon's ML-DSA-87 authority (`aegisd client-cert`). ## Behind a proxy When a reverse proxy faces the internet, two hops exist: | Hop | What Aegis uses | | --- | --- | | Proxy to `aegisd` | TLS 1.3, hybrid groups only, trusting only the daemon's own authority, with ML-DSA-87 certificates | | Client to proxy | `pq-preferred`: X25519MLKEM768 for clients that offer it, classical key exchange for the rest; or `pq-required`, which refuses classical-only clients | The public certificate on the proxy is still a classical one (RSA or ECDSA from a public authority), because browsers cannot verify ML-DSA certificates yet. Key exchange there is hybrid whenever the client supports it, which protects recorded traffic; authentication on that hop stays classical until browsers and public authorities move. ## Aegis Cloud The cloud follows the same rules: hybrid-only TLS from its edge to the service and from the service to Aegis Core, both inside qblackbit's own authorities; hybrid-only calls to the outside services it uses (Google sign-in and the bot check). Its public edge prefers X25519MLKEM768 and keeps a classical public certificate. What stays classical is stated, not hidden: the public certificate, and Google's own sign-in tokens. ## What this does not cover Transport protection for your own services is yours to configure. A gateway that adds quantum-safe HTTPS in front of existing sites (Aegis Gate), and a tunnel for services that cannot speak these groups (Aegis Link), are (Planned). Next: the [migration guides](https://docs.qblackbit.com/guides/index.md). --- Source: https://docs.qblackbit.com/profiles/ # qblackbit hybrid profiles qblackbit publishes its hybrid profiles: named combinations of published, standardised algorithms, one for each job and level (for example TLS, data at rest, archives, messaging, IoT and VPNs, and signatures for code, firmware, documents, certificates, tokens and blockchains), each with its full specification and test vectors. A profile is never a secret algorithm: every part and the way the parts are combined come from published documents. > **Being published:** > The catalogue of qblackbit hybrid profiles is being published here, with each specification and its test vectors. Until it appears, [Post-quantum and hybrids](https://docs.qblackbit.com/concepts/post-quantum.md#hybrids) explains the hybrid constructions Aegis offers today, and the [algorithm catalogue](https://docs.qblackbit.com/concepts/algorithms.md) lists every algorithm with its maturity. Asking Aegis for a profile by name, instead of naming the algorithms, is planned. Once the catalogue is here, pick the profile for your job and level, and use the algorithms it names. --- Source: https://docs.qblackbit.com/guides/ # How to migrate Every guide here follows the same five steps. They differ in who does the work, where Aegis runs and which rules apply. ## The five steps 1. **Inventory.** List every place your systems use public-key cryptography: the algorithm, what it protects, where the key lives, who verifies or decrypts, and how long the data must stay confidential or the signature must stay trusted. 2. **Classify.** Sort each finding: signatures you make; data you encrypt to someone; protocol settings that belong to other software (TLS, SSH, VPNs); and things you do not own (providers, dependencies). Only the first two move through Aegis. 3. **Replace through Aegis.** Signatures move to ML-DSA (or SLH-DSA for very long-lived signatures), key establishment to ML-KEM or a hybrid, each key held in an Aegis vault and used by name. 4. **Verify.** Prove each change: a round trip in tests, a tampered input that fails, the audit record, and the old path still working. 5. **Keep the fallback until verified.** Run classical and post-quantum side by side (two signatures, or a hybrid) until every party that checks or decrypts has moved. Then retire the classical path on purpose, with a date. Rank the inventory by exposure: data that must stay secret for years and crosses networks first, then signatures that must stay valid for years, then the rest. ## Pick your guide | Guide | Aegis edition | Who does the work | | --- | --- | --- | | [A personal project](https://docs.qblackbit.com/guides/developer-project.md) | Aegis Cloud Free | One developer, often with a coding agent | | [A small business](https://docs.qblackbit.com/guides/small-business.md) | Aegis Cloud Free or Pro | An owner or an IT person | | [A bank](https://docs.qblackbit.com/guides/bank.md) | Aegis Core (Enterprise), on premises | An engineering team, with risk and audit | | [A blockchain project](https://docs.qblackbit.com/guides/blockchain.md) | Aegis Cloud for signing; Aegis Core for more | A protocol, validator or wallet team | | [A government](https://docs.qblackbit.com/guides/government.md) | Aegis Core (Enterprise), air-gapped | An agency team, with its auditors | Each guide has a matching brief in the [prompt library](https://docs.qblackbit.com/prompts/index.md) that hands the same work to your own AI agent, with safety rules built in. ## What Aegis does not do for you yet Finding cryptography automatically across networks, code and key stores (Aegis Discover), planning and approving changes as a workflow (Aegis Command), and putting quantum-safe HTTPS in front of a site you cannot change (Aegis Gate) are (Planned). Until then, the inventory is built from searches, exports and questions to your providers, and the guides show how. --- Source: https://docs.qblackbit.com/guides/developer-project # Migrate a personal project For one developer and one repository: a web app, an API, a command-line tool or a small service. You will find where the project uses classical public-key cryptography, move what you sign to ML-DSA-65 in Aegis Cloud, and keep everything working while you do it. The Free plan is enough. > **Hand it to your agent:** > > The [personal project prompt](https://docs.qblackbit.com/prompts/developer-project.md) gives your own coding agent this whole guide as a brief, with the safety rules built in. ## 1. Find classical cryptography Search the code, configuration, CI files, container files and infrastructure files. A first pass with `grep`: ```bash grep -rnEI --exclude-dir={.git,node_modules,vendor,dist,build,target} \ 'RSA|ECDSA|ECDH|Ed25519|X25519|secp256k1|prime256v1|P-256|RS256|ES256|EdDSA|PS256|generateKeyPair|KeyPairGenerator|createSign|crypto/(rsa|ecdsa|ed25519|ecdh)|cryptography\.hazmat|BEGIN (RSA |EC |OPENSSH )?PRIVATE KEY|ssh-keygen|openssl (genrsa|genpkey|ecparam|req)' . ``` Then the key and certificate files, and what each certificate uses: ```bash find . -path ./.git -prune -o \( -name '*.pem' -o -name '*.key' -o -name '*.crt' -o -name 'id_rsa*' -o -name 'id_ecdsa*' \) -print openssl x509 -in cert.pem -noout -text | grep 'Public Key Algorithm' ``` Look at dependency manifests too: JWT and JOSE libraries, TLS settings in web servers and proxies, SSH deploy keys in CI, signing steps in release pipelines. Record each hit: the file and line, the algorithm, the purpose, where the key lives, and who verifies or decrypts. ## 2. Classify | Class | Examples | What to do | | --- | --- | --- | | Signatures you make | Release artefacts, webhook payloads, tokens your service issues and checks itself, licence files | Move to an ML-DSA-65 key in Aegis Cloud (step 3) | | Data you encrypt to someone | Files or fields sealed to a recipient's public key | Move to an ML-KEM based KEM, the recipient holding the private key (step 5) | | Protocol settings | TLS on your server or proxy, SSH, VPN | Change the software's own settings (step 6), not through Aegis | | What you do not own | Your hosting provider's TLS, third-party APIs, libraries' internals | List it, ask the provider, and leave it | Signatures that other parties must check (for example tokens verified by a third party) can move only when those parties support ML-DSA: sign twice until then. ## 3. Sign with ML-DSA through Aegis Cloud Sign up and make a `developer` API key as the [cloud quickstart](https://docs.qblackbit.com/quickstart/cloud.md) shows. Then create one key per purpose: ```bash curl -sS -X POST "$AEGIS_URL/api/v1/keys" \ -H "Authorization: Bearer $AEGIS_API_KEY" -H "Content-Type: application/json" \ -d '{"name": "release-signing", "algorithm": "ml-dsa-65"}' ``` Add one small module that calls the API with your language's standard HTTP client: `POST /api/v1/keys/{name}/sign` with `{"message": }` returns `{"version", "signature"}`, and `POST /api/v1/keys/{name}/verify` with `{"message", "signature", "version"}` returns `{"valid": true}` or `{"valid": false}`. The [quickstart examples](https://docs.qblackbit.com/quickstart/cloud.md#_4-sign-and-verify) in shell, Python, Node.js and Go are complete and tested; start from one of them. Read `AEGIS_URL` and `AEGIS_API_KEY` from the environment, and handle the error codes `quota`, `rate_limited` and `unavailable` explicitly. A message can be up to 1 MiB. For larger files, sign a digest: compute SHA3-256 (or SHA-256) of the file yourself, sign the digest, and publish which hash you used so a verifier does the same. ## 4. Keep the classical signature beside it Do not switch over in one step. Produce both signatures, publish both public keys, and let each verifier accept either until all of them check ML-DSA: ```text release-1.2.3.tar.gz release-1.2.3.tar.gz.sig # the classical signature you publish today release-1.2.3.tar.gz.mldsa65.sig # the ML-DSA-65 signature from Aegis release-signing.mldsa65.pub # from GET /api/v1/keys/release-signing/public ``` Record which signature verified, so you know when the classical one can go. ## 5. Encrypting to a recipient The cloud API encapsulates to a public key (`POST /api/v1/encapsulate`) but does not decapsulate, and exporting a cloud key is not available yet. So the recipient makes the KEM key pair where they will decapsulate (for example in [Aegis Core](https://docs.qblackbit.com/quickstart/core.md)) and gives you the public key; you encapsulate through the cloud and send the ciphertext with your data. Derive the data key from the shared secret with HKDF-SHA-256 and seal the data with an authenticated cipher such as AES-256-GCM. Prefer `ml-kem-768` (Pro), a complete KEM on its own. On Free the only KEM is `x25519-ml-kem-768`, the TLS 1.3 hybrid group: outside TLS, put the ciphertext and the recipient's public key in the HKDF `info`, as HPKE does. Why: [KEMs are not encryption](https://docs.qblackbit.com/concepts/post-quantum.md#kems-are-not-encryption). ## 6. Protocol settings outside Aegis - **TLS.** Hybrid key exchange (X25519MLKEM768) is supported by current browsers and by servers and proxies built on recent TLS libraries, such as OpenSSL 3.5 or later. Check your site with OpenSSL 3.5 or later: `openssl s_client -connect example.com:443 -groups X25519MLKEM768` connects only if the server offers the group. If your hosting provider terminates TLS, ask them. - **SSH.** OpenSSH 10.0 and later prefer the hybrid key exchange `mlkem768x25519-sha256` by default; `ssh -Q kex | grep mlkem` shows whether yours has it. Host and user keys are still classical signatures; they move when post-quantum SSH keys are standardised. ## 7. Verify - Tests: sign then verify is `valid: true`; a changed message or signature is `valid: false`; the classical path still passes. - `GET /api/v1/keys` lists each key you made, with the algorithm you meant. - `GET /api/v1/usage` matches what your tests used, and your code handles `quota` and `rate_limited`. - Search the history for leaked keys before you push: `git log -p | grep -n 'agk_'` must find nothing. ## Planned, not available yet - SDKs for TypeScript, Python, Go, Java, .NET, Rust and C: (Planned). Call the HTTPS API directly; it is small. - Asking for a policy name such as `qbb-hybrid-1` instead of an algorithm: (Planned). - API keys that expire on their own: (Planned). Revoke keys you no longer use. - Finding cryptography automatically (Aegis Discover): (Planned). --- Source: https://docs.qblackbit.com/guides/small-business # Prepare a small business For an owner or the person who looks after IT. Most of a small business's cryptography belongs to its providers: the website host, the email service, the accounting and file-sharing tools, the phones and laptops. Your part is to know where it is, ask the right questions, change your own settings, and sign what you sign with post-quantum keys. This takes an afternoon to start, not a project. > **Hand it to your agent:** > > The [small business prompt](https://docs.qblackbit.com/prompts/small-business.md) lets a general-purpose AI assistant interview you, build the inventory and draft the questions for your providers. ## 1. List what you rely on | Area | Ask yourself | | --- | --- | | Website and domain | Who hosts it? Who issues the certificate? Is there a customer login or a shop? | | Email | Which provider? Do you send signed or encrypted mail? | | Cloud services | Accounting, customer records, file sharing, chat: which ones hold data that must stay confidential for years? | | Remote access | A VPN, a remote desktop tool, an office router? | | Devices | Laptops, phones, a NAS: are disks encrypted, are updates on? | | What you sign | Contracts, invoices, software or firmware you ship, backups | | Software you build | An app or a website you develop yourselves: use the [personal project guide](https://docs.qblackbit.com/guides/developer-project.md) for it | For each item, note the provider, the data it protects and how long that data must stay confidential. Health, legal and financial records usually top the list. ## 2. Ask, do not guess For each provider, look for what it publishes about post-quantum or hybrid key exchange, and keep the link. Sort the answers into four groups: already uses hybrid key exchange; available but switched off (you can turn it on); on the provider's published plan; or unknown. For the unknown ones, ask in writing: > Do you use hybrid post-quantum key exchange (for example X25519MLKEM768) for connections to your service? If not, when do you plan to, and which standards will you follow (FIPS 203, FIPS 204)? Browsers and many large providers already negotiate hybrid key exchange for web traffic. What usually lags is older equipment and smaller services, which is why the list matters. ## 3. Rank Put first the data that must stay confidential for many years and travels over the internet, because recorded traffic can be decrypted later once a large quantum computer exists. Then signatures that must stay valid for years. Then the rest. ## 4. Set up Aegis Cloud for what you sign 1. Sign up at [aegis.qblackbit.com](https://aegis.qblackbit.com/sign-up) with Google or an email address, and turn on the authenticator app in **Settings**. 2. Invite colleagues under **Members** with the lowest role that works: `auditor` to look, `developer` to sign, `admin` only for those who manage keys and members. 3. Make an API key with the `developer` role for the person or tool that signs. 4. Create a signing key: `POST /api/v1/keys` with `{"name": "documents", "algorithm": "ml-dsa-65"}`. 5. Sign with `POST /api/v1/keys/documents/sign`, and check with `POST /api/v1/keys/documents/verify`. For a file over 1 MiB, sign its SHA3-256 digest and record which hash you used. 6. Give the public key (`GET /api/v1/keys/documents/public`) to whoever checks your signatures, beside the method you use today, and keep both until they can check ML-DSA. The [cloud quickstart](https://docs.qblackbit.com/quickstart/cloud.md) has the exact commands and tested scripts. Free covers 10,000 operations a month; **Pro** (more operations, more keys and every NIST parameter set the cloud offers) starts with a request from the **Plan** page, after which qblackbit gets in touch. Keys stay in the cloud's vault: exporting them is (Not available yet). ## 5. Write a one-page plan | Now | Ask by a date | Later | | --- | --- | --- | | Turn on what your providers already offer; update devices and browsers; sign with ML-DSA where you sign | The providers in the "unknown" group | Replace equipment that cannot be updated; revisit the list every six months | Name an owner for each line. Keep the inventory with the plan; it is the start of the evidence your customers or insurers may ask for. ## Planned, not available yet - Quantum-safe HTTPS in front of an existing website, without changing the site (Aegis Gate): (Planned). - Finding keys and certificates automatically (Aegis Discover): (Planned). - Card payment for Pro, yearly billing and prepaid credits: (Planned). Today Pro starts with a request in the app. --- Source: https://docs.qblackbit.com/guides/bank # Pilot a bank's migration on Aegis Core For a bank's engineering team, with risk and internal audit alongside. Aegis Core runs on the bank's own machines (the Enterprise edition), with no connection to qblackbit. This guide takes you from an inventory to a pilot whose every step leaves evidence your auditors can check without trusting qblackbit. > **Hand it to your agent:** > > The [bank prompt](https://docs.qblackbit.com/prompts/bank.md) briefs a coding agent that works inside your network, against a test installation, with a scoped and expiring token. ## 1. Set up roles before keys | Who | Aegis role | Why | | --- | --- | --- | | Platform administrators | `admin` | Keys, tokens, the access policy; unseal and backups in the system's namespace | | Applications and pipelines | `operator`, with scoped tokens | Use keys (sign, decrypt, decapsulate) and nothing else | | Internal audit, risk, supervisors' requests | `auditor` | Read keys, policy and the audit chain; verify; never use a key | | Key custodians | Officers holding Shamir shares | Unseal the vault together; no one can do it alone | Issue each application its own token with `POST /v1/sys/tokens`: a role, a scope (`scope.paths`, `scope.operations`, `scope.keys`), an expiry (`expires_in`) and, for services, a binding to their client certificate (`bound`), so a stolen token is useless elsewhere. Keep the default [dual control](https://docs.qblackbit.com/concepts/dual-control.md) on destroy, export and access changes, and add what your policy requires. ## 2. Inventory Build it from what you already have: configuration exports, certificate inventories, key-manager and HSM reports, code repositories and vendor statements. For each use of RSA, ECDSA, ECDH, EdDSA and Diffie-Hellman record the system, owner, purpose, protocol, counterparty, and how long the data must stay confidential or the signature must stay valid. Payment messaging, customer data archives, inter-bank links and code signing usually rank first. Automatic discovery across the estate (Aegis Discover) and migration workflow (Aegis Command) are (Planned); the inventory is built from exports for now. ## 3. Choose the rules Pick the [policy pack](https://docs.qblackbit.com/concepts/algorithms.md#policy-packs) your supervisors expect: `us-nist-ir8547`, `us-cnsa-2.0`, `de-bsi-tr02102`, `fr-anssi-hybrid`, or `baseline`. Read its rules with sources (`GET /v1/policy/packs/{id}`), put it in force in the test installation (`POST /v1/policy/activate`, with a reason that is audited), and hand the network teams the protocol values it allows (`GET /v1/policy/protocols`). Mark each inventory line: allowed, allowed until a date, or to replace. ## 4. Pilot with test data In a test tenant, one pattern per kind of use: | Use | Aegis Core | | --- | --- | | Signing (messages, statements, releases) | An `ml-dsa-65` key, or composite ML-DSA paired with ECDSA P-256 while counterparties move: `POST /v1/keys`, `POST /v1/keys/{name}/sign`, `POST /v1/keys/{name}/verify` | | Key establishment between systems | An `ml-kem-768` (or `ml-kem-1024`) key in the vault: the sender calls `POST /v1/tools/encapsulate` with its public key, the receiver `POST /v1/keys/{name}/decapsulate` | | Data at rest | Self-describing envelopes: `POST /v1/keys/{name}/encrypt` and `POST /v1/keys/{name}/decrypt`, with a key the pack allows for encryption | | Files to a counterparty | CMS `AuthEnvelopedData` to ML-KEM recipients: `POST /v1/encoding/cms/encrypt`, opened with `POST /v1/keys/{name}/cms/decrypt` | | Certificates for a test PKI | Requests and certificates signed by vault keys: `POST /v1/keys/{name}/csr`, `POST /v1/keys/{name}/certificate` | Then rehearse a rotation: `POST /v1/keys/{name}/rotate`, confirm that old envelopes still decrypt, and move them to the newest version with a re-wrap job (`POST /v1/rewrap/jobs`, progress at `GET /v1/rewrap/jobs/{id}`). The plaintext never leaves the daemon. ## 5. Evidence - `GET /v1/audit/export` and `GET /v1/audit/checkpoint`, checked offline by internal audit with `aegis-verify audit --records --checkpoint `. - `GET /v1/sys/licence` and `GET /v1/sys/info` for what ran, and the release's software and cryptography bills of materials from the verified bundle. - The inventory, the pack's rules and your decisions for each line. ## 6. Plan the rollout Per system: the target algorithm, hybrid or not (the pack says), the owner, the order, the fallback, and the test that closes it. Keep classical and post-quantum side by side until every counterparty has moved, and retire the classical path on a date you choose. ## Planned, not available yet - Root keys held in an HSM, PKCS#11 and KMIP interfaces, a JCA and an OpenSSL provider: (Planned). Today keys live in the Aegis vault, encrypted at rest and held in locked memory while in use. - Clustering and replication across sites: (Planned). One daemon holds one vault today. - SDKs: (Planned). Use the REST or gRPC API (the OpenAPI document is at `GET /v1/openapi.json`). - SAML sign-in: (Planned). OpenID Connect works today. --- Source: https://docs.qblackbit.com/guides/blockchain # Post-quantum signatures for a blockchain project For a protocol, validator or wallet team. Blockchains depend on signatures more than on anything else: accounts, validators, bridges and governance all rest on ECDSA (secp256k1) or EdDSA, which a large quantum computer could forge. Aegis gives you post-quantum keys and signatures today. It does not change your chain: accepting a new signature scheme on chain is a protocol upgrade only your community can make. This guide separates the two. > **Hand it to your agent:** > > The [blockchain prompt](https://docs.qblackbit.com/prompts/blockchain.md) briefs a coding agent to do the inventory, the release signing and an off-chain prototype, with new test keys only. ## What Aegis offers | | Aegis Cloud | Aegis Core | | --- | --- | --- | | ML-DSA (FIPS 204) | `ml-dsa-65` on Free; `ml-dsa-44`, `-65`, `-87` on Pro | All three | | SLH-DSA (FIPS 205) | Six sets on Pro | All twelve | | Composite ML-DSA (ML-DSA with ECDSA or EdDSA in one signature) | (Planned) | 16 sets | | Existing secp256k1 and Ed25519 signatures | No | Verification (`POST /v1/tools/verify`); Ed25519 keys for signing too | ## 1. Inventory the keys List every key that signs, with its algorithm, where it lives, how often it signs and what verifies it: user wallets, validator or block-producer keys, bridge and multisig keys, governance keys, node-to-node transport keys, and the keys that sign your node and wallet releases. ## 2. Start where the chain does not change: releases Release signing moves today, with no protocol change. Create an ML-DSA-65 key in Aegis Cloud and sign the release's checksums file: ```bash curl -sS -X POST "$AEGIS_URL/api/v1/keys" -H "Authorization: Bearer $AEGIS_API_KEY" \ -H "Content-Type: application/json" -d '{"name": "node-releases", "algorithm": "ml-dsa-65"}' sha256sum node-v1.2.3-* > SHA256SUMS curl -sS -X POST "$AEGIS_URL/api/v1/keys/node-releases/sign" -H "Authorization: Bearer $AEGIS_API_KEY" \ -H "Content-Type: application/json" \ -d "{\"message\": \"$(base64 < SHA256SUMS | tr -d '\n')\"}" | jq -r .signature | base64 -d > SHA256SUMS.mldsa65.sig ``` Publish `SHA256SUMS.mldsa65.sig` and the public key (`GET /api/v1/keys/node-releases/public`) beside your current release signature, and keep both. Users and package maintainers can check the ML-DSA signature with any FIPS 204 implementation, or with `POST /api/v1/keys/node-releases/verify`. ## 3. Prototype on-chain signatures off chain With new test keys only, define a transaction that carries two signatures over the same bytes: the existing secp256k1 or Ed25519 signature, and an ML-DSA-65 signature. Verify the ML-DSA part with Aegis and with an independent implementation inside your client, so the format never depends on one vendor. Then measure what changes: | Signature | Public key | Signature | | --- | --- | --- | | secp256k1 ECDSA (today) | 33 bytes, compressed | 64 to 72 bytes | | ML-DSA-44 | 1,312 bytes | 2,420 bytes | | ML-DSA-65 | 1,952 bytes | 3,309 bytes | | SLH-DSA-SHA2-128s | 32 bytes | 7,856 bytes | Sizes are from FIPS 204 and FIPS 205. Measure transaction and block size, bandwidth, storage growth and verification time in your client, and record how you measured each. ## 4. Write the protocol proposal Your proposal, not Aegis, decides: - Which accounts and validators sign with what, and whether a hybrid (classical plus post-quantum) is required during the transition. - How a key migrates, for example a classically signed transaction that registers the account's post-quantum public key before a deadline. - When classical-only signatures stop being accepted, and how old signatures and lost keys are treated. - How validators hold their new keys, and how the size increase is paid for. ## 5. Validators and custody Keep validator and custody keys where they are today while you prototype on a test network. Aegis Core can hold post-quantum signing keys in its vault under dual control, with every signature in the audit chain; keys held in an HSM are (Planned). ## Rules for this work - Never move, import, export or expose a key that holds funds or stake. Use new test keys. - Never broadcast a test transaction to a main network. - Keep every classical path working until the new one is verified and the protocol change is live. ## Planned, not available yet - SDKs: (Planned). Aegis offers no chain-specific SDK or wallet integration. - Composite ML-DSA in Aegis Cloud: (Planned) (Aegis Core has it). - HSM-held keys for validators in Aegis Core: (Planned). --- Source: https://docs.qblackbit.com/guides/government # 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-.aegisbundle`), the verifier (`aegis-verify--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 --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. --- Source: https://docs.qblackbit.com/prompts/ # Prompt library Each prompt is a self-contained brief you paste into **your own** AI agent (Claude Code, Codex, Cursor, Copilot or any other), so it understands Aegis and does the migration work through it, step by step, with you approving each change. qblackbit runs no agent of its own here: the work happens in your tools, under your control. | Prompt | For | Aegis edition | | --- | --- | --- | | [Migrate a personal project](https://docs.qblackbit.com/prompts/developer-project.md) | A developer with one repository | Aegis Cloud | | [Prepare a small business](https://docs.qblackbit.com/prompts/small-business.md) | An owner or IT person with a general-purpose assistant | Aegis Cloud | | [Pilot a bank's migration on Aegis Core](https://docs.qblackbit.com/prompts/bank.md) | A bank's engineering team, inside its network | Aegis Core | | [Add post-quantum signatures to a blockchain project](https://docs.qblackbit.com/prompts/blockchain.md) | A protocol, validator or wallet team | Aegis Cloud, Aegis Core | | [Plan a government's air-gapped installation](https://docs.qblackbit.com/prompts/government.md) | An agency team, inside its isolated environment | Aegis Core | ## What every brief contains - **The goal**, in one paragraph. - **What Aegis is**, with links to [`llms.txt`](https://docs.qblackbit.com/llms.txt) and [`llms-full.txt`](https://docs.qblackbit.com/llms-full.txt) so the agent reads the real documentation instead of guessing. - **The exact steps**, with the endpoints or commands to use, and a stop after every step that changes something. - **How to verify success.** - **Safety rules**: never paste a secret into the chat; use a credential made for the task with the least power that works (a `developer` API key in the cloud, or a scoped token that expires in Aegis Core); show every change as a diff before applying it; keep the classical algorithms working until the new path is verified. - **What is not available yet**, so the agent never tries to use a planned feature. ## Before you paste one 1. Make the credential yourself, and put it where the agent can read it without seeing it in the chat: an environment variable such as `AEGIS_API_KEY`, or a file. 2. Open your agent in the repository or folder it should work in. 3. Paste the brief, then review every diff the agent proposes before you approve it. 4. When the work is done, revoke the credential. ## For tools and integrations The library is also published as data: [`/prompts.json`](https://docs.qblackbit.com/prompts.json) holds every prompt with its rendered text, and `/prompts/.txt` holds one as plain text, for example [`/prompts/developer-project.txt`](https://docs.qblackbit.com/prompts/developer-project.txt). Both are generated from the same source as these pages. --- Source: https://docs.qblackbit.com/prompts/developer-project # Migrate a personal project For one repository: find RSA and elliptic-curve use in code and configuration, then move signatures to ML-DSA-65 and encryption to a recipient to an ML-KEM based KEM through Aegis Cloud. For: A developer with one repository and a coding agent. Works with [Aegis Cloud](https://docs.qblackbit.com/quickstart/cloud.md). The human version of this brief is the guide [migrate a personal project](https://docs.qblackbit.com/guides/developer-project.md). Copy everything in the block below into your agent. ```text Brief for my AI agent: Migrate a personal project with Aegis by qblackbit (Aegis Cloud) Source: https://docs.qblackbit.com/prompts/developer-project (version 1, 2026-12-04) GOAL Find every place this repository uses classical public-key cryptography (RSA, ECDSA, EdDSA, ECDH, X25519, Diffie-Hellman), and move the ones that should change to post-quantum algorithms through Aegis Cloud: signatures to ML-DSA-65 first, then encryption to a recipient to an ML-KEM based KEM. The classical path keeps working until the new one is verified. WHAT AEGIS IS Aegis is qblackbit's post-quantum cryptography platform. Aegis Cloud (Free and Pro, at https://aegis.qblackbit.com) holds an organisation's keys in Aegis Core and exposes key creation, signing, verification, key encapsulation and hashing through an HTTPS API, with ML-DSA (FIPS 204), ML-KEM (FIPS 203) and SLH-DSA (FIPS 205) and hybrids such as X25519 + ML-KEM-768. Aegis Core (Enterprise) runs the same engine and vault on the customer's own machines, air-gapped if needed, with no connection to qblackbit. Before you start, read https://docs.qblackbit.com/llms.txt and the pages it links to; https://docs.qblackbit.com/llms-full.txt has every page in one file. What is built and what is planned: https://docs.qblackbit.com/overview/status. WHAT YOU ARE WORKING WITH - The account is on Aegis Cloud Free unless I say Pro: 10,000 metered operations a month, 60 requests a minute, 10 keys, the algorithms ml-dsa-65 and x25519-ml-kem-768, and the hashes sha2-256, sha2-384, sha2-512, sha3-256 and sha3-512. Check with GET /api/v1/algorithms and GET /api/v1/usage instead of assuming. - Base URL https://aegis.qblackbit.com (I set AEGIS_URL to it). Every call sends Authorization: Bearer $AEGIS_API_KEY and JSON; binary fields are standard base64 with padding; a body carries at most 1 MiB of data. Errors are JSON {"error", "code"}. - Keys made in Aegis Cloud keep their private half in its vault: the project sends a message and gets a signature back. The cloud API encapsulates but does not decapsulate, and exporting a cloud key is not available yet: whoever must decapsulate makes and holds that key pair where they run. - TLS and SSH settings are not migrated through Aegis: they change in that software's own configuration (hybrid key exchange such as X25519MLKEM768 in TLS 1.3, or mlkem768x25519-sha256 in OpenSSH). CHOOSING ALGORITHMS: QBLACKBIT HYBRID PROFILES For each job (TLS, data at rest, archives, messaging, IoT, VPN, and signatures for code, firmware, documents, certificates, tokens or blockchains), pick the qblackbit hybrid profile at the level the data needs from https://docs.qblackbit.com/profiles/ and use exactly the algorithms and parameters its specification names, checked against its test vectors. Asking Aegis for a profile by name is Planned, so name the profile in your plan and the algorithms in the calls. If the catalogue is not published yet, use the algorithms this brief names, and say which profile you would have picked once it is. STEPS (stop after each step that changes something and wait for my approval) 1. Inventory without changing anything. Search the code, configuration, CI files, Dockerfiles, infrastructure files and dependency manifests for classical public-key use, for example: RSA, ECDSA, Ed25519, X25519, ECDH, secp256k1, P-256, prime256v1, RS256, ES256, EdDSA, generateKeyPair, KeyPairGenerator, createSign, crypto/rsa, crypto/ecdsa, cryptography.hazmat, openssl genrsa, openssl ecparam, ssh-keygen, BEGIN RSA PRIVATE KEY, BEGIN EC PRIVATE KEY, BEGIN PRIVATE KEY, jwt, jose, tls. For each hit record the file and line, the algorithm, the purpose (signing, verification, key exchange, encryption, TLS or SSH configuration), where the key lives, and who verifies or decrypts. 2. Classify each finding: (a) signatures this project makes, such as release, token or webhook signing, which move to an ML-DSA-65 key in Aegis Cloud; (b) data encrypted to a recipient's public key, which moves to an ML-KEM based KEM, the recipient holding the private key; (c) protocol settings such as TLS or SSH, which change in that software's configuration, not through Aegis; (d) code the project does not own, which you list and leave. Show me the table and wait for my decisions. 3. Check the account: GET /api/v1/algorithms for what the plan allows and GET /api/v1/usage for what is left this month. If the plan lacks an algorithm the change needs, stop and tell me. 4. After I approve the plan, create one signing key per purpose: POST /api/v1/keys with {"name": "release-signing", "algorithm": "ml-dsa-65"}. Keep key names in configuration, not in code. 5. Add one small client module that uses the language's standard HTTP client (no new dependency unless I agree). Sign with POST /api/v1/keys/{name}/sign and {"message": }, which returns {"version", "signature"}; verify with POST /api/v1/keys/{name}/verify and {"message", "signature", "version"}, which returns {"valid": true or false}; fetch a public key with GET /api/v1/keys/{name}/public. Read AEGIS_URL and AEGIS_API_KEY from the environment. Handle the error codes quota, rate_limited, unavailable, invalid and not_found explicitly. 6. Sign twice during the transition: keep producing the classical signature, add the ML-DSA-65 signature beside it, and accept either while verifiers move. Record which one verified. 7. For encryption to a recipient, the recipient makes the KEM key pair where they will decapsulate and gives you the public key. Encapsulate with POST /api/v1/encapsulate and {"algorithm": , "public_key": }, which returns ciphertext and shared_secret. Prefer ml-kem-768 (Pro). On Free the only KEM is x25519-ml-kem-768, the TLS 1.3 hybrid group, which relies on the TLS transcript: outside TLS, derive the data key with HKDF-SHA-256 over shared_secret with the ciphertext and the recipient's public key in the info, as HPKE does. Send the ciphertext with the data; never log shared_secret. Ask me before building this step. 8. Write tests: sign then verify returns {"valid": true}; a changed message or signature returns {"valid": false}; the classical path still passes. Run tests that call the live API only after I agree, because each call is metered. HOW TO VERIFY SUCCESS - The inventory table lists every hit with its class and my decision. - GET /api/v1/keys lists each new key with the algorithm we agreed. - The tests show a valid round trip, a refused tampered message, and the classical path unchanged. - GET /api/v1/usage accounts for the operations the tests used, and quota and rate_limited answers are handled in code. - No API key, private key, shared secret or token appears in the code, logs, test output or git history (search for agk_). SAFETY RULES (follow every one) - Never ask me to paste a secret into this chat, and never print, log or commit one: API keys, tokens, passwords, private keys, passphrases, unseal shares, shared secrets. Read each from an environment variable or a file that I set up myself. - Show me every change as a diff and apply nothing until I approve it. Do not push, deploy or publish anything. - Keep the classical algorithms working beside the post-quantum ones until the new path is verified in tests and then in production. Never delete, disable or rotate away an existing key, certificate or setting in this task. - Use only the endpoints, commands and options written in the qblackbit docs (llms.txt). If something you need is marked Planned, or you cannot find it there, stop and tell me; never invent an endpoint, package, flag or algorithm name. - In anything you write, name the standard algorithm that protects each thing (for example ML-DSA-65, FIPS 204). Never call anything quantum-proof, and never claim a certification or an audit. - Use an API key made for this task: in the Aegis Cloud app, under API keys, an admin makes one with the developer role (auditor if the task only reads), labelled for this task. I put it in the environment variable AEGIS_API_KEY. Cloud API keys do not expire on their own yet (expiring keys are Planned), so tell me to revoke it in the app as soon as we finish. - Call the API only from server-side code, scripts or your own tools, never from a web page or a mobile app, where the key would be exposed. - Every create, sign, verify, encapsulate and hash call is metered against the plan's monthly operations. Ask me before any loop, batch or load test, and never retry blindly: on rate_limited wait, on quota stop and tell me. NOT AVAILABLE YET (do not try to use these) - Official SDKs for TypeScript, Python, Go, Java, .NET, Rust and C are Planned: call the HTTPS API directly. - Asking for a policy name such as qbb-hybrid-1 instead of an algorithm is Planned. - Expiring cloud API keys are Planned: revoke the task's key when done. - Exporting a cloud key wrapped to your own key is not available yet, and the cloud API does not decapsulate. WHEN YOU FINISH Report what you found (as a table), each change you made with my approval, how you verified it, and what is left, including anything that waits for a planned feature. Remind me to revoke the credential you used. ``` ## How to use it 1. Make the credential the brief asks for yourself, and put it in an environment variable or a file the agent can read. Never paste it into the chat. 2. Paste the brief into your agent (Claude Code, Codex, Cursor, Copilot or any other) in the repository or folder it should work in. 3. Review each diff the agent shows you before you approve it. Keep the classical path until the new one is verified. 4. When the work is done, revoke the credential. ## What the brief contains - **Goal:** Find every place this repository uses classical public-key cryptography (RSA, ECDSA, EdDSA, ECDH, X25519, Diffie-Hellman), and move the ones that should change to post-quantum algorithms through Aegis Cloud: signatures to ML-DSA-65 first, then encryption to a recipient to an ML-KEM based KEM. The classical path keeps working until the new one is verified. - **Steps:** 8, each with the exact endpoints or commands to use. - **Checks:** 5 ways to verify success. - **Safety rules:** never paste secrets into chat, a credential made for the task, diffs reviewed before they apply, classical fallbacks kept until verified. - **Not available yet:** 4 items marked Planned, so the agent does not try to use them. --- Source: https://docs.qblackbit.com/prompts/small-business # Prepare a small business For an owner or an IT person: build an inventory of what the business relies on, ask providers the right questions, and start signing with post-quantum keys in Aegis Cloud. For: A small business owner or IT person with a general-purpose AI assistant. Works with [Aegis Cloud](https://docs.qblackbit.com/quickstart/cloud.md). The human version of this brief is the guide [prepare a small business](https://docs.qblackbit.com/guides/small-business.md). Copy everything in the block below into your agent. ```text Brief for my AI agent: Prepare a small business with Aegis by qblackbit (Aegis Cloud) Source: https://docs.qblackbit.com/prompts/small-business (version 1, 2026-12-04) GOAL Help me find where my business relies on classical public-key cryptography, decide what to change first, and start using post-quantum signatures from Aegis Cloud for what we sign, without breaking anything that works today. WHAT AEGIS IS Aegis is qblackbit's post-quantum cryptography platform. Aegis Cloud (Free and Pro, at https://aegis.qblackbit.com) holds an organisation's keys in Aegis Core and exposes key creation, signing, verification, key encapsulation and hashing through an HTTPS API, with ML-DSA (FIPS 204), ML-KEM (FIPS 203) and SLH-DSA (FIPS 205) and hybrids such as X25519 + ML-KEM-768. Aegis Core (Enterprise) runs the same engine and vault on the customer's own machines, air-gapped if needed, with no connection to qblackbit. Before you start, read https://docs.qblackbit.com/llms.txt and the pages it links to; https://docs.qblackbit.com/llms-full.txt has every page in one file. What is built and what is planned: https://docs.qblackbit.com/overview/status. WHAT YOU ARE WORKING WITH - We are a small business: a website and domain, email, a few cloud services (accounting, customer records, file sharing), laptops and phones, perhaps remote access and a small app. Most of that cryptography belongs to our providers; our part is to know it, ask them, and change our own settings. - Aegis Cloud Free gives us one organisation with members and roles, up to 10 keys, ML-DSA-65 signatures, the X25519 + ML-KEM-768 hybrid KEM and hashing through an HTTPS API at https://aegis.qblackbit.com, with 10,000 metered operations a month. Pro has a higher allowance and every NIST standard set the cloud offers; it starts with a request from the app. Keys stay in the cloud's vault: exporting them is not available yet. - A large quantum computer able to break today's public-key cryptography does not exist yet, but traffic recorded today could be decrypted once one does. Data that must stay confidential for many years comes first. CHOOSING ALGORITHMS: QBLACKBIT HYBRID PROFILES For each job (TLS, data at rest, archives, messaging, IoT, VPN, and signatures for code, firmware, documents, certificates, tokens or blockchains), pick the qblackbit hybrid profile at the level the data needs from https://docs.qblackbit.com/profiles/ and use exactly the algorithms and parameters its specification names, checked against its test vectors. Asking Aegis for a profile by name is Planned, so name the profile in your plan and the algorithms in the calls. If the catalogue is not published yet, use the algorithms this brief names, and say which profile you would have picked once it is. STEPS (stop after each step that changes something and wait for my approval) 1. Interview me to build the inventory: our domains and website hosting, email, each cloud service, remote access or VPN, devices, software we build, and what we sign (contracts, invoices, software, backups). For each, record the provider, the data it protects, and how long that data must stay confidential. 2. For each item, find what the provider publishes about post-quantum or hybrid key exchange and give me the link. Do not guess. Mark each one: already uses hybrid post-quantum key exchange, available but off (we can turn it on), on the provider's published plan, or unknown (we ask them; draft the question for me). 3. Rank the list: long-lived confidential data that crosses the internet first, then signatures that must stay valid for years, then the rest. 4. Guide me through Aegis Cloud while I click: sign up at https://aegis.qblackbit.com with Google or an email address, turn on the authenticator app in Settings, invite colleagues with the lowest role that works (auditor to read, developer to sign, admin only for people who manage keys and members), and make one API key with the developer role for you, labelled for this task. I set it as AEGIS_API_KEY myself. 5. Create one signing key for what we sign: POST /api/v1/keys with {"name": "documents", "algorithm": "ml-dsa-65"}. To sign a file larger than 1 MiB, compute its SHA3-256 digest on our machine and sign the digest with POST /api/v1/keys/{name}/sign; record which hash was used so a verifier does the same. Check signatures with POST /api/v1/keys/{name}/verify. 6. Publish or share the public key (GET /api/v1/keys/{name}/public) with the people who check our signatures, beside the signing method we use today, and keep both until they can check ML-DSA. 7. Write a one-page plan: what we turn on now, what we ask each provider and by when, what waits, and who owns each item. HOW TO VERIFY SUCCESS - Every inventory row has a source link or a drafted question for the provider. - A test signature verifies with POST /api/v1/keys/{name}/verify ({"valid": true}) and a changed file does not ({"valid": false}). - GET /api/v1/usage shows the operations we used; the plan page shows where our data is held. - Members have the lowest role that works, and the task's API key is revoked at the end. SAFETY RULES (follow every one) - Never ask me to paste a secret into this chat, and never print, log or commit one: API keys, tokens, passwords, private keys, passphrases, unseal shares, shared secrets. Read each from an environment variable or a file that I set up myself. - Show me every change as a diff and apply nothing until I approve it. Do not push, deploy or publish anything. - Keep the classical algorithms working beside the post-quantum ones until the new path is verified in tests and then in production. Never delete, disable or rotate away an existing key, certificate or setting in this task. - Use only the endpoints, commands and options written in the qblackbit docs (llms.txt). If something you need is marked Planned, or you cannot find it there, stop and tell me; never invent an endpoint, package, flag or algorithm name. - In anything you write, name the standard algorithm that protects each thing (for example ML-DSA-65, FIPS 204). Never call anything quantum-proof, and never claim a certification or an audit. - Use an API key made for this task: in the Aegis Cloud app, under API keys, an admin makes one with the developer role (auditor if the task only reads), labelled for this task. I put it in the environment variable AEGIS_API_KEY. Cloud API keys do not expire on their own yet (expiring keys are Planned), so tell me to revoke it in the app as soon as we finish. - Call the API only from server-side code, scripts or your own tools, never from a web page or a mobile app, where the key would be exposed. - Every create, sign, verify, encapsulate and hash call is metered against the plan's monthly operations. Ask me before any loop, batch or load test, and never retry blindly: on rate_limited wait, on quota stop and tell me. NOT AVAILABLE YET (do not try to use these) - Quantum-safe HTTPS in front of an existing website (Aegis Gate) is Planned. - Automatic discovery of keys and certificates (Aegis Discover) is Planned: the inventory is built by hand for now. - Card payment for Pro and prepaid credits are Planned: today Pro starts with a request in the app. WHEN YOU FINISH Report what you found (as a table), each change you made with my approval, how you verified it, and what is left, including anything that waits for a planned feature. Remind me to revoke the credential you used. ``` ## How to use it 1. Make the credential the brief asks for yourself, and put it in an environment variable or a file the agent can read. Never paste it into the chat. 2. Paste the brief into your agent (Claude Code, Codex, Cursor, Copilot or any other) in the repository or folder it should work in. 3. Review each diff the agent shows you before you approve it. Keep the classical path until the new one is verified. 4. When the work is done, revoke the credential. ## What the brief contains - **Goal:** Help me find where my business relies on classical public-key cryptography, decide what to change first, and start using post-quantum signatures from Aegis Cloud for what we sign, without breaking anything that works today. - **Steps:** 7, each with the exact endpoints or commands to use. - **Checks:** 4 ways to verify success. - **Safety rules:** never paste secrets into chat, a credential made for the task, diffs reviewed before they apply, classical fallbacks kept until verified. - **Not available yet:** 3 items marked Planned, so the agent does not try to use them. --- Source: https://docs.qblackbit.com/prompts/bank # Pilot a bank's migration on Aegis Core For a bank's engineering team: inventory, map to a policy pack, pilot keys, envelopes, rotation and re-wrap under dual control on an on-premises Aegis Core, and produce evidence that checks offline. For: A bank's engineering team with a coding agent inside the bank's network. Works with [Aegis Core](https://docs.qblackbit.com/quickstart/core.md). The human version of this brief is the guide [pilot a bank's migration on aegis core](https://docs.qblackbit.com/guides/bank.md). Copy everything in the block below into your agent. ```text Brief for my AI agent: Pilot a bank's migration on Aegis Core with Aegis by qblackbit (Aegis Core, on our own machines) Source: https://docs.qblackbit.com/prompts/bank (version 1, 2026-12-04) GOAL Help our engineering team prepare and pilot the move of our cryptography to post-quantum standards with Aegis Core, our on-premises installation, in a test environment, and produce evidence our risk and audit functions can check without trusting you or the vendor. WHAT AEGIS IS Aegis is qblackbit's post-quantum cryptography platform. Aegis Cloud (Free and Pro, at https://aegis.qblackbit.com) holds an organisation's keys in Aegis Core and exposes key creation, signing, verification, key encapsulation and hashing through an HTTPS API, with ML-DSA (FIPS 204), ML-KEM (FIPS 203) and SLH-DSA (FIPS 205) and hybrids such as X25519 + ML-KEM-768. Aegis Core (Enterprise) runs the same engine and vault on the customer's own machines, air-gapped if needed, with no connection to qblackbit. Before you start, read https://docs.qblackbit.com/llms.txt and the pages it links to; https://docs.qblackbit.com/llms-full.txt has every page in one file. What is built and what is planned: https://docs.qblackbit.com/overview/status. WHAT YOU ARE WORKING WITH - Aegis Core runs on our own machines (the Enterprise edition), with no connection to qblackbit. Its API is at the address I give you; it speaks TLS 1.3 with hybrid post-quantum key exchange only, and its OpenAPI document is at GET /v1/openapi.json. You work only against our test installation and tenant, never production. - Built-in policy packs: baseline, us-nist-ir8547, us-cnsa-2.0, de-bsi-tr02102 and fr-anssi-hybrid. GET /v1/policy shows the one in force; our policy owner decides which applies. - Every operation is written to a hash-chained audit log with signed checkpoints; operations our access policy lists (by default destroy, export and changes to access) need a second person's approval. CHOOSING ALGORITHMS: QBLACKBIT HYBRID PROFILES For each job (TLS, data at rest, archives, messaging, IoT, VPN, and signatures for code, firmware, documents, certificates, tokens or blockchains), pick the qblackbit hybrid profile at the level the data needs from https://docs.qblackbit.com/profiles/ and use exactly the algorithms and parameters its specification names, checked against its test vectors. Asking Aegis for a profile by name is Planned, so name the profile in your plan and the algorithms in the calls. If the catalogue is not published yet, use the algorithms this brief names, and say which profile you would have picked once it is. STEPS (stop after each step that changes something and wait for my approval) 1. Build the inventory from the material I give you (configuration exports, code repositories, certificate lists, key-manager and HSM reports): each use of RSA, ECDSA, ECDH, EdDSA and Diffie-Hellman with the system, owner, purpose, protocol and how long the data must stay confidential. Do not connect to any system I have not named. 2. Map each item to the policy pack in force: read the rules with GET /v1/policy and GET /v1/policy/packs/{id}, and the TLS, SSH, IKEv2, JOSE, COSE and X.509 values it allows with GET /v1/policy/protocols. Mark each item: allowed, allowed until a date, or to replace. 3. List the algorithms the installation can run with GET /v1/algorithms and choose, with me, the ones the pack allows for each purpose (for example ml-kem-768 or a hybrid such as x25519-ml-kem-768 for key establishment, ml-dsa-65 for signatures). 4. Pilot in the test tenant with test data: create keys with POST /v1/keys; sign and verify with POST /v1/keys/{name}/sign and POST /v1/keys/{name}/verify; encapsulate with POST /v1/tools/encapsulate to a key's public key (GET /v1/keys/{name}/public) and decapsulate with POST /v1/keys/{name}/decapsulate; encrypt into self-describing envelopes with POST /v1/keys/{name}/encrypt and open them with POST /v1/keys/{name}/decrypt, using a key the pack allows for encryption. 5. Rehearse a rotation: POST /v1/keys/{name}/rotate, check that old envelopes still decrypt, then move them to the newest version with a re-wrap job (POST /v1/rewrap/jobs, progress with GET /v1/rewrap/jobs/{id}, results with GET /v1/rewrap/jobs/{id}/results). 6. Respect dual control: read the tenant's rules with GET /v1/sys/access/policy. When a request answers 202 with an approval, stop and ask the team's approver; the request is then sent again unchanged with the x-aegis-approval header. 7. Produce the evidence: the pilot's audit records with GET /v1/audit/export, a signed checkpoint with GET /v1/audit/checkpoint, and the commands for the audit team to check both offline: aegis-verify audit --records --checkpoint . 8. Write the migration plan per system: target algorithm, hybrid or not (as the pack says), owner, order, fallback and the test evidence that closes it. HOW TO VERIFY SUCCESS - Every pilot operation appears in the audit export; GET /v1/audit/verify reports an intact chain, and aegis-verify audit passes offline. - Round trips pass: decrypt(encrypt(x)) returns x, decapsulation returns the same shared secret as encapsulation, sign then verify is valid, and tampered inputs fail. - After rotation, old envelopes still decrypt and the re-wrap job reports no failed items. - No token, passphrase, share, private key or customer data appears in the output, the repositories or the logs. SAFETY RULES (follow every one) - Never ask me to paste a secret into this chat, and never print, log or commit one: API keys, tokens, passwords, private keys, passphrases, unseal shares, shared secrets. Read each from an environment variable or a file that I set up myself. - Show me every change as a diff and apply nothing until I approve it. Do not push, deploy or publish anything. - Keep the classical algorithms working beside the post-quantum ones until the new path is verified in tests and then in production. Never delete, disable or rotate away an existing key, certificate or setting in this task. - Use only the endpoints, commands and options written in the qblackbit docs (llms.txt). If something you need is marked Planned, or you cannot find it there, stop and tell me; never invent an endpoint, package, flag or algorithm name. - In anything you write, name the standard algorithm that protects each thing (for example ML-DSA-65, FIPS 204). Never call anything quantum-proof, and never claim a certification or an audit. - Use a token made for this task: an administrator issues it with POST /v1/sys/tokens with the operator role (auditor if the task only reads), a scope limited to the routes, operations and key names of this task, and expires_in of a few hours (for example 14400 seconds). It is shown once and stored in a file you can read. When we finish, the administrator revokes it with POST /v1/sys/tokens/{name}/revoke. - Work only against the installation and tenant I name, with test data. Never send production or customer data anywhere, including this chat. - Never approve a request under dual control yourself. When a call answers 202 with an approval, stop: a person who may perform that operation decides. - Never call system routes that change the installation (unseal, seal, rekey, backups, switches, tenants, updates) unless I ask for that exact step. NOT AVAILABLE YET (do not try to use these) - Automatic discovery across the estate (Aegis Discover) and migration orchestration (Aegis Command) are Planned: the inventory is built from exports you are given. - PKCS#11, KMIP, JCA and OpenSSL provider adapters, HSM-held root keys and clustering are Planned. - SDKs are Planned: use the REST API (or gRPC) described by GET /v1/openapi.json. WHEN YOU FINISH Report what you found (as a table), each change you made with my approval, how you verified it, and what is left, including anything that waits for a planned feature. Remind me to revoke the credential you used. ``` ## How to use it 1. Make the credential the brief asks for yourself, and put it in an environment variable or a file the agent can read. Never paste it into the chat. 2. Paste the brief into your agent (Claude Code, Codex, Cursor, Copilot or any other) in the repository or folder it should work in. 3. Review each diff the agent shows you before you approve it. Keep the classical path until the new one is verified. 4. When the work is done, revoke the credential. ## What the brief contains - **Goal:** Help our engineering team prepare and pilot the move of our cryptography to post-quantum standards with Aegis Core, our on-premises installation, in a test environment, and produce evidence our risk and audit functions can check without trusting you or the vendor. - **Steps:** 8, each with the exact endpoints or commands to use. - **Checks:** 4 ways to verify success. - **Safety rules:** never paste secrets into chat, a credential made for the task, diffs reviewed before they apply, classical fallbacks kept until verified. - **Not available yet:** 3 items marked Planned, so the agent does not try to use them. --- Source: https://docs.qblackbit.com/prompts/blockchain # Add post-quantum signatures to a blockchain project For a protocol or wallet team: sign releases with ML-DSA now, prototype dual signatures off chain, and write down what the chain itself must change. For: A blockchain protocol, validator or wallet team with a coding agent. Works with [Aegis Cloud](https://docs.qblackbit.com/quickstart/cloud.md). The human version of this brief is the guide [add post-quantum signatures to a blockchain project](https://docs.qblackbit.com/guides/blockchain.md). Copy everything in the block below into your agent. ```text Brief for my AI agent: Add post-quantum signatures to a blockchain project with Aegis by qblackbit (Aegis Cloud) Source: https://docs.qblackbit.com/prompts/blockchain (version 1, 2026-12-04) GOAL Assess and prototype post-quantum signatures for our blockchain project (wallets, validators, release signing) with ML-DSA and SLH-DSA through Aegis, and write down exactly what the protocol itself must change, without touching any key that holds funds or stake. WHAT AEGIS IS Aegis is qblackbit's post-quantum cryptography platform. Aegis Cloud (Free and Pro, at https://aegis.qblackbit.com) holds an organisation's keys in Aegis Core and exposes key creation, signing, verification, key encapsulation and hashing through an HTTPS API, with ML-DSA (FIPS 204), ML-KEM (FIPS 203) and SLH-DSA (FIPS 205) and hybrids such as X25519 + ML-KEM-768. Aegis Core (Enterprise) runs the same engine and vault on the customer's own machines, air-gapped if needed, with no connection to qblackbit. Before you start, read https://docs.qblackbit.com/llms.txt and the pages it links to; https://docs.qblackbit.com/llms-full.txt has every page in one file. What is built and what is planned: https://docs.qblackbit.com/overview/status. WHAT YOU ARE WORKING WITH - Aegis provides post-quantum keys and signatures: ML-DSA (FIPS 204) and SLH-DSA (FIPS 205). In Aegis Cloud, Free offers ml-dsa-65; Pro adds ml-dsa-44, ml-dsa-87 and six SLH-DSA sets. Aegis Core, run on our own machines, also offers composite ML-DSA (ML-DSA paired with ECDSA or Ed25519) and checks existing secp256k1 signatures (verification only). - Aegis does not change a chain's consensus or transaction format and offers no on-chain verifier. A chain accepts post-quantum signatures only after its own protocol upgrade. - Size matters on chain: an ML-DSA-65 public key is 1,952 bytes and a signature 3,309 bytes (FIPS 204); an SLH-DSA-SHA2-128s public key is 32 bytes and a signature 7,856 bytes (FIPS 205); a secp256k1 ECDSA public key is 33 bytes compressed and a signature about 64 to 72 bytes. CHOOSING ALGORITHMS: QBLACKBIT HYBRID PROFILES For each job (TLS, data at rest, archives, messaging, IoT, VPN, and signatures for code, firmware, documents, certificates, tokens or blockchains), pick the qblackbit hybrid profile at the level the data needs from https://docs.qblackbit.com/profiles/ and use exactly the algorithms and parameters its specification names, checked against its test vectors. Asking Aegis for a profile by name is Planned, so name the profile in your plan and the algorithms in the calls. If the catalogue is not published yet, use the algorithms this brief names, and say which profile you would have picked once it is. STEPS (stop after each step that changes something and wait for my approval) 1. Inventory the project's keys: user wallets, validator or block-producer keys, bridge and multisig keys, governance keys, node-to-node transport, and the signing of node and wallet releases. For each: algorithm, where the key lives, how often it signs, and what verifies it (on chain, in clients, by users). 2. Start where nothing on chain changes: release signing. Create an ML-DSA-65 key (POST /api/v1/keys with {"name": "release-signing", "algorithm": "ml-dsa-65"}), sign the release's checksums file with POST /api/v1/keys/{name}/sign (files over 1 MiB: sign their SHA3-256 digest and say so), publish the public key from GET /api/v1/keys/{name}/public beside the current release key, and keep the current signatures. 3. Prototype dual signatures off chain with new test keys only: the existing secp256k1 or Ed25519 signature plus an ML-DSA-65 signature over the same transaction bytes. Verify the ML-DSA part with POST /api/v1/keys/{name}/verify and with an independent ML-DSA implementation in the client, so the format is not tied to one vendor. 4. Measure what changes: transaction and block size, bandwidth, storage and verification time in the client, for ML-DSA-65 and, on Pro, for SLH-DSA-SHA2-128s. Record how each number was measured. 5. Write the protocol change proposal: which accounts and validators sign with what, how a key is migrated (for example a classically signed transaction that registers the post-quantum public key), when classical-only signatures stop being accepted, and how old signatures and lost keys are handled. HOW TO VERIFY SUCCESS - The release checksums verify with the published ML-DSA public key and with the current key. - The prototype's dual signatures verify in Aegis and in the independent implementation; changing one byte makes each check fail. - The proposal states every size and timing figure with its method. SAFETY RULES (follow every one) - Never ask me to paste a secret into this chat, and never print, log or commit one: API keys, tokens, passwords, private keys, passphrases, unseal shares, shared secrets. Read each from an environment variable or a file that I set up myself. - Show me every change as a diff and apply nothing until I approve it. Do not push, deploy or publish anything. - Keep the classical algorithms working beside the post-quantum ones until the new path is verified in tests and then in production. Never delete, disable or rotate away an existing key, certificate or setting in this task. - Use only the endpoints, commands and options written in the qblackbit docs (llms.txt). If something you need is marked Planned, or you cannot find it there, stop and tell me; never invent an endpoint, package, flag or algorithm name. - In anything you write, name the standard algorithm that protects each thing (for example ML-DSA-65, FIPS 204). Never call anything quantum-proof, and never claim a certification or an audit. - Use an API key made for this task: in the Aegis Cloud app, under API keys, an admin makes one with the developer role (auditor if the task only reads), labelled for this task. I put it in the environment variable AEGIS_API_KEY. Cloud API keys do not expire on their own yet (expiring keys are Planned), so tell me to revoke it in the app as soon as we finish. - Call the API only from server-side code, scripts or your own tools, never from a web page or a mobile app, where the key would be exposed. - Every create, sign, verify, encapsulate and hash call is metered against the plan's monthly operations. Ask me before any loop, batch or load test, and never retry blindly: on rate_limited wait, on quota stop and tell me. - Never move, import, export or expose a wallet, validator or bridge key that holds funds or stake. Use new test keys only. - Never broadcast a transaction to a main network, and never change node configuration outside a test network. NOT AVAILABLE YET (do not try to use these) - General SDKs are Planned; Aegis offers no chain-specific SDK or wallet integration. - Hardware-held (HSM) keys for validators in Aegis Core are Planned. - Composite ML-DSA is offered by Aegis Core; in Aegis Cloud it is Planned. WHEN YOU FINISH Report what you found (as a table), each change you made with my approval, how you verified it, and what is left, including anything that waits for a planned feature. Remind me to revoke the credential you used. ``` ## How to use it 1. Make the credential the brief asks for yourself, and put it in an environment variable or a file the agent can read. Never paste it into the chat. 2. Paste the brief into your agent (Claude Code, Codex, Cursor, Copilot or any other) in the repository or folder it should work in. 3. Review each diff the agent shows you before you approve it. Keep the classical path until the new one is verified. 4. When the work is done, revoke the credential. ## What the brief contains - **Goal:** Assess and prototype post-quantum signatures for our blockchain project (wallets, validators, release signing) with ML-DSA and SLH-DSA through Aegis, and write down exactly what the protocol itself must change, without touching any key that holds funds or stake. - **Steps:** 5, each with the exact endpoints or commands to use. - **Checks:** 3 ways to verify success. - **Safety rules:** never paste secrets into chat, a credential made for the task, diffs reviewed before they apply, classical fallbacks kept until verified. - **Not available yet:** 3 items marked Planned, so the agent does not try to use them. --- Source: https://docs.qblackbit.com/prompts/government # Plan a government's air-gapped installation For an agency team: rehearse offline delivery, officer unseal and dual control, choose the policy pack, and build an evidence pack auditors verify without trusting the vendor. For: A government agency's team, working inside its own isolated environment. Works with [Aegis Core](https://docs.qblackbit.com/quickstart/core.md). The human version of this brief is the guide [plan a government's air-gapped installation](https://docs.qblackbit.com/guides/government.md). Copy everything in the block below into your agent. ```text Brief for my AI agent: Plan a government's air-gapped installation with Aegis by qblackbit (Aegis Core, on our own machines) Source: https://docs.qblackbit.com/prompts/government (version 1, 2026-12-04) GOAL Help our agency's team plan and rehearse an air-gapped Aegis Core installation and the first post-quantum migration steps under the national policy we follow, and produce evidence our auditors can verify without trusting you or the vendor. WHAT AEGIS IS Aegis is qblackbit's post-quantum cryptography platform. Aegis Cloud (Free and Pro, at https://aegis.qblackbit.com) holds an organisation's keys in Aegis Core and exposes key creation, signing, verification, key encapsulation and hashing through an HTTPS API, with ML-DSA (FIPS 204), ML-KEM (FIPS 203) and SLH-DSA (FIPS 205) and hybrids such as X25519 + ML-KEM-768. Aegis Core (Enterprise) runs the same engine and vault on the customer's own machines, air-gapped if needed, with no connection to qblackbit. Before you start, read https://docs.qblackbit.com/llms.txt and the pages it links to; https://docs.qblackbit.com/llms-full.txt has every page in one file. What is built and what is planned: https://docs.qblackbit.com/overview/status. WHAT YOU ARE WORKING WITH - Aegis Core (Enterprise) runs on our own device with no connection to the internet or to qblackbit. Releases arrive as signed bundles (.aegisbundle files) on physical media; the standalone aegis-verify checks a bundle offline against the update root whose SHA-256 we receive by a second route (letter, call or contract annex). - You run inside our isolated environment, or you work only from the documents and test data I give you. Nothing leaves the environment. - Built-in policy packs: baseline, us-nist-ir8547, us-cnsa-2.0, de-bsi-tr02102 and fr-anssi-hybrid. National algorithm modules run only under their own country's profile, and only where a citable standard exists. CHOOSING ALGORITHMS: QBLACKBIT HYBRID PROFILES For each job (TLS, data at rest, archives, messaging, IoT, VPN, and signatures for code, firmware, documents, certificates, tokens or blockchains), pick the qblackbit hybrid profile at the level the data needs from https://docs.qblackbit.com/profiles/ and use exactly the algorithms and parameters its specification names, checked against its test vectors. Asking Aegis for a profile by name is Planned, so name the profile in your plan and the algorithms in the calls. If the catalogue is not published yet, use the algorithms this brief names, and say which profile you would have picked once it is. STEPS (stop after each step that changes something and wait for my approval) 1. Write the transfer procedure as a two-person checklist: on the transfer station, compare the root's SHA-256 with the value received by the second route, run aegis-verify --trusted-root 1.root.json and compare the bundle's SHA-256; on the Aegis host, import with aegis update import, apply with aegis update apply and a health check (--health-command "{release}/bin/aegisd selftest"), and commit with aegis update commit only after the soak period. 2. Rehearse a rollback in the test installation (aegis update rollback) and record what the status shows (aegis update status). 3. Plan the vault's unseal by officers: Shamir shares handed in one by one with POST /v1/sys/unseal (progress with GET /v1/sys/unseal), who holds each share, and the dual-control rules for destroy, export and access changes (GET /v1/sys/access/policy). Officers handle shares and passphrases themselves; you never see them. 4. With the policy owner, choose the pack; activate it in the test installation with POST /v1/policy/activate and give the network teams the code points from GET /v1/policy/protocols. 5. Rehearse the core operations with test keys: POST /v1/keys; POST /v1/keys/{name}/sign and POST /v1/keys/{name}/verify; POST /v1/tools/encapsulate and POST /v1/keys/{name}/decapsulate; POST /v1/keys/{name}/encrypt and POST /v1/keys/{name}/decrypt; POST /v1/keys/{name}/rotate followed by a re-wrap job (POST /v1/rewrap/jobs). 6. Assemble the evidence pack: the audit export (GET /v1/audit/export) and a signed checkpoint (GET /v1/audit/checkpoint) checked offline with aegis-verify audit; the licence state (GET /v1/sys/licence); the release's SBOM, CBOM and build provenance from the verified bundle. 7. Write the migration roadmap per class of system, with the dates our regulator sets, citing each source. HOW TO VERIFY SUCCESS - aegis-verify accepts the bundle against the root whose digest came by the second route, and refuses a copy with one byte changed. - The rollback rehearsal returns to the previous release, and aegis update status records it. - The audit chain verifies offline with aegis-verify audit, and every rehearsed operation is in it. - No share, passphrase, token or production data appears in any output. SAFETY RULES (follow every one) - Never ask me to paste a secret into this chat, and never print, log or commit one: API keys, tokens, passwords, private keys, passphrases, unseal shares, shared secrets. Read each from an environment variable or a file that I set up myself. - Show me every change as a diff and apply nothing until I approve it. Do not push, deploy or publish anything. - Keep the classical algorithms working beside the post-quantum ones until the new path is verified in tests and then in production. Never delete, disable or rotate away an existing key, certificate or setting in this task. - Use only the endpoints, commands and options written in the qblackbit docs (llms.txt). If something you need is marked Planned, or you cannot find it there, stop and tell me; never invent an endpoint, package, flag or algorithm name. - In anything you write, name the standard algorithm that protects each thing (for example ML-DSA-65, FIPS 204). Never call anything quantum-proof, and never claim a certification or an audit. - Use a token made for this task: an administrator issues it with POST /v1/sys/tokens with the operator role (auditor if the task only reads), a scope limited to the routes, operations and key names of this task, and expires_in of a few hours (for example 14400 seconds). It is shown once and stored in a file you can read. When we finish, the administrator revokes it with POST /v1/sys/tokens/{name}/revoke. - Work only against the installation and tenant I name, with test data. Never send production or customer data anywhere, including this chat. - Never approve a request under dual control yourself. When a call answers 202 with an approval, stop: a person who may perform that operation decides. - Never connect anything to the internet for this work, and never propose a step that needs a connection to qblackbit: Aegis Core has none. - Never call system routes that change the installation (seal, rekey, backups, switches, tenants, updates) except the exact rehearsal steps I ask for. NOT AVAILABLE YET (do not try to use these) - Production release signing with the roots made at the key ceremony is Planned: the ceremony has not been held yet. Until then, verify against the root qblackbit gives you and confirm its digest by a second route. - The trusted root compiled into aegis-verify, optional online update checks, and HSM- or TPM-held root keys are Planned. - A customer's own sovereign algorithm module is Planned. WHEN YOU FINISH Report what you found (as a table), each change you made with my approval, how you verified it, and what is left, including anything that waits for a planned feature. Remind me to revoke the credential you used. ``` ## How to use it 1. Make the credential the brief asks for yourself, and put it in an environment variable or a file the agent can read. Never paste it into the chat. 2. Paste the brief into your agent (Claude Code, Codex, Cursor, Copilot or any other) in the repository or folder it should work in. 3. Review each diff the agent shows you before you approve it. Keep the classical path until the new one is verified. 4. When the work is done, revoke the credential. ## What the brief contains - **Goal:** Help our agency's team plan and rehearse an air-gapped Aegis Core installation and the first post-quantum migration steps under the national policy we follow, and produce evidence our auditors can verify without trusting you or the vendor. - **Steps:** 7, each with the exact endpoints or commands to use. - **Checks:** 4 ways to verify success. - **Safety rules:** never paste secrets into chat, a credential made for the task, diffs reviewed before they apply, classical fallbacks kept until verified. - **Not available yet:** 3 items marked Planned, so the agent does not try to use them. --- Source: https://docs.qblackbit.com/api/ # API overview Aegis has two APIs. Pick the one for where your keys live. | | Aegis Cloud API | Aegis Core API | | --- | --- | --- | | Base URL | `https://aegis.qblackbit.com` | Your own daemon, for example `https://aegis.internal.example:8200` | | Routes | `/api/v1/…` for keys and operations | `/v1/…`, REST and gRPC on one listener | | Authentication | An API key: `Authorization: Bearer agk_…` | A token: `Authorization: Bearer agt_…`; or mutual TLS; or OpenID Connect sessions | | Roles | `developer`, `auditor` | `auditor`, `operator`, `admin`, custom roles, `emergency`, `monitor` | | Reference | [Cloud API](https://docs.qblackbit.com/api/cloud.md) | [Core API](https://docs.qblackbit.com/api/core/index.md), service by service | | OpenAPI document | [`/openapi/aegis-cloud-v1.json`](https://docs.qblackbit.com/openapi/aegis-cloud-v1.json) | [`/openapi/aegis-core-v1.json`](https://docs.qblackbit.com/openapi/aegis-core-v1.json), and `GET /v1/openapi.json` on every daemon | Both references are generated from those OpenAPI documents when this site is built. The Core document comes from the Aegis Core 0.13.0 release; the cloud does not publish one yet, so qblackbit keeps the cloud's document from the service's source and checks it against the live service. ## Conventions - **JSON in and out.** Binary values (messages, keys, signatures, ciphertexts, shared secrets) are standard base64 with padding. - **Size.** A request body holds at most 1 MiB of data. - **Never cached.** Every answer carries `Cache-Control: no-store`, because answers can hold key material. - **From servers, not browsers.** Call the cloud API from servers, scripts and agents. A web page would expose the key, and the service refuses cross-site requests that change anything. - **Names, not material.** You refer to keys by name. Private keys stay in the vault. ## Errors Every error is JSON. The cloud adds a stable `code` meant for programs: ```json { "error": "this month's operations are used up; reading and exporting keys still work", "code": "quota" } ``` | HTTP | Cloud `code` | Meaning | What to do | | --- | --- | --- | --- | | 400 | `invalid` | A malformed request or an input the service refuses | Fix the request; the message says what | | 401 | `unauthenticated` | No key or token, or an unknown or revoked one | Check the credential | | 403 | `forbidden` | The role is too low, the plan does not include the algorithm, or a gate refused | Use a credential with the right role, or a plan or policy that allows it | | 403 | `quota` | This month's operations (and any prepaid balance) are used up, or the key limit is reached | Stop; reading still works; the allowance renews at the start of the month (UTC) | | 403 | `csrf` | A cross-site request with a session cookie | Call from a server with an API key | | 404 | `not_found` | No such key or route (a key of another organisation answers the same) | Check the name | | 409 | `conflict` | A key of that name exists; or, in Core, the request conflicts with the current state | Use another name, or read the state first | | 413 | | Core: the body is larger than the limit | Send less, or sign a digest | | 429 | `rate_limited` | Too many requests | Wait, then retry with back-off | | 503 | `unavailable` | Briefly unavailable (in Core, also: the vault is sealed, or the daemon is busy) | Retry later; a cloud operation that failed was not counted | | 500 | `internal` | An internal failure | Retry later; the service's log has the detail | Aegis Core answers with `{"error": "…"}` and the same status codes, and gRPC callers get the matching gRPC status with the REST status in the `aegis-http-status` metadata. ## Limits | | Free | Pro | | --- | --- | --- | | Operations a month (create, sign, verify, encapsulate, hash) | 10,000 | 1,000,000, then a prepaid balance | | Requests a minute, per organisation | 60 | 1,200 | | Keys | 10 | 1,000 | The service publishes the current limits at `GET /api/config`. The edge in front of the cloud also limits each client address. Aegis Core has no plan limits; its licence can set limits on keys and tenants, and the daemon refuses work beyond a fixed number of requests in flight rather than queueing it. ## Versions The cloud's routes carry `/api/v1`, Core's `/v1`. Aegis Core's build refuses a breaking change to its contract, so `v1` clients keep working across releases. Every daemon serves its own release's OpenAPI document at `GET /v1/openapi.json`, and reports its release at `GET /v1/sys/info`. --- Source: https://docs.qblackbit.com/api/cloud # Cloud API reference The API of Aegis Cloud, the hosted Free and Pro editions of Aegis by qblackbit. Programs and AI agents call it with an API key (`Authorization: Bearer agk_…`) that an organisation admin makes in the app under API keys; the key acts with its role, `developer` or `auditor`. JSON in and out; binary values are standard base64 with padding; a body carries at most 1 MiB of data. Each organisation's keys live in its own tenant of Aegis Core, under its own key-encryption key. Call the API from servers, scripts and agents, never from a web page: the key would be exposed, and cross-site requests are refused. Base URL: `https://aegis.qblackbit.com`. In the examples, `AEGIS_URL` holds it and `AEGIS_API_KEY` holds an API key you made in the app (never paste a key into a chat or a page). ## Public settings `GET /api/config` The service's public settings: Google sign-in, the minimum password length, where data is held, and every plan's limits. - Authentication: none - Metered: no Response `200` (`application/json`): [Config](#schema-config) ```json { "data_location": "Contabo GmbH data centre in the European Union", "google": true, "password_min_length": 12, "plans": { "free": { "algorithms": [ "ml-dsa-65", "x25519-ml-kem-768" ], "export": "wrapped", "hashes": [ "sha2-256", "sha2-384", "sha2-512", "sha3-256", "sha3-512" ], "max_keys": 10, "monthly_operations": 10000, "rate_per_minute": 60 }, "pro": { "algorithms": [ "ml-kem-512", "ml-kem-768", "ml-kem-1024", "ml-dsa-44", "ml-dsa-65", "ml-dsa-87", "slh-dsa-sha2-128s", "slh-dsa-sha2-128f", "slh-dsa-sha2-192s", "slh-dsa-sha2-256s", "slh-dsa-shake-128s", "slh-dsa-shake-256s", "x25519-ml-kem-768", "p256-ml-kem-768", "p384-ml-kem-1024" ], "export": "wrapped", "hashes": [ "sha2-256", "sha2-384", "sha2-512", "sha3-256", "sha3-512" ], "max_keys": 1000, "monthly_operations": 1000000, "rate_per_minute": 1200 } }, "turnstile_site_key": null } ``` Example: ```bash curl -sS "$AEGIS_URL/api/config" ``` ## Algorithms your plan allows `GET /api/v1/algorithms` The key algorithms, hash functions and export KEMs the organisation's plan allows. - Authentication: API key, role `auditor` or higher - Metered: no Response `200` (`application/json`): [Algorithms](#schema-algorithms) ```json { "plan": "free", "algorithms": [ "ml-dsa-65", "x25519-ml-kem-768" ], "hashes": [ "sha2-256", "sha2-384", "sha2-512", "sha3-256", "sha3-512" ], "export_kems": [ "hpke-mlkem768-x25519", "hpke-mlkem1024-p384" ] } ``` Errors: `401` · `403` · `429` ([what each means](https://docs.qblackbit.com/api/index.md#errors)). Example: ```bash curl -sS "$AEGIS_URL/api/v1/algorithms" \ -H "Authorization: Bearer $AEGIS_API_KEY" ``` ## Usage this month `GET /api/v1/usage` Operations used this calendar month (UTC), what remains of the plan's allowance, and the prepaid balance (Pro). Never blocked. - Authentication: API key, role `auditor` or higher - Metered: no Response `200` (`application/json`): [Usage](#schema-usage) ```json { "month": "2026-12", "plan": "free", "included": 10000, "used": { "included": 42, "from_balance": 0 }, "remaining": 9958, "balance": 0 } ``` Errors: `401` · `403` · `429` ([what each means](https://docs.qblackbit.com/api/index.md#errors)). Example: ```bash curl -sS "$AEGIS_URL/api/v1/usage" \ -H "Authorization: Bearer $AEGIS_API_KEY" ``` ## Hash `POST /api/v1/hash` A digest of the data with one of the plan's hash functions. - Authentication: API key, role `developer` or higher - Metered: counts as one operation Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `algorithm` | string, required | A hash function the plan allows: `sha2-256`, `sha2-384`, `sha2-512`, `sha3-256` or `sha3-512`. Example: `"sha3-256"`. | | `data` | string (base64), required | The data, at most 1 MiB. Example: `"aGVsbG8gYWVnaXM="`. | ```json { "algorithm": "sha3-256", "data": "aGVsbG8gYWVnaXM=" } ``` Response `200` (`application/json`): [HashResult](#schema-hashresult) Errors: `400` · `401` · `403` · `429` · `503` ([what each means](https://docs.qblackbit.com/api/index.md#errors)). Example: ```bash curl -sS -X POST "$AEGIS_URL/api/v1/hash" \ -H "Authorization: Bearer $AEGIS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"algorithm":"sha3-256","data":"aGVsbG8gYWVnaXM="}' ``` ## Encapsulate `POST /api/v1/encapsulate` Encapsulates to a public key: a fresh shared secret, and the ciphertext that carries it to the holder of the matching private key. The private key's holder recovers the same shared secret by decapsulating the ciphertext. The cloud API does not decapsulate: decapsulation happens where the private key is held. `x25519-ml-kem-768`, `p256-ml-kem-768` and `p384-ml-kem-1024` are the TLS 1.3 hybrid groups, which rely on the TLS handshake transcript; outside TLS, prefer `ml-kem-768` or `ml-kem-1024` (Pro), or bind the ciphertext and the recipient's public key into your key derivation (see Post-quantum and hybrids). - Authentication: API key, role `developer` or higher - Metered: counts as one operation Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `algorithm` | string, required | A KEM the plan allows, such as `x25519-ml-kem-768` (Free and Pro) or `ml-kem-768` (Pro). Example: `"x25519-ml-kem-768"`. | | `public_key` | string (base64), required | The recipient's public key, for example from `GET /api/v1/keys/{name}/public`. Example: `""`. | ```json { "algorithm": "x25519-ml-kem-768", "public_key": "" } ``` Response `200` (`application/json`): [Encapsulation](#schema-encapsulation) Errors: `400` · `401` · `403` · `429` · `503` ([what each means](https://docs.qblackbit.com/api/index.md#errors)). Example: ```bash curl -sS -X POST "$AEGIS_URL/api/v1/encapsulate" \ -H "Authorization: Bearer $AEGIS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"algorithm":"x25519-ml-kem-768","public_key":""}' ``` ## List keys `GET /api/v1/keys` The organisation's keys, without secrets. - Authentication: API key, role `auditor` or higher - Metered: no Response `200` (`application/json`): [KeyList](#schema-keylist) ```json { "keys": [ { "name": "release-signing", "algorithm": "ml-dsa-65", "created": 1764806400, "by": "" } ] } ``` Errors: `401` · `403` · `429` ([what each means](https://docs.qblackbit.com/api/index.md#errors)). Example: ```bash curl -sS "$AEGIS_URL/api/v1/keys" \ -H "Authorization: Bearer $AEGIS_API_KEY" ``` ## Create a key `POST /api/v1/keys` Makes a key pair in the organisation's tenant of Aegis Core. The private key stays in the vault. - Authentication: API key, role `developer` or higher - Metered: counts as one operation Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `name` | string, required | 1 to 64 letters, digits, `-` or `_`, starting with a letter or digit; unique in the organisation. Example: `"release-signing"`. | | `algorithm` | string, required | An algorithm the plan allows: `ml-dsa-65` or `x25519-ml-kem-768` on Free; on Pro, every set `GET /api/v1/algorithms` lists. Example: `"ml-dsa-65"`. | ```json { "name": "release-signing", "algorithm": "ml-dsa-65" } ``` Response `201` (`application/json`): [CreatedKey](#schema-createdkey) ```json { "name": "release-signing", "algorithm": "ml-dsa-65", "version": 1 } ``` Errors: `400` · `401` · `403` · `409` · `429` · `503` ([what each means](https://docs.qblackbit.com/api/index.md#errors)). Example: ```bash curl -sS -X POST "$AEGIS_URL/api/v1/keys" \ -H "Authorization: Bearer $AEGIS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"name":"release-signing","algorithm":"ml-dsa-65"}' ``` ## Get a key `GET /api/v1/keys/{name}` One key: its algorithm, when it was made, its state and its current version. - Authentication: API key, role `auditor` or higher - Metered: no | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | The key's name: 1 to 64 letters, digits, `-` or `_`, starting with a letter or digit. | Response `200` (`application/json`): [KeyDetail](#schema-keydetail) ```json { "name": "release-signing", "algorithm": "ml-dsa-65", "created": 1764806400, "state": "active", "version": 1 } ``` Errors: `401` · `403` · `404` · `429` · `503` ([what each means](https://docs.qblackbit.com/api/index.md#errors)). Example: ```bash curl -sS "$AEGIS_URL/api/v1/keys/release-signing" \ -H "Authorization: Bearer $AEGIS_API_KEY" ``` ## Get a public key `GET /api/v1/keys/{name}/public` The current version's public key. - Authentication: API key, role `auditor` or higher - Metered: no | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | The key's name: 1 to 64 letters, digits, `-` or `_`, starting with a letter or digit. | Response `200` (`application/json`): [PublicKey](#schema-publickey) Errors: `401` · `403` · `404` · `429` · `503` ([what each means](https://docs.qblackbit.com/api/index.md#errors)). Example: ```bash curl -sS "$AEGIS_URL/api/v1/keys/release-signing/public" \ -H "Authorization: Bearer $AEGIS_API_KEY" ``` ## Sign `POST /api/v1/keys/{name}/sign` Signs the message with the key's current version (pure, hedged, no context string). The signature is verified before it is returned. - Authentication: API key, role `developer` or higher - Metered: counts as one operation | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | The key's name: 1 to 64 letters, digits, `-` or `_`, starting with a letter or digit. | Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `message` | string (base64), required | The message, at most 1 MiB. Example: `"aGVsbG8gYWVnaXM="`. | ```json { "message": "aGVsbG8gYWVnaXM=" } ``` Response `200` (`application/json`): [Signature](#schema-signature) Errors: `400` · `401` · `403` · `404` · `429` · `503` ([what each means](https://docs.qblackbit.com/api/index.md#errors)). Example: ```bash curl -sS -X POST "$AEGIS_URL/api/v1/keys/release-signing/sign" \ -H "Authorization: Bearer $AEGIS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"message":"aGVsbG8gYWVnaXM="}' ``` ## Verify `POST /api/v1/keys/{name}/verify` Checks a signature over the message with one of the key's versions. - Authentication: API key, role `developer` or higher - Metered: counts as one operation | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | The key's name: 1 to 64 letters, digits, `-` or `_`, starting with a letter or digit. | Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `message` | string (base64), required | The message that was signed, at most 1 MiB. Example: `"aGVsbG8gYWVnaXM="`. | | `signature` | string (base64), required | The signature, as `sign` returned it. Example: `""`. | | `version` | integer | The key version that signed (`sign` returns it). Defaults to 1. Example: `1`. | ```json { "message": "aGVsbG8gYWVnaXM=", "signature": "", "version": 1 } ``` Response `200` (`application/json`): [Verification](#schema-verification) Errors: `400` · `401` · `403` · `404` · `429` · `503` ([what each means](https://docs.qblackbit.com/api/index.md#errors)). Example: ```bash curl -sS -X POST "$AEGIS_URL/api/v1/keys/release-signing/verify" \ -H "Authorization: Bearer $AEGIS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"message":"aGVsbG8gYWVnaXM=","signature":"","version":1}' ``` ## Export a key, wrapped `POST /api/v1/keys/{name}/export` > **Not available yet:** The route exists, but exporting a key made by the cloud does not complete in the current release (Aegis Core 0.13.0). Exports the key wrapped with HPKE to your own hybrid post-quantum public key, so only you can open it. Never metered and never blocked by the quota. Only hybrid KEMs are accepted for the wrapping key, so an export is never weaker than the key it carries. - Authentication: a signed-in session of an organisation `admin` or `owner`, from the app; API keys are refused - Metered: no | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | The key's name: 1 to 64 letters, digits, `-` or `_`, starting with a letter or digit. | Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `kem` | string, one of `hpke-mlkem768-x25519`, `hpke-mlkem1024-p384`, required | The HPKE KEM of your public key. Example: `"hpke-mlkem768-x25519"`. | | `public_key` | string (base64), required | Your public key for that KEM. Example: `""`. | ```json { "kem": "hpke-mlkem768-x25519", "public_key": "" } ``` Response `200` (`application/json`): [WrappedExport](#schema-wrappedexport) Errors: `400` · `401` · `403` · `404` · `503` ([what each means](https://docs.qblackbit.com/api/index.md#errors)). Example: ```bash curl -sS -X POST "$AEGIS_URL/api/v1/keys/release-signing/export" \ -H "Authorization: Bearer $AEGIS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"kem":"hpke-mlkem768-x25519","public_key":""}' ``` ## Schemas ### Algorithms What the plan allows. | Field | Type | Description | | --- | --- | --- | | `plan` | string | `free`, `pro` or `enterprise`. | | `algorithms` | array of string | Key algorithms. | | `hashes` | array of string | Hash functions. | | `export_kems` | array of string | The hybrid KEMs a key may be exported to. | ### Config The service's public settings. | Field | Type | Description | | --- | --- | --- | | `data_location` | string | Where customer data is held. | | `google` | boolean | Whether Google sign-in is on. | | `password_min_length` | integer (int64) | The shortest password accepted. | | `plans` | object | Every plan's limits. | | `plans.free` | [PlanLimits](#schema-planlimits) | | | `plans.pro` | [PlanLimits](#schema-planlimits) | | | `turnstile_site_key` | string, nullable | The bot-check site key, when the public forms ask for one. | ### CreatedKey A new key. | Field | Type | Description | | --- | --- | --- | | `name` | string | The name. | | `algorithm` | string | The algorithm. | | `version` | integer (int64) | The current version: 1 for a new key. | ### Encapsulation An encapsulation (passed through from Aegis Core). | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | The KEM. | | `ciphertext` | string (base64) | The ciphertext to send to the private key's holder. | | `shared_secret` | string (base64) | The shared secret. Treat it as a key: never log it. | | `caution` | string, nullable | A caution Aegis adds for a retired or broken algorithm; absent for the algorithms the cloud offers. | ### HashResult A digest (passed through from Aegis Core). | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | The hash function. | | `digest` | string (base64) | The digest. | | `caution` | string, nullable | A caution Aegis adds for a retired or broken algorithm; absent for the algorithms the cloud offers. | ### KeyDetail One key. | Field | Type | Description | | --- | --- | --- | | `name` | string | The name. | | `algorithm` | string | The algorithm. | | `created` | integer (int64) | When it was made, in seconds since the Unix epoch. | | `state` | string | The key's state in Aegis Core, such as `active`. | | `version` | integer (int64) | The current version. | ### KeyList The organisation's keys. | Field | Type | Description | | --- | --- | --- | | `keys` | array of [KeyEntry](#schema-keyentry) | Every key. | ### PublicKey A public key (passed through from Aegis Core). | Field | Type | Description | | --- | --- | --- | | `version` | integer (int64) | The current version. | | `public_key` | string (base64) | The public key: its raw bytes, in base64. | ### Signature A signature (passed through from Aegis Core). | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | The algorithm. | | `version` | integer (int64) | The version that signed; send it to `verify`. | | `signature` | string (base64), nullable | The signature. | | `envelope` | string (base64), nullable | Not used by the cloud API (always absent). | | `caution` | string, nullable | A caution Aegis adds for a retired or broken algorithm; absent for the algorithms the cloud offers. | ### Usage This month's usage. | Field | Type | Description | | --- | --- | --- | | `month` | string | The calendar month (UTC), `YYYY-MM`. | | `plan` | string | The plan. | | `included` | integer (int64) | Operations the plan includes this month. | | `used` | object | Operations used. | | `used.included` | integer (int64) | Within the monthly allowance. | | `used.from_balance` | integer (int64) | Drawn from the prepaid balance (Pro). | | `remaining` | integer (int64) | What remains of the allowance. | | `balance` | integer (int64) | The prepaid balance, in operations (Pro). | ### Verification Whether the signature verifies (passed through from Aegis Core). | Field | Type | Description | | --- | --- | --- | | `valid` | boolean | `true` when the signature is valid for this message and key version. | | `caution` | string, nullable | A caution Aegis adds for a retired or broken algorithm; absent for the algorithms the cloud offers. | ### WrappedExport The key wrapped to your public key with HPKE (RFC 9180), passed through from Aegis Core. Open it with your private key and the `info` given. | Field | Type | Description | | --- | --- | --- | | `kem` | string, nullable | The HPKE KEM. | | `kdf` | string, nullable | The HPKE KDF. | | `aead` | string, nullable | The HPKE AEAD. | | `enc` | string (base64), nullable | The encapsulated key. | | `ciphertext` | string (base64), nullable | The wrapped key material. | | `info` | string (base64), nullable | The HPKE info, which binds the key's terms. | | `algorithm` | string, nullable | The key's algorithm. | | `version` | integer (int64), nullable | The version wrapped. | | `export` | string, nullable | The key's export policy. | | `state` | string, nullable | The key's state. | | `usages` | array of string | The key's usages. | | `caution` | string, nullable | A caution Aegis adds for a retired or broken algorithm; absent for the algorithms the cloud offers. | ### PlanLimits What a plan allows. | Field | Type | Description | | --- | --- | --- | | `monthly_operations` | integer (int64) | Metered operations included each calendar month (UTC). | | `algorithms` | array of string | Algorithms keys may be made with. | | `hashes` | array of string | Hash functions `hash` accepts. | | `rate_per_minute` | integer (int64) | Requests per minute for the organisation. | | `max_keys` | integer (int64) | Keys the organisation may hold. | | `export` | string, one of `wrapped`, `none` | How keys may leave the cloud: `wrapped` (to your own hybrid public key) or `none`. | ### KeyEntry A key as the organisation's index lists it. | Field | Type | Description | | --- | --- | --- | | `name` | string | The name. | | `algorithm` | string | The algorithm. | | `created` | integer (int64) | When it was made, in seconds since the Unix epoch. | | `by` | string | The account that made it. | --- Source: https://docs.qblackbit.com/api/core/ # Aegis Core API The API of `aegisd`, the Aegis Core daemon you run yourself. Every operation is one RPC of a protobuf contract, served on the same TLS listener as gRPC (`/aegis.v1./`) and as the REST route shown on each page, through one implementation: the same roles, limits, audit records and refusals apply to both. This reference is generated from the OpenAPI document of **Aegis Core 0.13.0**. A running daemon serves its own release's document at `GET /v1/openapi.json`. ## Services | Service | Page | Operations | | --- | --- | --- | | `KeyService` | [Keys](https://docs.qblackbit.com/api/core/keys.md) | Create, import, rotate, states, dates, delete, destroy; sign, verify, encrypt, decrypt, decapsulate, agree, receive, export | | `ToolsService` | [Tools](https://docs.qblackbit.com/api/core/tools.md) | Hash, MAC, derive, wrap and unwrap, AEAD, encapsulate, HPKE, combine, transport, verify, random | | `EnvelopeService` | [Envelopes and re-wrap](https://docs.qblackbit.com/api/core/envelopes.md) | Describe an envelope; re-wrap jobs | | `EncodingService` | [Encodings](https://docs.qblackbit.com/api/core/encodings.md) | PKCS #8, SPKI, JWK and COSE keys; certificates and requests; CMS, JWS, JWE and COSE | | `AlgorithmService` | [Algorithms](https://docs.qblackbit.com/api/core/algorithms.md) | The catalogue | | `PolicyService` | [Policy packs](https://docs.qblackbit.com/api/core/policy.md) | Packs, activation, advisories, protocol values | | `AuditService` | [Audit](https://docs.qblackbit.com/api/core/audit.md) | Records, verification, checkpoints, export | | `AccessService` | [Access and approvals](https://docs.qblackbit.com/api/core/access.md) | Tokens, access policy, approvals, break-glass, OpenID Connect | | `SealService` | [Seal and unseal](https://docs.qblackbit.com/api/core/seal.md) | Unseal, seal, rekey | | `HierarchyService` | [Tenants and key hierarchy](https://docs.qblackbit.com/api/core/tenants.md) | Tenants, the root key, re-wrap progress | | `SystemService` | [System](https://docs.qblackbit.com/api/core/system.md) | Health, readiness, information, metrics, providers, self-tests, switches, backups | | `LicenceService` | [Licence](https://docs.qblackbit.com/api/core/licence.md) | The licence and its installation | | `UpdatesService` | [Updates](https://docs.qblackbit.com/api/core/updates.md) | Upload, import, apply, roll back, commit | ## Transport and authentication - TLS 1.3 with hybrid key exchange only (X25519MLKEM768, SecP256r1MLKEM768, SecP384r1MLKEM1024). See [Quantum-safe transport](https://docs.qblackbit.com/concepts/transport.md). - Every route except `/v1/health`, `/v1/ready`, `/v1/openapi.json` and the OpenID Connect sign-in routes needs `Authorization: Bearer `. Tokens are issued once with `POST /v1/sys/tokens` (or `aegisd token` for the first one), and the daemon keeps only their hashes. - Each operation states the lowest **role** that may call it. Tokens can be narrowed further by scope, expiry and a client certificate. See [Dual control](https://docs.qblackbit.com/concepts/dual-control.md). - Binary values are standard base64 with padding; bodies are limited to 1 MiB. ## Tenancy Every holder belongs to a tenant. A key of tenant `acme` is named `` by its holders and `acme/` by the cross-tenant role (percent-encoded in a path: `acme%2F`). Lists, records and policies are the caller's tenant's only. ## Dual control An operation under dual control answers `202` with an approval and does nothing. Once others have approved it, send the same request again, unchanged, with `x-aegis-approval: `. See [Access and approvals](https://docs.qblackbit.com/api/core/access.md) and [Dual control](https://docs.qblackbit.com/concepts/dual-control.md). ## Seal state The daemon starts sealed. While sealed, every route that needs the vault answers `503`; `GET /v1/sys/unseal` and `POST /v1/sys/unseal` open it. ## Errors Every error is `{"error": ""}`, and the message never holds key material, passphrases or plaintext. | Status | Meaning | | --- | --- | | 400 | The request is malformed, or an input is invalid | | 401 | No token, or an unknown token; an expired token says so | | 403 | The role is too low, or a gate refused (licence, policy, tier, health) | | 404 | No such key, algorithm or route | | 409 | A conflict with the current state | | 413 | The body is larger than the limit | | 500 | An internal failure; the daemon's log has the detail | | 503 | The vault is sealed, or the daemon is busy (it refuses work beyond its limit instead of queueing) | Over gRPC these map to `invalid argument`, `unauthenticated`, `permission denied`, `not found`, `failed precondition`, `resource exhausted`, `internal` and `unavailable`, with the REST status in the `aegis-http-status` metadata. --- Source: https://docs.qblackbit.com/api/core/keys # Keys Vault keys: create, import, rotate, states and dates, sign, verify, encrypt, decrypt, decapsulate, agree, export. Aegis Core API, `KeyService`: 23 operations, generated from the OpenAPI document of Aegis Core 0.13.0. ## List keys `GET /v1/keys` Every key. - Role: `auditor` or higher - gRPC: `/aegis.v1.KeyService/ListKeys` Response `200` (`application/json`): [ListKeysResponse](#schema-listkeysresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Create key `POST /v1/keys` Creates a key. - Role: `admin` or higher - gRPC: `/aegis.v1.KeyService/CreateKey` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `activation` | integer (int64), nullable | Activation date. | | `algorithm` | string | The algorithm. | | `deactivation` | integer (int64), nullable | Deactivation date. | | `description` | string | A description. | | `export` | string, nullable | `none` (the default), `wrapped` or `plain`, fixed for the key's life. | | `exportable` | boolean | `true` alone means `plain`. | | `labels` | map of string to string | Labels. | | `name` | string | The name. | | `pre_active` | boolean | Starts pre-active. | | `tenant` | string, nullable | The tenant whose key-encryption key wraps it. | | `usages` | array of string | What it may do; every operation of its kind by default. | Response `201` (`application/json`): [Key](#schema-key) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Get key `GET /v1/keys/{name}` One key. - Role: `auditor` or higher - gRPC: `/aegis.v1.KeyService/GetKey` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Response `200` (`application/json`): [Key](#schema-key) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Agree `POST /v1/keys/{name}/agree` The raw key-agreement output with a peer's public value. - Role: `operator` or higher - gRPC: `/aegis.v1.KeyService/Agree` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `peer_public_key` | string (base64) | The peer's public value. | | `version` | integer (int64) | The version to use. | Response `200` (`application/json`): [AgreeResponse](#schema-agreeresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Set dates `POST /v1/keys/{name}/dates` Changes the activation and deactivation dates. - Role: `admin` or higher - gRPC: `/aegis.v1.KeyService/SetDates` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `activation` | integer (int64), nullable | Activation, or absent for none. | | `deactivation` | integer (int64), nullable | Deactivation, or absent for none. | Response `200` (`application/json`): [Key](#schema-key) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Decapsulate `POST /v1/keys/{name}/decapsulate` Recovers a shared secret from a KEM ciphertext. - Role: `operator` or higher - gRPC: `/aegis.v1.KeyService/Decapsulate` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `ciphertext` | string (base64) | The KEM ciphertext. | | `version` | integer (int64) | The version it was sent to. | Response `200` (`application/json`): [DecapsulateResponse](#schema-decapsulateresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Decrypt `POST /v1/keys/{name}/decrypt` Decrypts an envelope. - Role: `operator` or higher - gRPC: `/aegis.v1.KeyService/Decrypt` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `associated_data` | string (base64) | The associated data it is bound to. | | `envelope` | string (base64) | The envelope. | Response `200` (`application/json`): [DecryptResponse](#schema-decryptresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Schedule deletion `POST /v1/keys/{name}/delete` Schedules a deletion after a waiting period. - Role: `admin` or higher - gRPC: `/aegis.v1.KeyService/ScheduleDeletion` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `confirm` | string | The key's name again. | | `wait_days` | integer (int64) | The waiting period in days. | Response `200` (`application/json`): [Key](#schema-key) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Cancel deletion `POST /v1/keys/{name}/delete/cancel` Cancels a scheduled deletion. - Role: `admin` or higher - gRPC: `/aegis.v1.KeyService/CancelDeletion` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Response `200` (`application/json`): [Key](#schema-key) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Destroy key `POST /v1/keys/{name}/destroy` Crypto-shreds every version now. - Role: `admin` or higher - gRPC: `/aegis.v1.KeyService/DestroyKey` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `confirm` | string | The key's name again. | Response `200` (`application/json`): [Key](#schema-key) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Encrypt `POST /v1/keys/{name}/encrypt` Encrypts into a self-describing envelope. - Role: `operator` or higher - gRPC: `/aegis.v1.KeyService/Encrypt` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `associated_data` | string (base64) | Associated data bound to the envelope. | | `plaintext` | string (base64) | The plaintext. | Response `200` (`application/json`): [EncryptResponse](#schema-encryptresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Export key `POST /v1/keys/{name}/export` Exports a version in clear, or wrapped to a recipient with HPKE. - Role: `admin` or higher - gRPC: `/aegis.v1.KeyService/ExportKey` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `to` | [ExportRecipient](#schema-exportrecipient), nullable | Wrap to a recipient instead of exporting in clear. | | `version` | integer (int64), nullable | The version; the newest by default. | Response `200` (`application/json`): [ExportKeyResponse](#schema-exportkeyresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## HPKE open `POST /v1/keys/{name}/hpke/open` Opens an HPKE message sealed to a vault HPKE key. - Role: `operator` or higher - gRPC: `/aegis.v1.KeyService/HpkeOpen` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `aad` | string (base64) | HPKE aad. | | `aead` | string | The HPKE AEAD. | | `ciphertext` | string (base64) | The ciphertext. | | `enc` | string (base64) | The encapsulated key. | | `info` | string (base64) | HPKE info. | | `kdf` | string | The HPKE KDF. | | `psk` | string (base64) | A pre-shared key. | | `psk_id` | string (base64) | Its identifier. | | `sender_public_key` | string (base64), nullable | The sender's public key (mode auth). | | `version` | integer (int64) | The version it was sealed to. | Response `200` (`application/json`): [HpkeOpenResponse](#schema-hpkeopenresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Import key `POST /v1/keys/{name}/import` Imports a key made elsewhere, after the algorithm's key checks. - Role: `admin` or higher - gRPC: `/aegis.v1.KeyService/ImportKey` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `activation` | integer (int64), nullable | Activation date. | | `algorithm` | string | The algorithm. | | `deactivation` | integer (int64), nullable | Deactivation date. | | `description` | string | A description. | | `export` | string, nullable | `none`, `wrapped` or `plain`. | | `exportable` | boolean | `true` alone means `plain`. | | `labels` | map of string to string | Labels. | | `loosen_export` | boolean | Allow the export policy asked for, for material from outside (audited). | | `material` | string (base64), nullable | The material in clear. | | `name` | string | The name. | | `pre_active` | boolean | Starts pre-active. | | `public_key` | string (base64), nullable | The public key, checked against the material. | | `tenant` | string, nullable | The tenant. | | `usages` | array of string | What it may do. | | `wrapped` | [WrappedMaterial](#schema-wrappedmaterial), nullable | Or sealed to an escrow key. | Response `201` (`application/json`): [Key](#schema-key) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Set metadata `POST /v1/keys/{name}/metadata` Replaces the description and labels. - Role: `admin` or higher - gRPC: `/aegis.v1.KeyService/SetMetadata` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `description` | string | The description. | | `labels` | map of string to string | The labels. | Response `200` (`application/json`): [Key](#schema-key) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Public key `GET /v1/keys/{name}/public` The current version's public key. - Role: `auditor` or higher - gRPC: `/aegis.v1.KeyService/PublicKey` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Response `200` (`application/json`): [PublicKeyResponse](#schema-publickeyresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Receive `POST /v1/keys/{name}/receive` Recovers a secret transported (RSA-OAEP) to a key-transport key. - Role: `operator` or higher - gRPC: `/aegis.v1.KeyService/Receive` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `ciphertext` | string (base64) | The ciphertext. | | `label` | string (base64) | The OAEP label. | | `version` | integer (int64) | The version it was sent to. | Response `200` (`application/json`): [ReceiveResponse](#schema-receiveresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Rewrap `POST /v1/keys/{name}/rewrap` Re-encrypts an envelope under the newest version, or another key, inside the daemon. - Role: `operator` or higher - gRPC: `/aegis.v1.KeyService/Rewrap` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `associated_data` | string (base64) | The associated data it is bound to. | | `envelope` | string (base64) | The envelope. | | `to` | string, nullable | Another key to move it to. | Response `200` (`application/json`): [RewrapResponse](#schema-rewrapresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Rotate key `POST /v1/keys/{name}/rotate` A new current version. - Role: `admin` or higher - gRPC: `/aegis.v1.KeyService/RotateKey` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Response `200` (`application/json`): [Key](#schema-key) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Sign `POST /v1/keys/{name}/sign` Signs with the newest version. - Role: `operator` or higher - gRPC: `/aegis.v1.KeyService/Sign` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `context` | string (base64) | The context string (FIPS 204, 205), at most 255 bytes. | | `deterministic` | boolean | The deterministic variant instead of hedged signing. | | `envelope` | boolean | Sign into a self-describing envelope (AGS2) instead of a bare signature. | | `message` | string (base64) | The message. | | `prehash` | string, nullable | The pre-hash function, for HashML-DSA and HashSLH-DSA. | Response `200` (`application/json`): [SignResponse](#schema-signresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Set state `POST /v1/keys/{name}/state` Activates, suspends, resumes, deactivates or marks compromised. - Role: `admin` or higher - gRPC: `/aegis.v1.KeyService/SetState` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `state` | string | `active`, `suspended`, `deactivated` or `compromised`. | Response `200` (`application/json`): [Key](#schema-key) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Verify `POST /v1/keys/{name}/verify` Verifies a signature, bare with its version or in its envelope. - Role: `auditor` or higher - gRPC: `/aegis.v1.KeyService/Verify` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `context` | string (base64) | The context string. | | `envelope` | string (base64), nullable | Or the signature envelope, which names the version. | | `message` | string (base64) | The message. | | `prehash` | string, nullable | The pre-hash function expected; pure when absent. An envelope must name exactly this form. | | `signature` | string (base64), nullable | The bare signature. | | `version` | integer (int64), nullable | The version that signed (with `signature`). | Response `200` (`application/json`): [VerifyResponse](#schema-verifyresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Import version `POST /v1/keys/{name}/versions` Imports a further version. - Role: `admin` or higher - gRPC: `/aegis.v1.KeyService/ImportVersion` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `loosen_export` | boolean | Allow it into an exportable key, for material from outside (audited). | | `material` | string (base64), nullable | The material in clear. | | `public_key` | string (base64), nullable | The public key, checked against the material. | | `wrapped` | [WrappedMaterial](#schema-wrappedmaterial), nullable | Or sealed to an escrow key. | Response `200` (`application/json`): [Key](#schema-key) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Schemas ### AgreeResponse The raw shared secret. | Field | Type | Description | | --- | --- | --- | | `caution` | string, nullable | The caution of a retired or broken algorithm. | | `shared_secret` | string (base64) | The shared secret. | ### DecapsulateResponse The shared secret. | Field | Type | Description | | --- | --- | --- | | `caution` | string, nullable | The caution of a retired or broken algorithm. | | `shared_secret` | string (base64) | The shared secret. | ### DecryptResponse The plaintext. | Field | Type | Description | | --- | --- | --- | | `caution` | string, nullable | The caution of a retired or broken algorithm. | | `plaintext` | string (base64) | The plaintext. | ### EncryptResponse The envelope. | Field | Type | Description | | --- | --- | --- | | `caution` | string, nullable | The caution of a retired or broken algorithm. | | `envelope` | string (base64) | The self-describing envelope (AGV2). | ### ExportKeyResponse The exported material: in clear, or wrapped. | Field | Type | Description | | --- | --- | --- | | `aead` | string, nullable | The HPKE AEAD. | | `algorithm` | string, nullable | The key's algorithm. | | `caution` | string, nullable | The caution of a retired or broken algorithm. | | `ciphertext` | string (base64), nullable | The ciphertext. | | `enc` | string (base64), nullable | The encapsulated key. | | `export` | string, nullable | The source's export policy. | | `info` | string (base64), nullable | The HPKE info, which binds the source's terms. | | `kdf` | string, nullable | The HPKE KDF. | | `kem` | string, nullable | The HPKE KEM. | | `material` | string (base64), nullable | The material in clear. | | `state` | string, nullable | The source's state. | | `usages` | array of string | The source's usages. | | `version` | integer (int64), nullable | The version wrapped. | ### ExportRecipient The recipient of a wrapped export. | Field | Type | Description | | --- | --- | --- | | `aead` | string, nullable | The HPKE AEAD. | | `kdf` | string, nullable | The HPKE KDF. | | `kem` | string, nullable | Or an HPKE KEM. | | `key` | string, nullable | A vault escrow key. | | `public_key` | string (base64), nullable | And a public key from outside. | ### HpkeOpenResponse The plaintext. | Field | Type | Description | | --- | --- | --- | | `caution` | string, nullable | The caution of a retired or broken algorithm. | | `plaintext` | string (base64) | The plaintext. | ### Key A key and its versions. | Field | Type | Description | | --- | --- | --- | | `activation` | integer (int64), nullable | Activation date, in seconds since the Unix epoch. | | `algorithm` | string | The algorithm. | | `caution` | string, nullable | The caution of a retired or broken algorithm. | | `created` | integer (int64) | When it was created. | | `current_version` | integer (int64) | The newest version. | | `deactivation` | integer (int64), nullable | Deactivation date. | | `deletion_due` | integer (int64), nullable | When a scheduled deletion falls due. | | `description` | string | A description, at most 500 characters. | | `export` | string | `none`, `wrapped` or `plain`. | | `exportable` | boolean | Whether it may leave in clear. | | `kind` | string | The algorithm's kind. | | `labels` | map of string to string | Labels, at most 16. | | `maturity` | string | The algorithm's maturity. | | `name` | string | The name. | | `origin` | string | `generated` or `imported`. | | `qualified` | string | The name as the vault stores it: `tenant/name` for a tenant's key, the plain name for the default tenant's. | | `revision` | string | The specification revision it was made under. | | `state` | string | The state now, with its dates applied. | | `tenant` | string | The tenant whose key-encryption key wraps it. | | `updated` | integer (int64) | When it last changed. | | `usages` | array of string | What the key may do. | | `versions` | array of [KeyVersion](#schema-keyversion) | Every version. | ### ListKeysResponse Every key. | Field | Type | Description | | --- | --- | --- | | `keys` | array of [Key](#schema-key) | The keys. | ### PublicKeyResponse A public key. | Field | Type | Description | | --- | --- | --- | | `public_key` | string (base64) | Its public key. | | `version` | integer (int64) | The current version. | ### ReceiveResponse The secret. | Field | Type | Description | | --- | --- | --- | | `caution` | string, nullable | The caution of a retired or broken algorithm. | | `plaintext` | string (base64) | The secret. | ### RewrapResponse The re-wrapped envelope. | Field | Type | Description | | --- | --- | --- | | `envelope` | string (base64) | The envelope, in the newest format. | ### SignResponse A signature. | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | The algorithm. | | `caution` | string, nullable | The caution of a retired or broken algorithm. | | `envelope` | string (base64), nullable | The signature envelope (AGS2), when asked for: its signature covers the envelope's signing input, which holds every field of its header. | | `signature` | string (base64), nullable | The bare signature, unless an envelope was asked for. | | `version` | integer (int64) | The version that signed. | ### VerifyResponse Whether it verifies. | Field | Type | Description | | --- | --- | --- | | `caution` | string, nullable | The caution of a retired or broken algorithm. | | `valid` | boolean | Whether the signature is valid. | ### WrappedMaterial Material sealed to a vault escrow key for import. | Field | Type | Description | | --- | --- | --- | | `aead` | string, nullable | The HPKE AEAD. | | `ciphertext` | string (base64) | The ciphertext. | | `enc` | string (base64) | The encapsulated key. | | `kdf` | string, nullable | The HPKE KDF. | | `key` | string | The escrow key. | | `source` | [WrappedSource](#schema-wrappedsource), nullable | For a wrapped export: the terms its `info` names. | | `version` | integer (int64) | Its version. | ### KeyVersion One version of a key. | Field | Type | Description | | --- | --- | --- | | `created` | integer (int64) | When it was made. | | `destroyed` | boolean | Whether its material is erased. | | `number` | integer (int64) | Its number. | | `origin` | string | `generated` or `imported`. | | `provider` | string | The provider that generated or checked it. | | `public_key` | string (base64), nullable | Its public key, for an asymmetric key. | | `software` | string | The Aegis release that made it. | ### WrappedSource The terms a wrapped export declared. | Field | Type | Description | | --- | --- | --- | | `export` | string | Its export policy. | | `key` | string | The exported key. | | `state` | string | Its state. | | `usages` | array of string | Its usages. | | `version` | integer (int64) | Its version. | --- Source: https://docs.qblackbit.com/api/core/tools # Tools Stateless operations on material you send: hash, MAC, derive, wrap, AEAD, encapsulate, HPKE, combine, verify, random. Aegis Core API, `ToolsService`: 15 operations, generated from the OpenAPI document of Aegis Core 0.13.0. ## Combine `POST /v1/tools/combine` Combines shared secrets with an ETSI TS 103 744 combiner. - Role: `operator` or higher - gRPC: `/aegis.v1.ToolsService/Combine` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | The combiner. | | `exchanges` | array of [Exchange](#schema-exchange) | The exchanges, in order. | | `length` | integer (int64) | Output length. | | `psk` | string (base64) | A pre-shared key of the combiner's length; none when empty. | Response `200` (`application/json`): [ToolsCombineResponse](#schema-toolscombineresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Decrypt `POST /v1/tools/decrypt` Decrypts; an AEAD returns nothing unless every byte authenticates. - Role: `operator` or higher - gRPC: `/aegis.v1.ToolsService/Decrypt` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | An AEAD or a storage cipher. | | `associated_data` | string (base64) | Associated data, for an AEAD. | | `data` | string (base64) | The ciphertext. | | `key` | string (base64) | The key. | | `nonce` | string (base64), nullable | The nonce, for an AEAD. | | `tweak` | string (base64), nullable | The tweak, for a storage cipher (XTS). | Response `200` (`application/json`): [ToolsDecryptResponse](#schema-toolsdecryptresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Derive `POST /v1/tools/derive` Key derivation: HKDF, SP 800-108, Argon2id, scrypt. - Role: `operator` or higher - gRPC: `/aegis.v1.ToolsService/Derive` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | The KDF. | | `associated_data` | string (base64) | Argon2id's associated data, at most 32 bytes. | | `cost` | [PasswordCost](#schema-passwordcost), nullable | The cost of a password-based function. | | `info` | string (base64) | The info (for SP 800-108, the context). | | `legacy` | boolean | Reproduce a hash made elsewhere at a cost below the floor for new derivations. | | `length` | integer (int64) | 1 to 1,024 bytes. | | `pepper` | string (base64) | Argon2id's secret input (a pepper). | | `salt` | string (base64) | The salt (for SP 800-108, the label). | | `secret` | string (base64) | The secret, or for a password-based function the password. | Response `200` (`application/json`): [ToolsDeriveResponse](#schema-toolsderiveresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Encapsulate `POST /v1/tools/encapsulate` Encapsulates to a public key. - Role: `operator` or higher - gRPC: `/aegis.v1.ToolsService/Encapsulate` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | The KEM. | | `public_key` | string (base64) | The encapsulation key. | Response `200` (`application/json`): [ToolsEncapsulateResponse](#schema-toolsencapsulateresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Encrypt `POST /v1/tools/encrypt` An AEAD under a fresh nonce, or a storage cipher under the tweak given. - Role: `operator` or higher - gRPC: `/aegis.v1.ToolsService/Encrypt` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | An AEAD or a storage cipher. | | `associated_data` | string (base64) | Associated data, for an AEAD. | | `data` | string (base64) | The plaintext. | | `key` | string (base64) | The key. | | `tweak` | string (base64), nullable | The tweak, for a storage cipher (XTS). | Response `200` (`application/json`): [ToolsEncryptResponse](#schema-toolsencryptresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Hash `POST /v1/tools/hash` A digest, or extendable output. - Role: `operator` or higher - gRPC: `/aegis.v1.ToolsService/Hash` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | The hash or extendable-output function. | | `customisation` | string (base64), nullable | Customisation string (cSHAKE). | | `data` | string (base64) | The data. | | `length` | integer (int64), nullable | Output length of an extendable-output function (32 by default, at most 1,024). | Response `200` (`application/json`): [ToolsHashResponse](#schema-toolshashresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## HPKE export `POST /v1/tools/hpke/export` HPKE secret export, as the sender or the recipient. - Role: `operator` or higher - gRPC: `/aegis.v1.ToolsService/HpkeExport` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `aead` | string | The AEAD, or `export-only`. | | `enc` | string (base64), nullable | As the recipient: the encapsulated key. | | `exporter_context` | string (base64) | The exporter context. | | `info` | string (base64) | HPKE info. | | `kdf` | string | The KDF. | | `kem` | string | The KEM. | | `length` | integer (int64) | 1 to 1,024 bytes. | | `psk` | string (base64) | A pre-shared key. | | `psk_id` | string (base64) | Its identifier. | | `public_key` | string (base64), nullable | As the sender: the recipient's public key. | | `secret_key` | string (base64), nullable | As the recipient: the private key. | Response `200` (`application/json`): [ToolsHpkeExportResponse](#schema-toolshpkeexportresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## HPKE open `POST /v1/tools/hpke/open` Single-shot HPKE decryption. - Role: `operator` or higher - gRPC: `/aegis.v1.ToolsService/HpkeOpen` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `aad` | string (base64) | HPKE aad. | | `aead` | string | The AEAD. | | `ciphertext` | string (base64) | The ciphertext. | | `enc` | string (base64) | The encapsulated key. | | `info` | string (base64) | HPKE info. | | `kdf` | string | The KDF. | | `kem` | string | The KEM. | | `psk` | string (base64) | A pre-shared key. | | `psk_id` | string (base64) | Its identifier. | | `secret_key` | string (base64) | The recipient's private key. | | `sender_public_key` | string (base64), nullable | The sender's public key (mode auth). | Response `200` (`application/json`): [ToolsHpkeOpenResponse](#schema-toolshpkeopenresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## HPKE seal `POST /v1/tools/hpke/seal` Single-shot HPKE encryption (RFC 9180). - Role: `operator` or higher - gRPC: `/aegis.v1.ToolsService/HpkeSeal` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `aad` | string (base64) | HPKE aad. | | `aead` | string | The AEAD. | | `info` | string (base64) | HPKE info. | | `kdf` | string | The KDF. | | `kem` | string | The KEM. | | `plaintext` | string (base64) | The plaintext. | | `psk` | string (base64) | A pre-shared key (mode psk), at least 32 bytes. | | `psk_id` | string (base64) | Its identifier. | | `public_key` | string (base64) | The recipient's public key. | | `sender_key` | string (base64), nullable | The sender's private key (mode auth). | Response `200` (`application/json`): [ToolsHpkeSealResponse](#schema-toolshpkesealresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Mac `POST /v1/tools/mac` A MAC under the key given. - Role: `operator` or higher - gRPC: `/aegis.v1.ToolsService/Mac` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | The MAC. | | `customisation` | string (base64), nullable | Customisation string (KMAC). | | `key` | string (base64) | The key. | | `length` | integer (int64), nullable | Tag length (KMAC, which binds it into the tag). | | `message` | string (base64) | The message. | Response `200` (`application/json`): [ToolsMacResponse](#schema-toolsmacresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Random `POST /v1/tools/random` Random bytes from the engine's health-tested source. - Role: `operator` or higher - gRPC: `/aegis.v1.ToolsService/Random` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `length` | integer (int64) | 1 to 1,024. | Response `200` (`application/json`): [ToolsRandomResponse](#schema-toolsrandomresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Transport `POST /v1/tools/transport` Encrypts a short secret to a key-transport public key (RSA-OAEP). - Role: `operator` or higher - gRPC: `/aegis.v1.ToolsService/Transport` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | The key-transport algorithm. | | `label` | string (base64) | The OAEP label. | | `plaintext` | string (base64) | The secret. | | `public_key` | string (base64) | The recipient's public key. | Response `200` (`application/json`): [ToolsTransportResponse](#schema-toolstransportresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Unwrap `POST /v1/tools/unwrap` Unwraps a key; nothing unless its integrity check passes. - Role: `operator` or higher - gRPC: `/aegis.v1.ToolsService/Unwrap` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | AES-KW or AES-KWP. | | `kek` | string (base64) | The key-encryption key. | | `wrapped` | string (base64) | The wrapped key. | Response `200` (`application/json`): [ToolsUnwrapResponse](#schema-toolsunwrapresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Verify `POST /v1/tools/verify` Verifies a signature under a public key the caller supplies. - Role: `operator` or higher - gRPC: `/aegis.v1.ToolsService/Verify` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | The signature algorithm. | | `context` | string (base64) | The context string (FIPS 204, 205), at most 255 bytes. | | `message` | string (base64) | The message. | | `prehash` | string, nullable | The pre-hash function, for HashML-DSA and HashSLH-DSA. | | `public_key` | string (base64) | The verification key. | | `signature` | string (base64) | The signature. | Response `200` (`application/json`): [ToolsVerifyResponse](#schema-toolsverifyresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Wrap `POST /v1/tools/wrap` Wraps a key under a key-encryption key (AES-KW, AES-KWP). - Role: `operator` or higher - gRPC: `/aegis.v1.ToolsService/Wrap` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | AES-KW or AES-KWP. | | `kek` | string (base64) | The key-encryption key. | | `key` | string (base64) | The key to wrap. | Response `200` (`application/json`): [ToolsWrapResponse](#schema-toolswrapresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Schemas ### Exchange One key exchange's outputs, for a combiner. | Field | Type | Description | | --- | --- | --- | | `info` | string (base64) | The info. | | `initiator` | string (base64) | The initiator's public value. | | `label` | string (base64) | The label. | | `responder` | string (base64) | The responder's public value. | | `secret` | string (base64) | The shared secret. | ### PasswordCost The cost of a password-based function. | Field | Type | Description | | --- | --- | --- | | `block_size` | integer (int64), nullable | scrypt r. | | `lanes` | integer (int64), nullable | Argon2id lanes. | | `log_n` | integer (int64), nullable | scrypt log2 N. | | `memory_kib` | integer (int64), nullable | Argon2id memory in KiB. | | `parallelism` | integer (int64), nullable | scrypt p. | | `passes` | integer (int64), nullable | Argon2id passes. | ### ToolsCombineResponse The combined key. | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | The combiner. | | `caution` | string, nullable | The caution of a retired or broken algorithm. | | `key_material` | string (base64) | The key material. | ### ToolsDecryptResponse The plaintext. | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | The algorithm. | | `caution` | string, nullable | The caution of a retired or broken algorithm. | | `plaintext` | string (base64) | The plaintext. | ### ToolsDeriveResponse Derived output. | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | The KDF. | | `caution` | string, nullable | The caution of a retired or broken algorithm. | | `legacy` | boolean, nullable | For a password-based function: whether the cost was below the floor. | | `output` | string (base64) | The output. | ### ToolsEncapsulateResponse The encapsulation. | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | The KEM. | | `caution` | string, nullable | The caution of a retired or broken algorithm. | | `ciphertext` | string (base64) | The ciphertext to send. | | `shared_secret` | string (base64) | The shared secret. | ### ToolsEncryptResponse The ciphertext. | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | The algorithm. | | `caution` | string, nullable | The caution of a retired or broken algorithm. | | `ciphertext` | string (base64) | The ciphertext with its tag. | | `nonce` | string (base64), nullable | The nonce, for an AEAD. | ### ToolsHashResponse A digest. | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | The function. | | `caution` | string, nullable | The caution of a retired or broken algorithm. | | `digest` | string (base64) | The digest. | ### ToolsHpkeExportResponse The exported secret. | Field | Type | Description | | --- | --- | --- | | `caution` | string, nullable | The caution of a retired or broken algorithm. | | `enc` | string (base64), nullable | A fresh encapsulated key, as the sender. | | `exported` | string (base64) | The exported secret. | ### ToolsHpkeOpenResponse The opened message. | Field | Type | Description | | --- | --- | --- | | `caution` | string, nullable | The caution of a retired or broken algorithm. | | `plaintext` | string (base64) | The plaintext. | ### ToolsHpkeSealResponse The sealed message. | Field | Type | Description | | --- | --- | --- | | `aead` | string | The AEAD. | | `caution` | string, nullable | The caution of a retired or broken algorithm. | | `ciphertext` | string (base64) | The ciphertext. | | `enc` | string (base64) | The encapsulated key. | | `kdf` | string | The KDF. | | `kem` | string | The KEM. | ### ToolsMacResponse A tag. | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | The MAC. | | `caution` | string, nullable | The caution of a retired or broken algorithm. | | `tag` | string (base64) | The tag. | ### ToolsRandomResponse Random bytes. | Field | Type | Description | | --- | --- | --- | | `bytes` | string (base64) | The bytes. | ### ToolsTransportResponse The transported secret. | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | The algorithm. | | `caution` | string, nullable | The caution of a retired or broken algorithm. | | `ciphertext` | string (base64) | The ciphertext. | ### ToolsUnwrapResponse The unwrapped key. | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | The algorithm. | | `caution` | string, nullable | The caution of a retired or broken algorithm. | | `key` | string (base64) | The key. | ### ToolsVerifyResponse Whether it verifies. | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | The algorithm. | | `caution` | string, nullable | The caution of a retired or broken algorithm. | | `valid` | boolean | Whether the signature is valid. | ### ToolsWrapResponse A wrapped key. | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | The algorithm. | | `caution` | string, nullable | The caution of a retired or broken algorithm. | | `wrapped` | string (base64) | The wrapped key. | --- Source: https://docs.qblackbit.com/api/core/envelopes # Envelopes and re-wrap Describe self-describing envelopes, and re-wrap many of them to a newer key version in background jobs. Aegis Core API, `EnvelopeService`: 6 operations, generated from the OpenAPI document of Aegis Core 0.13.0. ## Describe `POST /v1/envelopes/describe` What an envelope says about itself, without opening it. - Role: `auditor` or higher - gRPC: `/aegis.v1.EnvelopeService/Describe` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `envelope` | string (base64) | The envelope. | Response `200` (`application/json`): [DescribeEnvelopeResponse](#schema-describeenveloperesponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## List rewrap jobs `GET /v1/rewrap/jobs` The jobs the caller may see: their own, or every job for an administrator. - Role: `operator` or higher - gRPC: `/aegis.v1.EnvelopeService/ListRewrapJobs` Response `200` (`application/json`): [ListRewrapJobsResponse](#schema-listrewrapjobsresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Start rewrap job `POST /v1/rewrap/jobs` Starts a job that re-wraps many envelopes to the newest version or another key. - Role: `operator` or higher - gRPC: `/aegis.v1.EnvelopeService/StartRewrapJob` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `items` | array of [RewrapItem](#schema-rewrapitem) | 1 to 10,000 envelopes. | | `key` | string | The key whose envelopes these are. | | `to` | string, nullable | Another key, possibly of another algorithm, to move them to. | Response `202` (`application/json`): [RewrapJob](#schema-rewrapjob) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Get rewrap job `GET /v1/rewrap/jobs/{id}` A job's progress. - Role: `operator` or higher - gRPC: `/aegis.v1.EnvelopeService/GetRewrapJob` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `id` | path | string, required | | Response `200` (`application/json`): [RewrapJob](#schema-rewrapjob) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Cancel rewrap job `POST /v1/rewrap/jobs/{id}/cancel` Stops a job after the batch under way. - Role: `operator` or higher - gRPC: `/aegis.v1.EnvelopeService/CancelRewrapJob` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `id` | path | string, required | | Response `200` (`application/json`): [RewrapJob](#schema-rewrapjob) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Rewrap job results `GET /v1/rewrap/jobs/{id}/results` A job's results so far, by item. - Role: `operator` or higher - gRPC: `/aegis.v1.EnvelopeService/RewrapJobResults` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `id` | path | string, required | | | `after` | query | integer (int64) | The first item index (0 is the first item). | | `limit` | query | integer (int64), nullable | At most this many (100 by default, at most 1,000). | Response `200` (`application/json`): [RewrapJobResultsResponse](#schema-rewrapjobresultsresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Schemas ### DescribeEnvelopeResponse What it says about itself. | Field | Type | Description | | --- | --- | --- | | `aead` | string, nullable | The HPKE AEAD of an envelope sealed to a KEM. | | `algorithm` | string | The algorithm. | | `associated_data` | boolean, nullable | Whether associated data is bound (AGV2). | | `context` | boolean, nullable | Whether a signature was made with a context. | | `form` | string, nullable | The message form of a signature: `pure`, `prehash:`, `external-mu`, `internal`. | | `format` | string | `AGV1`, `AGV2` or `AGS2`. | | `kdf` | string, nullable | The HPKE KDF of an envelope sealed to a KEM. | | `key` | string | The key that made it. | | `kind` | string | `ciphertext` or `signature`. | | `revision` | string, nullable | The specification revision (not in AGV1). | | `version` | integer (int64) | The key version. | ### ListRewrapJobsResponse The jobs. | Field | Type | Description | | --- | --- | --- | | `jobs` | array of [RewrapJob](#schema-rewrapjob) | The jobs the caller may see. | ### RewrapItem One envelope to re-wrap. | Field | Type | Description | | --- | --- | --- | | `associated_data` | string (base64) | The associated data it is bound to. | | `envelope` | string (base64) | The envelope. | ### RewrapJob A bulk re-wrap job. | Field | Type | Description | | --- | --- | --- | | `by` | string | Who started it. | | `done` | integer (int64) | Envelopes handled. | | `error` | string, nullable | Why it failed. | | `failed` | integer (int64) | Envelopes refused. | | `finished` | integer (int64), nullable | When it ended. | | `id` | string | Its identifier. | | `key` | string | The source key. | | `rewrapped` | integer (int64) | Envelopes re-wrapped. | | `started` | integer (int64) | When it started. | | `state` | string | `running`, `done`, `cancelled` or `failed`. | | `to` | string, nullable | The target key, if another. | | `total` | integer (int64) | Envelopes in the job. | | `unchanged` | integer (int64) | Envelopes already current. | ### RewrapJobResultsResponse Results by item. | Field | Type | Description | | --- | --- | --- | | `next` | integer (int64), nullable | The `after` of the next page, if any. | | `results` | array of [RewrapResult](#schema-rewrapresult) | The page. | | `state` | string | The job's state. | ### RewrapResult What happened to one envelope. | Field | Type | Description | | --- | --- | --- | | `envelope` | string (base64), nullable | The new envelope. | | `error` | string, nullable | Why it was refused. | | `index` | integer (int64) | Its index in the job. | | `unchanged` | boolean | Already in the newest format under the target's newest version. | --- Source: https://docs.qblackbit.com/api/core/encodings # Encodings PKCS #8, SPKI, JWK and COSE keys; X.509 certificates and requests; CMS, JWS, JWE and COSE messages. Aegis Core API, `EncodingService`: 16 operations, generated from the OpenAPI document of Aegis Core 0.13.0. ## CMS encrypt `POST /v1/encoding/cms/encrypt` CMS `AuthEnvelopedData` to ML-KEM recipients (RFC 9629, RFC 9936). - Role: `operator` or higher - gRPC: `/aegis.v1.EncodingService/CmsEncrypt` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `content` | string (base64) | The content. | | `recipients` | array of string | Each recipient's ML-KEM public key or certificate (PEM). | Response `200` (`application/json`): [CmsEncryptResponse](#schema-cmsencryptresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## CMS verify `POST /v1/encoding/cms/verify` Verifies a CMS `SignedData`. - Role: `operator` or higher - gRPC: `/aegis.v1.EncodingService/CmsVerify` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `certificates` | array of string | Certificates (PEM) that may identify the signers. | | `cms` | string (base64) | `ContentInfo` holding `SignedData`, DER. | | `content` | string (base64), nullable | The content, for detached signed data. | Response `200` (`application/json`): [CmsVerifyResponse](#schema-cmsverifyresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## COSE verify `POST /v1/encoding/cose/verify` Verifies a `COSE_Sign1` under a `COSE_Key`. - Role: `operator` or higher - gRPC: `/aegis.v1.EncodingService/CoseVerify` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `aad` | string (base64) | External associated data. | | `cose` | string (base64) | The tagged `COSE_Sign1`. | | `key` | string (base64) | The signer's `COSE_Key`. | Response `200` (`application/json`): [CoseVerifyResponse](#schema-coseverifyresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## JWE encrypt `POST /v1/encoding/jwe/encrypt` A compact JWE (`A256GCM`) to a recipient's JWK: `RSA-OAEP-256` or `ECDH-ES`. - Role: `operator` or higher - gRPC: `/aegis.v1.EncodingService/JweEncrypt` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `algorithm` | string, nullable | The algorithm, when the JWK fits several. | | `jwk` | string | The recipient's public JWK, as JSON text. | | `plaintext` | string (base64) | The plaintext. | Response `200` (`application/json`): [JweEncryptResponse](#schema-jweencryptresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## JWS verify `POST /v1/encoding/jws/verify` Verifies a compact JWS under a JWK. - Role: `operator` or higher - gRPC: `/aegis.v1.EncodingService/JwsVerify` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `algorithm` | string, nullable | The algorithm, when the JWK fits several. | | `jwk` | string | The signer's public JWK, as JSON text. | | `jws` | string | The compact serialisation. | Response `200` (`application/json`): [JwsVerifyResponse](#schema-jwsverifyresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Convert key `POST /v1/encoding/keys/convert` Reads a key in any supported encoding, checks it and writes it in another. Nothing is stored. - Role: `operator` or higher - gRPC: `/aegis.v1.EncodingService/ConvertKey` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `algorithm` | string, nullable | The algorithm, when the input fits several (ECDH or ECDSA, the RSA sets). | | `form` | string, nullable | The PKCS #8 form, for `pkcs8`. | | `input` | string | PEM (PUBLIC KEY or PRIVATE KEY), a JWK, or a `COSE_Key` in base64. | | `to` | string | `spki`, `pkcs8`, `jwk` or `cose-key`. | Response `200` (`application/json`): [ConvertKeyResponse](#schema-convertkeyresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## X.509 verify chain `POST /v1/encoding/x509/verify` Verifies a certificate chain, leaf first, up to one of the anchors. - Role: `operator` or higher - gRPC: `/aegis.v1.EncodingService/X509VerifyChain` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `anchors` | array of string | The trust anchors (PEM). | | `at` | integer (int64), nullable | The time to verify at, in seconds since the Unix epoch; now by default. | | `chain` | array of string | The certificates (PEM), leaf first. | Response `200` (`application/json`): [X509VerifyChainResponse](#schema-x509verifychainresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Issue certificate `POST /v1/keys/{name}/certificate` A certificate signed by a vault key: self-signed, or issued under the key's own certificate for another key (from a checked request or a public key). - Role: `admin` or higher - gRPC: `/aegis.v1.EncodingService/IssueCertificate` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `ca` | boolean | Whether the certificate is an authority's. | | `days` | integer (int64) | Days of validity from now, 1 to 36525. | | `issuer_certificate` | string, nullable | The issuer's certificate (PEM); absent for a self-signed certificate. | | `path_len` | integer (int64), nullable | Its path length constraint. | | `request` | string, nullable | The subject's PKCS #10 request (PEM), checked before anything is signed. | | `subject` | string, nullable | The subject (RFC 4514); taken from `request` when that is given. | | `subject_public_key` | string, nullable | The subject's public key (PEM), when no request is given. | Response `200` (`application/json`): [IssueCertificateResponse](#schema-issuecertificateresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## CMS decrypt `POST /v1/keys/{name}/cms/decrypt` Decrypts a CMS `AuthEnvelopedData` with a vault ML-KEM key. - Role: `operator` or higher - gRPC: `/aegis.v1.EncodingService/CmsDecrypt` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `cms` | string (base64) | `ContentInfo` holding `AuthEnvelopedData`, DER. | Response `200` (`application/json`): [CmsDecryptResponse](#schema-cmsdecryptresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## CMS sign `POST /v1/keys/{name}/cms/sign` CMS `SignedData` over a content, signed by a vault key. - Role: `operator` or higher - gRPC: `/aegis.v1.EncodingService/CmsSign` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `certificate` | string, nullable | The signer's certificate (PEM), included and naming the signer; without one the signer is named by its key identifier. | | `content` | string (base64) | The content. | | `detached` | boolean | Leave the content out. | Response `200` (`application/json`): [CmsSignResponse](#schema-cmssignresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## COSE sign `POST /v1/keys/{name}/cose/sign` A tagged `COSE_Sign1` signed by a vault key. - Role: `operator` or higher - gRPC: `/aegis.v1.EncodingService/CoseSign` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `aad` | string (base64) | External associated data. | | `kid` | string (base64), nullable | A key identifier for the header. | | `payload` | string (base64) | The payload. | Response `200` (`application/json`): [CoseSignResponse](#schema-cosesignresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Certification request `POST /v1/keys/{name}/csr` A PKCS #10 certification request for a signature key, signed by the vault. - Role: `operator` or higher - gRPC: `/aegis.v1.EncodingService/CertificationRequest` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `subject` | string | The subject (RFC 4514). | Response `200` (`application/json`): [CertificationRequestResponse](#schema-certificationrequestresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Export encoded `POST /v1/keys/{name}/export/encoded` The private key of an exportable key as PKCS #8 (PEM), JWK or `COSE_Key`, through the vault's audited export. - Role: `admin` or higher - gRPC: `/aegis.v1.EncodingService/ExportEncoded` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `form` | string, nullable | The PKCS #8 form: `seed`, `expanded`, `both` or `single`; the seed for ML-KEM and ML-DSA by default. | | `format` | string | `pkcs8`, `jwk` or `cose-key`. | | `version` | integer (int64), nullable | The version; the newest by default. | | `with_public` | boolean | Include the public key in the PKCS #8 structure. | Response `200` (`application/json`): [EncodedKeyResponse](#schema-encodedkeyresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## JWE decrypt `POST /v1/keys/{name}/jwe/decrypt` Decrypts a compact JWE with a vault key-transport or agreement key. - Role: `operator` or higher - gRPC: `/aegis.v1.EncodingService/JweDecrypt` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `jwe` | string | The compact serialisation. | Response `200` (`application/json`): [JweDecryptResponse](#schema-jwedecryptresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## JWS sign `POST /v1/keys/{name}/jws/sign` A compact JWS signed by a vault key. - Role: `operator` or higher - gRPC: `/aegis.v1.EncodingService/JwsSign` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `kid` | boolean | Name the key in the header (`kid`). | | `payload` | string (base64) | The payload. | Response `200` (`application/json`): [JwsSignResponse](#schema-jwssignresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Encoded public key `GET /v1/keys/{name}/public/encoded` The public key of a key's newest version as SPKI (PEM), JWK or `COSE_Key` (base64). - Role: `auditor` or higher - gRPC: `/aegis.v1.EncodingService/EncodedPublicKey` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | | `format` | query | string | `spki`, `jwk` or `cose-key`. | Response `200` (`application/json`): [EncodedKeyResponse](#schema-encodedkeyresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Schemas ### CertificationRequestResponse The certification request. | Field | Type | Description | | --- | --- | --- | | `request` | string | PKCS #10, PEM. | ### CmsDecryptResponse The decrypted content. | Field | Type | Description | | --- | --- | --- | | `content` | string (base64) | The content. | ### CmsEncryptResponse The enveloped data. | Field | Type | Description | | --- | --- | --- | | `cms` | string (base64) | `ContentInfo` holding `AuthEnvelopedData`, DER. | ### CmsSignResponse The signed data. | Field | Type | Description | | --- | --- | --- | | `cms` | string (base64) | `ContentInfo` holding `SignedData`, DER. | ### CmsVerifyResponse Whether the signed data verified. | Field | Type | Description | | --- | --- | --- | | `content` | string (base64), nullable | The content, when it was encapsulated. | | `content_type` | string, nullable | The encapsulated content type. | | `reason` | string, nullable | Why it did not verify. | | `signers` | array of [CmsSigner](#schema-cmssigner) | Every signer, each verified. | | `valid` | boolean | Whether every signer verified. | ### ConvertKeyResponse The converted key. | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | The key's algorithm. | | `output` | string | The key in the requested encoding. | | `private` | boolean | Whether the input held a private key. | | `public_key` | string (base64) | The public key. | ### CoseSignResponse The signed message. | Field | Type | Description | | --- | --- | --- | | `cose` | string (base64) | The tagged `COSE_Sign1`. | ### CoseVerifyResponse Whether the message verified. | Field | Type | Description | | --- | --- | --- | | `algorithm` | string, nullable | The key's algorithm. | | `payload` | string (base64), nullable | The payload. | | `reason` | string, nullable | Why it did not verify. | | `valid` | boolean | Whether it verified. | ### EncodedKeyResponse An encoded key. | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | The key's algorithm. | | `format` | string | The format asked for. | | `key` | string | The key: PEM, a JWK as JSON text, or a `COSE_Key` in base64. | ### IssueCertificateResponse The issued certificate. | Field | Type | Description | | --- | --- | --- | | `certificate` | string | The certificate, PEM. | ### JweDecryptResponse The decrypted JWE. | Field | Type | Description | | --- | --- | --- | | `plaintext` | string (base64) | The plaintext. | ### JweEncryptResponse The JWE. | Field | Type | Description | | --- | --- | --- | | `jwe` | string | The compact serialisation. | ### JwsSignResponse The JWS. | Field | Type | Description | | --- | --- | --- | | `jws` | string | The compact serialisation. | ### JwsVerifyResponse Whether the JWS verified. | Field | Type | Description | | --- | --- | --- | | `algorithm` | string, nullable | The key's algorithm. | | `payload` | string (base64), nullable | The payload. | | `reason` | string, nullable | Why it did not verify. | | `valid` | boolean | Whether it verified. | ### X509VerifyChainResponse Whether the chain verified, and what it holds. | Field | Type | Description | | --- | --- | --- | | `algorithms` | array of string | The algorithm of each signature checked, leaf first. | | `certificates` | array of [X509CertificateInfo](#schema-x509certificateinfo) | The certificates, leaf first, anchor last. | | `reason` | string, nullable | Why it did not verify. | | `valid` | boolean | Whether it verified. | ### CmsSigner One verified signer. | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | The signature algorithm. | | `certificate` | string, nullable | The signer's certificate (PEM), when one identified the signer. | | `subject` | string, nullable | The signer certificate's subject, when a certificate identified the signer. | ### X509CertificateInfo One certificate of a verified chain. | Field | Type | Description | | --- | --- | --- | | `ca` | boolean | Whether the basic constraints say it is an authority. | | `issuer` | string | The issuer, RFC 4514. | | `key_algorithms` | array of string | The subject key's algorithm, when Aegis knows it (an ambiguous key names several). | | `not_after` | integer (int64) | End of validity. | | `not_before` | integer (int64) | Start of validity, seconds since the Unix epoch. | | `path_len` | integer (int64), nullable | Its path length constraint. | | `serial` | string | The serial number, hexadecimal. | | `signature_oid` | string | The signature algorithm's object identifier. | | `subject` | string | The subject, RFC 4514. | --- Source: https://docs.qblackbit.com/api/core/algorithms # Algorithms The catalogue: every algorithm with its maturity, module, standards and what this build can run. Aegis Core API, `AlgorithmService`: 2 operations, generated from the OpenAPI document of Aegis Core 0.13.0. ## List algorithms `GET /v1/algorithms` The whole catalogue with what this build can do. - Role: `auditor` or higher - gRPC: `/aegis.v1.AlgorithmService/ListAlgorithms` Response `200` (`application/json`): [ListAlgorithmsResponse](#schema-listalgorithmsresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Get algorithm `GET /v1/algorithms/{id}` One catalogue entry. - Role: `auditor` or higher - gRPC: `/aegis.v1.AlgorithmService/GetAlgorithm` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `id` | path | string, required | | Response `200` (`application/json`): [Algorithm](#schema-algorithm) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Schemas ### Algorithm A catalogue entry and what this build can do with it. | Field | Type | Description | | --- | --- | --- | | `advisory` | [AlgorithmAdvisoryStatus](#schema-algorithmadvisorystatus), nullable | The signed advisory in force for it, if any (SVC-005). | | `apply` | string | New protection: `ready`, `not built` or `refused: `. | | `category` | integer (int64), nullable | The NIST security category, if it has one. | | `caution` | string, nullable | The caution of a retired or broken algorithm. | | `checked` | string | When that standing was checked. | | `ephemeral_only` | boolean | Whether its keys may only be ephemeral. | | `family` | string | The family. | | `id` | string | The identifier. | | `kind` | string | The kind: kem, signature, aead and the rest. | | `maturity` | string | The maturity. | | `module` | string | The licensed module. | | `name` | string | The name. | | `process` | string | Handling what exists: the same answers. | | `production` | boolean | Whether a production deployment may use it. | | `providers` | array of string | The providers that implement it. | | `quantum_safe` | boolean | Whether it resists a quantum attacker. | | `reach` | string | Where it may run. | | `revision` | string | The specification revision the identifier is bound to. | | `standards` | array of string | The standards that define it. | | `status` | string | Its standing in the standards. | | `variable_time` | boolean | Whether the set's implementation runs in variable time; such sets are refused unless the daemon was started with the flag that allows them (a laboratory only). | ### ListAlgorithmsResponse The catalogue. | Field | Type | Description | | --- | --- | --- | | `algorithms` | array of [Algorithm](#schema-algorithm) | Every entry. | ### AlgorithmAdvisoryStatus A signed advisory in force for an algorithm: from `effective` on, it has `maturity` instead of its catalogue maturity. | Field | Type | Description | | --- | --- | --- | | `effective` | string | The first day it applies (ISO 8601). | | `maturity` | string | The maturity from the effective day on. | | `reason` | string | Why. | | `sequence` | integer (int64) | Its sequence number. | | `source` | string | The published finding. | --- Source: https://docs.qblackbit.com/api/core/policy # Policy packs Built-in and signed policy packs, activation, advisories, and the protocol code points a policy allows. Aegis Core API, `PolicyService`: 7 operations, generated from the OpenAPI document of Aegis Core 0.13.0. ## List policy `GET /v1/policy` The packs, the one in force and whether imports can be verified. - Role: `auditor` or higher - gRPC: `/aegis.v1.PolicyService/ListPolicy` Response `200` (`application/json`): [ListPolicyResponse](#schema-listpolicyresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Activate policy `POST /v1/policy/activate` Puts a pack in force, with a reason. - Role: `admin` or higher - gRPC: `/aegis.v1.PolicyService/ActivatePolicy` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `id` | string | The pack's identifier. | | `reason` | string | Why, on one line, at most 200 characters. | Response `200` (`application/json`): [ActivatePolicyResponse](#schema-activatepolicyresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## List advisories `GET /v1/policy/advisories` The advisories accepted, with the sequence the next one must exceed. - Role: `auditor` or higher - gRPC: `/aegis.v1.PolicyService/ListAdvisories` Response `200` (`application/json`): [ListAdvisoriesResponse](#schema-listadvisoriesresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Import advisory `POST /v1/policy/advisories` Imports a signed advisory and puts it in force; it can only narrow. - Role: `admin` or higher - gRPC: `/aegis.v1.PolicyService/ImportAdvisory` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `document` | string | The signed document: the envelope's JSON as text, or base64 of it. | Response `200` (`application/json`): [ImportAdvisoryResponse](#schema-importadvisoryresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Import policy pack `POST /v1/policy/packs` Imports a signed pack from a file. It is not in force until activated. - Role: `admin` or higher - gRPC: `/aegis.v1.PolicyService/ImportPolicyPack` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `document` | string | The signed document: the envelope's JSON as text, or base64 of it. | Response `200` (`application/json`): [ImportPolicyPackResponse](#schema-importpolicypackresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Get policy pack `GET /v1/policy/packs/{id}` One pack in full: its rules with their sources, its hybrid rule and notes. - Role: `auditor` or higher - gRPC: `/aegis.v1.PolicyService/GetPolicyPack` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `id` | path | string, required | | Response `200` (`application/json`): [PolicyPack](#schema-policypack) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Protocol answers `GET /v1/policy/protocols` What the policy in force allows, as TLS, IKEv2, SSH, JOSE, COSE and X.509 code points. - Role: `auditor` or higher - gRPC: `/aegis.v1.PolicyService/ProtocolAnswers` Response `200` (`application/json`): [ProtocolAnswersResponse](#schema-protocolanswersresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Schemas ### ActivatePolicyResponse The policy now in force. | Field | Type | Description | | --- | --- | --- | | `policy` | string | The engine's name for it. | ### ImportAdvisoryResponse The advisory now in force. | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | The algorithm it concerns. | | `maturity` | string | The maturity it sets. | | `sequence` | integer (int64) | Its sequence. | ### ImportPolicyPackResponse The pack imported. | Field | Type | Description | | --- | --- | --- | | `active` | boolean | Always false: a pack is in force only once activated. | | `id` | string | Its identifier. | | `version` | integer (int64) | Its version. | ### ListAdvisoriesResponse The advisories accepted. | Field | Type | Description | | --- | --- | --- | | `advisories` | array of [AlgorithmAdvisory](#schema-algorithmadvisory) | Each advisory as signed. | | `last_sequence` | integer (int64) | The highest sequence accepted; the next advisory must exceed it. | ### ListPolicyResponse The packs and the one in force. | Field | Type | Description | | --- | --- | --- | | `active` | [PolicyActivation](#schema-policyactivation), nullable | The activation in force; absent while the baseline applies. | | `packs` | array of [PolicyPackSummary](#schema-policypacksummary) | Every pack known, the newest version of each. | | `policy` | string | The engine's name for the policy in force. | | `trust` | boolean | Whether a policy trust is configured, so that signed documents can be imported. | ### PolicyPack A policy pack, as signed. | Field | Type | Description | | --- | --- | --- | | `built_in` | boolean | Whether it is built into this release. | | `hybrid` | string | The hybrid rule: `required`, `allowed` or `forbidden`. | | `hybrid_basis` | string | Why, with its source. | | `id` | string | Stable identifier. | | `issued` | string | When this version was issued. | | `notes` | array of string | What was left out and why. | | `rules` | array of [PolicyRule](#schema-policyrule) | The rules. | | `sources` | array of [PolicySource](#schema-policysource) | Every document a rule cites. | | `spec_version` | string | The pack format's version. | | `title` | string | Its name for people. | | `type` | string | Always `policy-pack`. | | `version` | integer (int64) | Rises with every change of the pack. | ### ProtocolAnswersResponse The code points the policy in force allows, protocol by protocol. | Field | Type | Description | | --- | --- | --- | | `cose` | array of [ProtocolCodePoint](#schema-protocolcodepoint) | COSE algorithm values. | | `ike_authentication` | array of [ProtocolCodePoint](#schema-protocolcodepoint) | IKEv2 authentication methods. | | `ike_key_exchange` | array of [ProtocolCodePoint](#schema-protocolcodepoint) | IKEv2 key exchange methods (transform type 4). | | `jose` | array of [ProtocolCodePoint](#schema-protocolcodepoint) | JOSE `alg` values. | | `policy` | string | The policy that answered. | | `ssh_key_exchange` | array of [ProtocolCodePoint](#schema-protocolcodepoint) | SSH key exchange methods. | | `ssh_public_keys` | array of [ProtocolCodePoint](#schema-protocolcodepoint) | SSH public key algorithms. | | `tls_groups` | array of [ProtocolCodePoint](#schema-protocolcodepoint) | TLS 1.3 supported groups. | | `tls_signature_schemes` | array of [ProtocolCodePoint](#schema-protocolcodepoint) | TLS 1.3 signature schemes. | | `x509_signatures` | array of [ProtocolCodePoint](#schema-protocolcodepoint) | X.509 and CMS signature algorithm identifiers. | ### AlgorithmAdvisory An algorithm advisory, as signed. | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | The algorithm identifier. | | `effective` | string | The first day it applies (ISO 8601). | | `issued` | string | When it was issued. | | `maturity` | string | The maturity from `effective` on. | | `reason` | string | Why, in one or two sentences. | | `sequence` | integer (int64) | Rises with every advisory, across all algorithms. | | `source` | [AdvisorySource](#schema-advisorysource), nullable | The published finding. | | `spec_version` | string | Always `1`. | | `type` | string | Always `algorithm-advisory`. | ### PolicyActivation Who put a pack in force, when and why. | Field | Type | Description | | --- | --- | --- | | `by` | string | Who activated it. | | `id` | string | The pack's identifier. | | `reason` | string | Why. | | `time` | integer (int64) | When, in seconds since the Unix epoch. | | `version` | integer (int64) | Its version. | ### PolicyPackSummary A pack, in short. | Field | Type | Description | | --- | --- | --- | | `active` | boolean | Whether it is in force. | | `built_in` | boolean | Whether it is built into this release. | | `hybrid` | string | The hybrid rule: `required`, `allowed` or `forbidden`. | | `id` | string | Stable identifier, for example `us-cnsa-2.0`. | | `issued` | string | When this version was issued. | | `sources` | array of [PolicySource](#schema-policysource) | The documents its rules cite. | | `title` | string | Its name for people. | | `version` | integer (int64) | Rises with every change of the pack. | ### PolicyRule One rule of a pack. | Field | Type | Description | | --- | --- | --- | | `algorithms` | array of string | Algorithm identifiers, `family:`, or `*` for every algorithm. | | `effect` | string | `allow` or `deny`. | | `from` | string, nullable | First day it applies (ISO 8601), if not from the start. | | `id` | string | Unique within the pack. | | `keys` | array of string | Key names it applies to (`*` as a trailing wildcard); all when empty. | | `min_category` | integer (int64), nullable | The lowest NIST security category it applies to. | | `operations` | string | `any`, `apply` (new protection) or `process` (existing protection). | | `roles` | array of string | Caller roles it applies to; all when empty. | | `section` | string | Where in the source. | | `source` | string | The source it comes from. | | `until` | string, nullable | Last day it applies (ISO 8601, inclusive), if it ends. | | `warning` | string, nullable | A warning shown with the algorithm from `warning_from` on, without refusing anything. | | `warning_from` | string, nullable | When the warning starts. | ### PolicySource A document a pack cites. | Field | Type | Description | | --- | --- | --- | | `checked` | string | The date it was checked against the rules. | | `date` | string | Its date of publication (in a full pack only). | | `id` | string | How rules refer to it. | | `title` | string | Its title. | | `url` | string | Where it was read. | | `version` | string | Its version. | ### ProtocolCodePoint One code point in an answer. | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | The algorithm it stands for. | | `name` | string | The registry's name. | | `reference` | string | The document that assigns it. | | `standing` | string | `published` or `draft` (a draft appears only in a laboratory). | | `value` | string | The value on the wire. | ### AdvisorySource Where an advisory's finding is published. | Field | Type | Description | | --- | --- | --- | | `checked` | string | When it was checked. | | `title` | string | The finding's title. | | `url` | string | Where it is published. | --- Source: https://docs.qblackbit.com/api/core/audit # Audit Audit records, chain verification, signed checkpoints and exports for offline checking. Aegis Core API, `AuditService`: 4 operations, generated from the OpenAPI document of Aegis Core 0.13.0. ## List records `GET /v1/audit` A page of records, filtered; a tenant's callers see their tenant's records alone. - Role: `auditor` or higher - gRPC: `/aegis.v1.AuditService/ListRecords` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `after` | query | integer (int64) | Records after this sequence number; 0 starts at the beginning. | | `limit` | query | integer (int64), nullable | At most this many (100 by default, at most 1,000). | | `actor` | query | string, nullable | Only records by this actor. | | `action` | query | string, nullable | Only this action, or every action under it. | | `key` | query | string, nullable | Only records about this key or subject. | | `outcome` | query | string, nullable | `ok` or `refused`. | | `since` | query | integer (int64), nullable | At or after this time. | | `until` | query | integer (int64), nullable | At or before this time. | Response `200` (`application/json`): [ListRecordsResponse](#schema-listrecordsresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Checkpoint `GET /v1/audit/checkpoint` A checkpoint of the chain signed with Ed25519 and ML-DSA-87. - Role: `auditor` or higher - gRPC: `/aegis.v1.AuditService/Checkpoint` Response `200` (`application/json`): [SignedCheckpoint](#schema-signedcheckpoint) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Export records `GET /v1/audit/export` Records with their links and tags, for offline verification. - Role: `admin` or higher - gRPC: `/aegis.v1.AuditService/ExportRecords` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `after` | query | integer (int64) | Records after this sequence number. | | `limit` | query | integer (int64), nullable | At most this many (1,000 by default and at most). | Response `200` (`application/x-ndjson`): [ExportedRecord](#schema-exportedrecord) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Verify chain `GET /v1/audit/verify` Checks every record, link and the sealed head. - Role: `auditor` or higher - gRPC: `/aegis.v1.AuditService/VerifyChain` Response `200` (`application/json`): [VerifyChainResponse](#schema-verifychainresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Schemas ### ExportedRecord A record with its link and tag. | Field | Type | Description | | --- | --- | --- | | `action` | string | What. | | `actor` | string | Who. | | `algorithm` | string | The algorithm. | | `key` | string | About which key or subject. | | `outcome` | string | The outcome. | | `previous` | string | The previous record's tag (hexadecimal). | | `sequence` | integer (int64) | Its place in the chain. | | `tag` | string | This record's tag (hexadecimal). | | `time` | integer (int64) | When. | | `version` | integer (int64) | The key version. | ### ListRecordsResponse A page of records. | Field | Type | Description | | --- | --- | --- | | `next` | integer (int64), nullable | The `after` of the next page, if any. | | `records` | array of [AuditRecord](#schema-auditrecord) | The records. | ### SignedCheckpoint A signed checkpoint (`aegis-audit-checkpoint-v2`). | Field | Type | Description | | --- | --- | --- | | `digest` | string | SHA-256 over the records up to `sequence`. | | `ed25519` | [CheckpointSignature](#schema-checkpointsignature), nullable | The Ed25519 signature. | | `format` | string | The format. | | `head` | string | Its tag. | | `ml_dsa_87` | [CheckpointSignature](#schema-checkpointsignature), nullable | The ML-DSA-87 signature. | | `sequence` | integer (int64) | The newest record covered. | | `statement` | string | The statement signed. | | `time` | integer (int64) | When it was signed. | | `vault` | string | The vault's identifier. | ### VerifyChainResponse The chain is intact (a broken chain is an error). | Field | Type | Description | | --- | --- | --- | | `checked` | integer (int64) | When it was checked. | | `head` | [ChainHead](#schema-chainhead), nullable | The newest record. | | `intact` | boolean | Always true. | | `records` | integer (int64) | Records checked. | ### AuditRecord One audit record. | Field | Type | Description | | --- | --- | --- | | `action` | string | What. | | `actor` | string | Who. | | `algorithm` | string | The algorithm. | | `key` | string | About which key or subject. | | `outcome` | string | `ok`, `ok; ` or `refused: `. | | `sequence` | integer (int64) | Its place in the chain. | | `tag` | string | The record's HMAC in the chain (hexadecimal). | | `time` | integer (int64) | When, in seconds since the Unix epoch. | | `version` | integer (int64) | The key version. | ### CheckpointSignature One family's signature. | Field | Type | Description | | --- | --- | --- | | `public` | string (base64) | The public key. | | `signature` | string (base64) | The signature. | ### ChainHead The newest record. | Field | Type | Description | | --- | --- | --- | | `sequence` | integer (int64) | Its sequence. | | `tag` | string | Its tag (hexadecimal). | | `time` | integer (int64) | Its time. | --- Source: https://docs.qblackbit.com/api/core/access # Access and approvals Tokens, access policy, dual-control approvals, break-glass and OpenID Connect sign-in. Aegis Core API, `AccessService`: 17 operations, generated from the OpenAPI document of Aegis Core 0.13.0. ## Logout `POST /v1/auth/logout` Ends the caller's own sign-in session. - Role: `emergency` or higher - gRPC: `/aegis.v1.AccessService/Logout` Response `200` (`application/json`): [LogoutResponse](#schema-logoutresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Auth methods `GET /v1/auth/methods` The ways to sign in this daemon offers. Open to anyone. - Role: none (open to anyone) - gRPC: `/aegis.v1.AccessService/AuthMethods` Response `200` (`application/json`): [AuthMethodsResponse](#schema-authmethodsresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## OIDC callback `POST /v1/auth/oidc/callback` Finishes an OpenID Connect sign-in: the code exchanged, the ID token checked, a session started. Open to anyone. - Role: none (open to anyone) - gRPC: `/aegis.v1.AccessService/OidcCallback` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `code` | string | The authorisation code. | | `code_verifier` | string | The PKCE verifier whose S256 challenge the start was given (43 to 128 unreserved characters). | | `state` | string | The state from the start. | | `tenant` | string, nullable | The tenant to sign in to, when the identity has roles in several. | Response `200` (`application/json`): [OidcCallbackResponse](#schema-oidccallbackresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## OIDC start `POST /v1/auth/oidc/start` Starts an OpenID Connect sign-in: the provider's authorisation URL, with a fresh state, nonce and PKCE challenge. Open to anyone. - Role: none (open to anyone) - gRPC: `/aegis.v1.AccessService/OidcStart` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `code_challenge` | string | BASE64URL(SHA-256(verifier)), 43 characters (RFC 7636, section 4.2). | | `code_challenge_method` | string, nullable | `S256`, the only method accepted; absent means `S256`. | Response `200` (`application/json`): [OidcStartResponse](#schema-oidcstartresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Get access policy `GET /v1/sys/access/policy` The access policy of the caller's tenant, what is in force for it, and the operations a policy can name. - Role: `auditor` or higher - gRPC: `/aegis.v1.AccessService/GetAccessPolicy` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `tenant` | query | string, nullable | For a cross-tenant caller: whose policy; the default tenant's when absent. | Response `200` (`application/json`): [AccessPolicyView](#schema-accesspolicyview) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Replace access policy `POST /v1/sys/access/policy` Replaces the access policy of the caller's tenant, whole; under dual control by default. - Role: `admin` or higher - gRPC: `/aegis.v1.AccessService/ReplaceAccessPolicy` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `policy` | [AccessPolicy](#schema-accesspolicy), nullable | The new policy, whole. An empty policy removes the tenant's. | | `tenant` | string, nullable | For a cross-tenant caller: whose policy; the default tenant's when absent. | Response `200` (`application/json`): [ReplaceAccessPolicyResponse](#schema-replaceaccesspolicyresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## List approvals `GET /v1/sys/approvals` The requests under dual control the caller's tenant can see, newest first. - Role: `auditor` or higher - gRPC: `/aegis.v1.AccessService/ListApprovals` Response `200` (`application/json`): [ListApprovalsResponse](#schema-listapprovalsresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Get approval `GET /v1/sys/approvals/{id}` One request under dual control. - Role: `auditor` or higher - gRPC: `/aegis.v1.AccessService/GetApproval` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `id` | path | string, required | | Response `200` (`application/json`): [Approval](#schema-approval) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Approve `POST /v1/sys/approvals/{id}/approve` Approves a pending request, as a principal independent of the requester. - Role: `admin` or higher - gRPC: `/aegis.v1.AccessService/Approve` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `id` | path | string, required | | Request body, required (`application/json`): No fields. Response `200` (`application/json`): [Approval](#schema-approval) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Cancel approval `POST /v1/sys/approvals/{id}/cancel` Withdraws one's own request while it is open. - Role: `admin` or higher - gRPC: `/aegis.v1.AccessService/CancelApproval` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `id` | path | string, required | | Request body, required (`application/json`): No fields. Response `200` (`application/json`): [Approval](#schema-approval) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Deny approval `POST /v1/sys/approvals/{id}/deny` Denies a pending request. - Role: `admin` or higher - gRPC: `/aegis.v1.AccessService/DenyApproval` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `id` | path | string, required | | Request body, required (`application/json`): No fields. Response `200` (`application/json`): [Approval](#schema-approval) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## List break glass `GET /v1/sys/break-glass` The break-glass sessions running in the caller's tenant, and the longest one allowed. - Role: `auditor` or higher - gRPC: `/aegis.v1.AccessService/ListBreakGlass` Response `200` (`application/json`): [ListBreakGlassResponse](#schema-listbreakglassresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Start break glass `POST /v1/sys/break-glass` Starts a break-glass session for a holder of the `emergency` role, with a reason. - Role: `emergency` or higher - gRPC: `/aegis.v1.AccessService/StartBreakGlass` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `reason` | string | Why, one line of 8 to 300 characters. | | `seconds` | integer (int64) | How long, in seconds: 60 up to the policy's limit. | Response `200` (`application/json`): [BreakGlassSession](#schema-breakglasssession) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## End break glass `POST /v1/sys/break-glass/end` Ends a break-glass session: the caller's own, or another's in the tenant by an administrator. - Role: `emergency` or higher - gRPC: `/aegis.v1.AccessService/EndBreakGlass` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `holder` | string, nullable | Whose session, for an administrator ending another's; the caller's own when absent. | Response `200` (`application/json`): [EndBreakGlassResponse](#schema-endbreakglassresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## List tokens `GET /v1/sys/tokens` Every holder of the caller's tenant with their role, scope and where the token came from. Never a token or a hash. - Role: `admin` or higher - gRPC: `/aegis.v1.AccessService/ListTokens` Response `200` (`application/json`): [ListTokensResponse](#schema-listtokensresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Issue token `POST /v1/sys/tokens` Issues a token, shown once: optionally scoped, expiring, bound to a client key, or in another tenant (the system's administrators only). - Role: `admin` or higher - gRPC: `/aegis.v1.AccessService/IssueToken` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `bound` | string, nullable | The SHA-256 of a client certificate's public key (64 hex digits): the token then works only over mutual TLS with that key. | | `expires_in` | integer (int64), nullable | Seconds from now until it stops working: 60 to a year. Without it, it does not expire. | | `name` | string | The holder's name. | | `role` | string | `emergency`, `monitor`, `auditor`, `operator`, `admin` or a custom role. | | `scope` | [TokenScope](#schema-tokenscope), nullable | What the token may reach. | | `tenant` | string, nullable | The holder's tenant (`*` for the cross-tenant role); the caller's own by default. | Response `201` (`application/json`): [IssueTokenResponse](#schema-issuetokenresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Revoke token `POST /v1/sys/tokens/{name}/revoke` Revokes a holder's token and retires the name for good. - Role: `admin` or higher - gRPC: `/aegis.v1.AccessService/RevokeToken` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Request body, required (`application/json`): No fields. Response `200` (`application/json`): [RevokeTokenResponse](#schema-revoketokenresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Schemas ### AccessPolicy One tenant's access policy. What is left out takes the built-in value. | Field | Type | Description | | --- | --- | --- | | `break_glass` | [BreakGlassLimits](#schema-breakglasslimits), nullable | Break-glass limits (system policy only). | | `certificates` | array of [CertificateMapping](#schema-certificatemapping) | Client certificates accepted as principals (system policy only). | | `dual_control` | [DualControl](#schema-dualcontrol), nullable | Dual control; for a tenant other than the default one, at least the system's. | | `oidc` | array of [ClaimMapping](#schema-claimmapping) | OpenID Connect claims mapped to roles (system policy only). | | `roles` | array of [CustomRole](#schema-customrole) | Custom roles. | | `set_at` | integer (int64), nullable | When the policy was last replaced, set by the daemon, in seconds since the Unix epoch. | ### AccessPolicyView A tenant's access policy and what is in force for it. | Field | Type | Description | | --- | --- | --- | | `in_force` | [AccessInForce](#schema-accessinforce), nullable | What is in force for the tenant. | | `operations` | array of [AccessOperation](#schema-accessoperation) | Every operation a policy can name. | | `policy` | [AccessPolicy](#schema-accesspolicy), nullable | The policy as stored; empty when the tenant has none. | | `tenant` | string | The tenant. | | `writable` | boolean | Whether runtime changes can be kept. | ### Approval A request under dual control. Approvers see the request's digest, never its body. | Field | Type | Description | | --- | --- | --- | | `approvals` | array of [ApprovalVote](#schema-approvalvote) | Approvals given. | | `created` | integer (int64) | When it was asked, in seconds since the Unix epoch. | | `decided_by` | string, nullable | Who denied or withdrew it, when decided so. | | `expires` | integer (int64) | When it stops waiting. | | `id` | string | Its identifier. | | `method` | string | The method. | | `needed` | integer (int64) | Approvals needed. | | `operation` | string | The operation. | | `path` | string | The path with its query. | | `request_sha256` | string | The SHA-256 of the method, path, tenants and body, in hexadecimal. | | `requester` | string | Who asked. | | `status` | string | `pending`, `approved`, `denied`, `cancelled`, `expired` or `used`. | | `target` | string | The tenant the request acts on. | | `tenant` | string | The requester's tenant. | ### AuthMethodsResponse The ways to sign in. | Field | Type | Description | | --- | --- | --- | | `oidc` | [OidcMethod](#schema-oidcmethod), nullable | OpenID Connect, when configured. | | `token` | boolean | Bearer tokens: always. | ### BreakGlassSession A break-glass session. | Field | Type | Description | | --- | --- | --- | | `holder` | string | The holder of the `emergency` role. | | `reason` | string | Why, one line. | | `started` | integer (int64) | When it started, in seconds since the Unix epoch. | | `tenant` | string | Its tenant. | | `until` | integer (int64) | When it ends. | ### EndBreakGlassResponse The session ended. | Field | Type | Description | | --- | --- | --- | | `ended` | boolean | Always true. | | `holder` | string | Whose it was. | ### IssueTokenResponse The token, shown once. | Field | Type | Description | | --- | --- | --- | | `expires` | integer (int64), nullable | When it stops working, in seconds since the Unix epoch. | | `name` | string | The holder's name. | | `role` | string | The role. | | `tenant` | string | The holder's tenant. | | `token` | string | The token. | ### ListApprovalsResponse The requests under dual control. | Field | Type | Description | | --- | --- | --- | | `approvals` | array of [Approval](#schema-approval) | Newest first. | | `policy` | [DualControl](#schema-dualcontrol), nullable | Dual control in force for the caller's tenant. | ### ListBreakGlassResponse The break-glass sessions running. | Field | Type | Description | | --- | --- | --- | | `limit` | integer (int64) | The longest session the system's policy allows, in seconds. | | `sessions` | array of [BreakGlassSession](#schema-breakglasssession) | The sessions the caller's tenant can see. | ### ListTokensResponse The holders. | Field | Type | Description | | --- | --- | --- | | `holders` | array of [Holder](#schema-holder) | Every holder the caller may see. | | `retired` | array of string | Names never issued again. | | `writable` | boolean | Whether runtime changes can be kept. | ### LogoutResponse Whether a session ended. | Field | Type | Description | | --- | --- | --- | | `signed_out` | boolean | Whether the caller's session was found and ended. | ### OidcCallbackResponse The session. | Field | Type | Description | | --- | --- | --- | | `display_name` | string, nullable | The configured name claim, for display only; absent when it cannot be trusted to name anyone. | | `expires` | integer (int64) | When the session ends, in seconds since the Unix epoch. | | `name` | string | The holder: `oidc.` and a digest of the issuer and `sub`, the same for one person always. | | `role` | string | The role. | | `tenant` | string | The tenant. | | `token` | string | The session token (`ags_` and 64 hex digits), shown once. | ### OidcStartResponse Where to send the browser. | Field | Type | Description | | --- | --- | --- | | `authorization_url` | string | The provider's authorisation URL. | | `expires` | integer (int64) | When the sign-in stops waiting, in seconds since the Unix epoch. | | `state` | string | The state to send back with the code. | ### ReplaceAccessPolicyResponse The policy now in force. | Field | Type | Description | | --- | --- | --- | | `policy` | [AccessPolicy](#schema-accesspolicy), nullable | The policy as stored. | | `tenant` | string | The tenant. | ### RevokeTokenResponse The revocation. | Field | Type | Description | | --- | --- | --- | | `name` | string | The holder. | | `recorded` | string | `now`, or `at the next unseal` while sealed. | | `revoked` | boolean | Always true. | ### TokenScope What a scoped token may reach: each list, when given, narrows it. | Field | Type | Description | | --- | --- | --- | | `keys` | array of string | Key names as the holder writes them, for example `payments-*`. | | `operations` | array of string | Operations, for example `key.sign` or `key.*`. | | `paths` | array of string | Route patterns, for example `/v1/keys/payments-*/sign` (`*` within a segment, `**` below). | ### BreakGlassLimits How long a break-glass session may last. | Field | Type | Description | | --- | --- | --- | | `max_seconds` | integer (int64) | Seconds, at most four hours. | ### CertificateMapping A client certificate accepted as a principal. | Field | Type | Description | | --- | --- | --- | | `name` | string | The principal's name in the audit chain. | | `role` | string | Its role. | | `spki_sha256` | string, nullable | The SHA-256 of its public key, lowercase hex: when given, only that key is accepted. | | `subject` | string | The certificate's subject common name. | | `tenant` | string | Its tenant, or `*`. | ### ClaimMapping An OpenID Connect claim value that grants a role. | Field | Type | Description | | --- | --- | --- | | `claim` | string | The claim, such as `groups` or `email`. | | `role` | string | The role it grants. | | `tenant` | string | The tenant it grants it in, or `*`. | | `value` | string | The value it must hold. | ### CustomRole A role the policy defines: a built-in base, narrowed by grants. | Field | Type | Description | | --- | --- | --- | | `allow` | array of [AccessGrant](#schema-accessgrant) | What it may do: a request must match one grant. | | `base` | string | `auditor`, `operator` or `admin`: the most the role can ever do. | | `name` | string | Its name. | ### DualControl M-of-N approval of the operations listed. | Field | Type | Description | | --- | --- | --- | | `approvals` | integer (int64) | Approvals needed from principals other than the requester; 0 turns dual control off. | | `operations` | array of string | The operations covered. | | `window` | integer (int64) | Seconds a request waits for its approvals, and an approved request for its use. | ### AccessInForce What is in force for a tenant. | Field | Type | Description | | --- | --- | --- | | `break_glass_max` | integer (int64) | The longest break-glass session, in seconds. | | `dual_control` | [DualControl](#schema-dualcontrol), nullable | Dual control: the stricter of the system's and the tenant's. | ### AccessOperation One row of the authorisation matrix. | Field | Type | Description | | --- | --- | --- | | `class` | string | `read`, `use`, `manage`, `audit`, `access` or `system`. | | `method` | string | `GET` or `POST`. | | `operation` | string | The operation, such as `key.sign`. | | `path` | string | The route. | | `reach` | string | `any`, `tenant` or `system`. | | `role` | string | The lowest built-in role. | ### ApprovalVote One approval given. | Field | Type | Description | | --- | --- | --- | | `at` | integer (int64) | When, in seconds since the Unix epoch. | | `by` | string | Who approved. | ### OidcMethod The OpenID Connect provider this daemon trusts. | Field | Type | Description | | --- | --- | --- | | `issuer` | string | Its issuer. | ### Holder A token holder. | Field | Type | Description | | --- | --- | --- | | `actor` | string | The actor in the audit chain: the name with its tenant. | | `bound` | boolean | Whether it is bound to a client certificate's key (sender-constrained). | | `expires` | integer (int64), nullable | When it stops working, in seconds since the Unix epoch. | | `issued` | integer (int64), nullable | When, in seconds since the Unix epoch. | | `issued_by` | string, nullable | Who issued it, for an issued token. | | `name` | string | The name. | | `role` | string | The role: built-in or a custom role of the access policy. | | `scope` | [TokenScope](#schema-tokenscope), nullable | What the token may reach, when it is scoped. | | `source` | string | `file` or `issued`. | | `tenant` | string | The tenant, `default`, or `*` for the cross-tenant role. | ### AccessGrant Route patterns and the operations allowed on them. | Field | Type | Description | | --- | --- | --- | | `operations` | array of string | Operations, such as `key.sign` or `key.*`. | | `paths` | array of string | Route patterns, such as `/v1/keys/payments-*/**`. | --- Source: https://docs.qblackbit.com/api/core/seal # Seal and unseal Unseal by passphrase or officer shares, seal, and change the unlock. Aegis Core API, `SealService`: 5 operations, generated from the OpenAPI document of Aegis Core 0.13.0. ## Rekey `POST /v1/sys/rekey` Changes the unlock: a new passphrase or new shares; the seal key stays. - Role: `admin` or higher - gRPC: `/aegis.v1.SealService/Rekey` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `new_passphrase` | string, nullable | A new passphrase. | | `officers` | array of [OfficerIn](#schema-officerin) | The new officers. | | `passphrase` | string, nullable | The current passphrase. | | `shares` | array of [ShareIn](#schema-sharein) | Or the current shares. | | `threshold` | integer (int64), nullable | Or a new threshold and officers. | Response `200` (`application/json`): [RekeyResponse](#schema-rekeyresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Seal `POST /v1/sys/seal` Seals the vault: its keys leave memory. - Role: `admin` or higher - gRPC: `/aegis.v1.SealService/Seal` Request body, required (`application/json`): No fields. Response `200` (`application/json`): [SealResponse](#schema-sealresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Unseal status `GET /v1/sys/unseal` Whether the vault is sealed, how it unseals and the shares received so far. - Role: `auditor` or higher - gRPC: `/aegis.v1.SealService/UnsealStatus` Response `200` (`application/json`): [UnsealStatusResponse](#schema-unsealstatusresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Unseal `POST /v1/sys/unseal` Unseals with the passphrase, or hands in one officer's share. - Role: `admin` or higher - gRPC: `/aegis.v1.SealService/Unseal` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `passphrase` | string, nullable | The passphrase. | | `share` | string, nullable | One officer's share. | | `share_passphrase` | string, nullable | The passphrase a sealed share is sealed to. | Response `200` (`application/json`): [UnsealStatusResponse](#schema-unsealstatusresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Reset unseal `POST /v1/sys/unseal/reset` Wipes the shares handed in so far. - Role: `admin` or higher - gRPC: `/aegis.v1.SealService/ResetUnseal` Request body, required (`application/json`): No fields. Response `200` (`application/json`): [ResetUnsealResponse](#schema-resetunsealresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Schemas ### OfficerIn A new officer. | Field | Type | Description | | --- | --- | --- | | `name` | string | The name. | | `passphrase` | string, nullable | A passphrase to seal the officer's share to. | ### RekeyResponse The new unlock. | Field | Type | Description | | --- | --- | --- | | `mode` | string | `passphrase` or `shamir`. | | `shares` | array of [IssuedShare](#schema-issuedshare) | The new shares, shown once. | ### ResetUnsealResponse The shares wiped. | Field | Type | Description | | --- | --- | --- | | `discarded` | integer (int64) | How many. | ### SealResponse The vault sealed. | Field | Type | Description | | --- | --- | --- | | `sealed` | boolean | Always true. | ### ShareIn A share of the current unlock. | Field | Type | Description | | --- | --- | --- | | `passphrase` | string, nullable | Its passphrase, if sealed. | | `share` | string | The share. | ### UnsealStatusResponse The seal state and, while sealed, the progress of an unseal by shares. | Field | Type | Description | | --- | --- | --- | | `expires` | integer (int64), nullable | When the shares are wiped unless the threshold is reached. | | `mode` | string, nullable | `passphrase` or `shamir`. | | `officers` | array of [Officer](#schema-officer) | The officers. | | `received` | array of [ReceivedShare](#schema-receivedshare) | The shares received. | | `sealed` | boolean | Whether the vault is sealed. | | `started` | integer (int64), nullable | When the first share arrived. | | `threshold` | integer (int64), nullable | Shares needed. | ### IssuedShare A new share, shown once. | Field | Type | Description | | --- | --- | --- | | `officer` | string | Its officer. | | `share` | string | The share. | | `x` | integer (int64) | Its point. | ### Officer An officer who holds a share. | Field | Type | Description | | --- | --- | --- | | `name` | string | The officer's name. | | `sealed` | boolean | Whether the share is sealed to the officer's passphrase. | | `x` | integer (int64) | The share's point. | ### ReceivedShare A share handed in. | Field | Type | Description | | --- | --- | --- | | `by` | string | Who handed it in. | | `officer` | string | The officer it belongs to. | | `x` | integer (int64) | The share's point. | --- Source: https://docs.qblackbit.com/api/core/tenants # Tenants and key hierarchy Tenants with their key-encryption keys, the root key, rotation and crypto-shredding. Aegis Core API, `HierarchyService`: 8 operations, generated from the OpenAPI document of Aegis Core 0.13.0. ## Rewrap progress `GET /v1/sys/rewrap` How far the background job has moved each level. - Role: `auditor` or higher - gRPC: `/aegis.v1.HierarchyService/RewrapProgress` Response `200` (`application/json`): [RewrapProgressResponse](#schema-rewrapprogressresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Retire root `POST /v1/sys/root/retire` Forgets every root version but the current one. - Role: `admin` or higher - gRPC: `/aegis.v1.HierarchyService/RetireRoot` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `override_backup` | boolean | Retire although no backup was taken since the last rotation (recorded). | Response `200` (`application/json`): [RetireRootResponse](#schema-retirerootresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Rotate root `POST /v1/sys/root/rotate` A new root key version. - Role: `admin` or higher - gRPC: `/aegis.v1.HierarchyService/RotateRoot` Request body, required (`application/json`): No fields. Response `200` (`application/json`): [RotateRootResponse](#schema-rotaterootresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## List tenants `GET /v1/tenants` The key-encryption domains. - Role: `admin` or higher - gRPC: `/aegis.v1.HierarchyService/ListTenants` Response `200` (`application/json`): [ListTenantsResponse](#schema-listtenantsresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Create tenant `POST /v1/tenants` Creates a tenant with its first key-encryption key. - Role: `admin` or higher - gRPC: `/aegis.v1.HierarchyService/CreateTenant` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `name` | string | The name. | Response `201` (`application/json`): [Tenant](#schema-tenant) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Retire tenant `POST /v1/tenants/{name}/retire` Erases the tenant's older key-encryption keys. - Role: `admin` or higher - gRPC: `/aegis.v1.HierarchyService/RetireTenant` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `override_backup` | boolean | Retire although no backup was taken since the last rotation (recorded). | Response `200` (`application/json`): [Tenant](#schema-tenant) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Rotate tenant `POST /v1/tenants/{name}/rotate` A new current key-encryption key version. - Role: `admin` or higher - gRPC: `/aegis.v1.HierarchyService/RotateTenant` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Response `200` (`application/json`): [Tenant](#schema-tenant) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Shred tenant `POST /v1/tenants/{name}/shred` Erases the tenant's key-encryption keys and destroys every key under it. - Role: `admin` or higher - gRPC: `/aegis.v1.HierarchyService/ShredTenant` | Parameter | In | Type | Description | | --- | --- | --- | --- | | `name` | path | string, required | | Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `confirm` | string | The tenant's name again. | Response `200` (`application/json`): [ShredTenantResponse](#schema-shredtenantresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Schemas ### ListTenantsResponse The tenants. | Field | Type | Description | | --- | --- | --- | | `tenants` | array of [Tenant](#schema-tenant) | Every tenant. | ### RetireRootResponse The root versions forgotten. | Field | Type | Description | | --- | --- | --- | | `retired` | array of integer (int64) | Their numbers. | ### RewrapProgressResponse The job's progress per level. | Field | Type | Description | | --- | --- | --- | | `done` | boolean | Whether every level is on its current version. | | `levels` | array of [RewrapLevel](#schema-rewraplevel) | `root`, then `tenant:`. | ### RotateRootResponse The new root version. | Field | Type | Description | | --- | --- | --- | | `version` | integer (int64) | Its number. | ### ShredTenantResponse What was shredded. | Field | Type | Description | | --- | --- | --- | | `keys` | integer (int64) | Keys destroyed. | | `versions` | integer (int64) | Key versions erased. | ### Tenant A key-encryption domain. | Field | Type | Description | | --- | --- | --- | | `created` | integer (int64) | When it was created. | | `current_version` | integer (int64) | The current key-encryption key version. | | `name` | string | The name. | | `state` | string | `active` or `destroyed`. | | `versions` | array of [TenantVersion](#schema-tenantversion) | Every version. | ### RewrapLevel One level of the hierarchy. | Field | Type | Description | | --- | --- | --- | | `behind` | integer (int64) | Items still under an older version. | | `level` | string | The level. | | `total` | integer (int64) | Items in all. | | `version` | integer (int64) | Its current version. | ### TenantVersion A tenant key-encryption key version. | Field | Type | Description | | --- | --- | --- | | `created` | integer (int64) | When it was made. | | `number` | integer (int64) | Its number. | | `retired` | boolean | Whether it is erased. | --- Source: https://docs.qblackbit.com/api/core/system # System Health, readiness, information, metrics, providers, self-tests, switches, backups and the OpenAPI document. Aegis Core API, `SystemService`: 15 operations, generated from the OpenAPI document of Aegis Core 0.13.0. ## Health `GET /v1/health` Liveness: the process answers. Open to anyone. - Role: none (open to anyone) - gRPC: `/aegis.v1.SystemService/Health` Response `200` (`application/json`): [HealthResponse](#schema-healthresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Open API `GET /v1/openapi.json` This contract as an OpenAPI 3.1 document. Open to anyone. - Role: none (open to anyone) - gRPC: `/aegis.v1.SystemService/OpenApi` Response `200` (`application/json`): string Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Ready `GET /v1/ready` Readiness: whether the daemon is ready for work (vault unsealed, generator healthy, runtime state not degraded). Open to anyone, and says only whether; unavailable (503) when not ready. - Role: none (open to anyone) - gRPC: `/aegis.v1.SystemService/Ready` Response `200` (`application/json`): [ReadyResponse](#schema-readyresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Backup `POST /v1/sys/backup` The vault as a backup file; restore it with `aegisd restore`. - Role: `admin` or higher - gRPC: `/aegis.v1.SystemService/Backup` Request body, required (`application/json`): No fields. Response `200` (`application/octet-stream`): string Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Snapshot `POST /v1/sys/backup/snapshot` A verified backup kept by the daemon in its backup directory. - Role: `admin` or higher - gRPC: `/aegis.v1.SystemService/Snapshot` Request body, required (`application/json`): No fields. Response `200` (`application/json`): [SnapshotResponse](#schema-snapshotresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Info `GET /v1/sys/info` What this daemon is: version, build, deployment, policy, licence, randomness, seal state, locked memory, the witness and the runtime state. - Role: `auditor` or higher - gRPC: `/aegis.v1.SystemService/Info` Response `200` (`application/json`): [InfoResponse](#schema-inforesponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Metrics `GET /v1/sys/metrics` The daemon's metrics in the Prometheus text format: the `monitor` role, which may read this and readiness and nothing else, and above. - Role: `monitor` or higher - gRPC: `/aegis.v1.SystemService/Metrics` Response `200` (`text/plain; version=0.0.4`): string Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Providers `GET /v1/sys/providers` Every provider's manifest, its offerings and their self-test health. - Role: `auditor` or higher - gRPC: `/aegis.v1.SystemService/Providers` Response `200` (`application/json`): [ProvidersResponse](#schema-providersresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Ready detail `GET /v1/sys/ready` Readiness with every check and the reasons: the `monitor` role and above. - Role: `monitor` or higher - gRPC: `/aegis.v1.SystemService/ReadyDetail` Response `200` (`application/json`): [ReadyResponse](#schema-readyresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Self test `POST /v1/sys/selftest` Runs the self-tests again, for every offered algorithm or one. - Role: `admin` or higher - gRPC: `/aegis.v1.SystemService/SelfTest` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `algorithm` | string, nullable | One algorithm, or every offered one when absent. | Response `200` (`application/json`): [SelfTestResponse](#schema-selftestresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Reaffirm state `POST /v1/sys/state/reaffirm` Accepts a state file the audit chain does not vouch for, as it stands. - Role: `admin` or higher - gRPC: `/aegis.v1.SystemService/ReaffirmState` Request body, required (`application/json`): No fields. Response `200` (`application/json`): [ReaffirmStateResponse](#schema-reaffirmstateresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Status `GET /v1/sys/status` Whether the vault is sealed, the deployment, the policy and the providers. - Role: `auditor` or higher - gRPC: `/aegis.v1.SystemService/Status` Response `200` (`application/json`): [StatusResponse](#schema-statusresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## List switches `GET /v1/sys/switches` The modules, the switches that are off and every algorithm's standing. - Role: `auditor` or higher - gRPC: `/aegis.v1.SystemService/ListSwitches` Response `200` (`application/json`): [ListSwitchesResponse](#schema-listswitchesresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Set switch `POST /v1/sys/switches` Switches a module, family or algorithm off or on, with a reason. - Role: `admin` or higher - gRPC: `/aegis.v1.SystemService/SetSwitch` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `enabled` | boolean | On or off. | | `name` | string | A module, family or algorithm. | | `reason` | string | One line, at most 300 characters. | Response `200` (`application/json`): [SetSwitchResponse](#schema-setswitchresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Who am i `GET /v1/sys/whoami` The caller: name, role, tenant, how it signed in, its scope and expiry. Any principal, the `emergency` role included. - Role: `emergency` or higher - gRPC: `/aegis.v1.SystemService/WhoAmI` Response `200` (`application/json`): [WhoAmIResponse](#schema-whoamiresponse) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Schemas ### HealthResponse The daemon is alive. | Field | Type | Description | | --- | --- | --- | | `status` | string | Always `ok`. | ### InfoResponse What this daemon is. | Field | Type | Description | | --- | --- | --- | | `break_glass` | [BreakGlassReport](#schema-breakglassreport), nullable | Break-glass sessions running now, and whether that raises the alarm. | | `build` | [Build](#schema-build), nullable | How it was built. | | `deployment` | string | The deployment profile. | | `licence` | [Licence](#schema-licence), nullable | What the licence covers. | | `memory` | [Memory](#schema-memory), nullable | The locked memory the vault's keys live in (VLT-008). | | `policy` | [Policy](#schema-policy), nullable | The policy in force. | | `randomness` | [Randomness](#schema-randomness), nullable | The engine's generator, when it has one. | | `sealed` | boolean | Whether the vault is sealed. | | `started` | integer (int64) | When it started, in seconds since the Unix epoch. | | `state` | [RuntimeState](#schema-runtimestate), nullable | The runtime state and how far the audit chain vouches for it. | | `state_file` | boolean | Whether a state file keeps runtime changes. | | `updates` | [InfoUpdates](#schema-infoupdates), nullable | Updates: whether the directives' restrictions are held because they could not be checked. | | `uptime` | integer (int64) | Seconds since it started. | | `variable_time_allowed` | boolean | Whether this daemon allows the sets that run in variable time. | | `version` | string | The release. | | `witness` | [Witness](#schema-witness), nullable | The signed-checkpoint export (VLT-006). | ### ListSwitchesResponse The switches. | Field | Type | Description | | --- | --- | --- | | `algorithms` | array of [SwitchedAlgorithm](#schema-switchedalgorithm) | Every algorithm's standing. | | `modules` | array of [Module](#schema-module) | The modules. | | `switches` | array of [Switch](#schema-switch) | The switches that are off. | ### ProvidersResponse Every provider. | Field | Type | Description | | --- | --- | --- | | `providers` | array of [Provider](#schema-provider) | The providers, in the engine's order. | ### ReadyResponse Whether the daemon is ready. | Field | Type | Description | | --- | --- | --- | | `checks` | array of [ReadyCheck](#schema-readycheck) | Each check (`/v1/sys/ready` only). | | `error` | string, nullable | Why not, when not ready. | | `ready` | boolean | Ready for work. | ### ReaffirmStateResponse The state accepted. | Field | Type | Description | | --- | --- | --- | | `condition` | string | `vouched`. | | `generation` | integer (int64) | Its generation. | ### SelfTestResponse The self-test run. | Field | Type | Description | | --- | --- | --- | | `failed` | integer (int64) | Tests failed. | | `not_in_deployment` | integer (int64) | Algorithms outside this deployment. | | `not_run` | integer (int64) | Tests that could not run. | | `passed` | integer (int64) | Tests passed. | | `results` | array of [SelfTestResult](#schema-selftestresult) | Each test. | ### SetSwitchResponse The switch set. | Field | Type | Description | | --- | --- | --- | | `enabled` | boolean | On or off now. | | `name` | string | Its name. | | `scope` | string | `module`, `family` or `algorithm`. | ### SnapshotResponse A backup kept by the daemon. | Field | Type | Description | | --- | --- | --- | | `file` | string | The file. | | `keys` | integer (int64) | Keys verified. | | `records` | integer (int64) | Audit records verified. | | `sealed` | string, nullable | The copy sealed to the recovery key, if one is set. | | `versions` | integer (int64) | Key versions verified. | ### StatusResponse The daemon's standing. | Field | Type | Description | | --- | --- | --- | | `deployment` | string | `laboratory`, `production` or a regional profile. | | `policy` | string | The policy's name. | | `providers` | array of string | The providers' identifiers. | | `sealed` | boolean | Whether the vault is sealed. | ### WhoAmIResponse The caller. | Field | Type | Description | | --- | --- | --- | | `actor` | string | The actor in the audit chain: the name with its tenant, and `+break-glass` during a session. | | `break_glass` | integer (int64), nullable | When the caller's break-glass session ends, while one runs. | | `expires` | integer (int64), nullable | When the credential stops working, in seconds since the Unix epoch. | | `granted` | string | The role as granted: a custom role's name, or the built-in one. | | `name` | string | The holder's name. | | `role` | string | The built-in role the request runs with: `emergency`, `monitor`, `auditor`, `operator` or `admin` (`admin` during a break-glass session). | | `scope` | [TokenScope](#schema-tokenscope), nullable | What a scoped token may reach. | | `tenant` | string | The tenant, `default`, or `*` for the cross-tenant role. | | `via` | string | How the caller proved who it is: `token`, `oidc` or `certificate`. | ### BreakGlassReport The break-glass sessions running now (SVC-003). | Field | Type | Description | | --- | --- | --- | | `alarm` | boolean | Whether any session runs. | | `sessions` | array of [BreakGlassSession](#schema-breakglasssession) | The sessions. | ### Build How the daemon was built. | Field | Type | Description | | --- | --- | --- | | `profile` | string | `debug` or `release`. | | `target` | string | The operating system and architecture. | ### InfoUpdates The updates part of the daemon's information. | Field | Type | Description | | --- | --- | --- | | `degraded` | boolean | The audit chain could not be read, so the directives' restrictions in force are held. | | `modules` | array of [ModuleReport](#schema-modulereport) | The algorithm modules not running freely: limited or refused, each with the reason. | ### Licence What the licence covers. | Field | Type | Description | | --- | --- | --- | | `modules` | array of string | The licensed modules; absent when every module is licensed. | ### Memory Locked memory. | Field | Type | Description | | --- | --- | --- | | `failed` | integer (int64) | Secrets that could not be locked since start. | | `live` | integer (int64) | Allocations held now. | | `locked_pages` | integer (int64) | Pages locked now. | | `policy` | string | `required` or `best-effort`. | ### Policy The policy in force. | Field | Type | Description | | --- | --- | --- | | `contextless_refusals` | integer (int64) | Operations refused because no context was installed while the policy reads the caller or the key: each is a daemon path that forgot its context. | | `name` | string | Its name. | | `rules` | array of string | Its rules, one line each. | ### Randomness The engine's random generator (ADR 0004, addendum). | Field | Type | Description | | --- | --- | --- | | `external` | [ExternalSource](#schema-externalsource), nullable | The external source. | | `failed` | boolean | Whether the generator is in its error state. | | `generator` | string | The SP 800-90A generator. | | `mechanism` | string | Its mechanism, in words. | | `requests` | integer (int64) | Requests served. | ### RuntimeState The runtime state (ADR 0010). | Field | Type | Description | | --- | --- | --- | | `condition` | string | `unchecked`, `vouched`, `unaudited` or `degraded`. | | `detail` | string, nullable | Why, when not vouched. | | `generation` | integer (int64) | Its generation. | | `pending` | integer (int64) | Records waiting for the next unseal. | ### Witness The signed-checkpoint export. | Field | Type | Description | | --- | --- | --- | | `configured` | boolean | Whether exports are configured. | | `degraded` | boolean | Whether exports are failing now. | | `error` | string, nullable | The last error while they fail. | | `exported` | integer (int64) | The newest record exported. | | `failures` | integer (int64) | Failed exports since start. | | `last` | integer (int64) | When, in seconds since the Unix epoch. | ### Module A licensed module. | Field | Type | Description | | --- | --- | --- | | `algorithms` | integer (int64) | Algorithms in it. | | `algorithms_off` | integer (int64) | Algorithms switched off in it. | | `licensed` | boolean | Whether the licence includes it. | | `name` | string | Its name. | | `off` | boolean | Whether it is switched off. | ### Switch A switch that is off. | Field | Type | Description | | --- | --- | --- | | `by` | string, nullable | Who switched it off. | | `name` | string | A module, family or algorithm. | | `reason` | string, nullable | Why it is off. | | `scope` | string | `module`, `family`, `algorithm` or `unknown`. | | `time` | integer (int64), nullable | When, in seconds since the Unix epoch. | ### SwitchedAlgorithm An algorithm and the switch that holds it off, if any. | Field | Type | Description | | --- | --- | --- | | `family` | string | The family. | | `id` | string | The identifier. | | `kind` | string | The kind. | | `module` | string | The module. | | `name` | string | The name. | | `off_by` | string, nullable | The switch that holds it off. | ### Provider One provider. | Field | Type | Description | | --- | --- | --- | | `id` | string | Its identifier. | | `implementation` | string | How it is implemented. | | `isolation` | string | How it is isolated. | | `licence` | string | Its licence (SPDX). | | `name` | string | Its name. | | `offerings` | array of [Offering](#schema-offering) | What it offers and the self-test health of each. | | `origin` | string | Where its code comes from. | | `summary` | [HealthSummary](#schema-healthsummary), nullable | Counts of the self-test results. | | `validation` | string, nullable | A validation certificate quoted exactly, if any. | | `version` | string | Its version. | ### ReadyCheck One readiness check. | Field | Type | Description | | --- | --- | --- | | `detail` | string | What it found. | | `name` | string | `vault`, `randomness`, `state`, `selftests` or `witness`. | | `ok` | boolean | Whether it passes. | ### SelfTestResult One self-test. | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | The algorithm. | | `deployed` | boolean | Whether the algorithm is in this deployment. | | `passed` | boolean | Whether it passed. | | `provider` | string | The provider. | | `ran` | boolean | Whether the test ran. | ### TokenScope What a scoped token may reach: each list, when given, narrows it. | Field | Type | Description | | --- | --- | --- | | `keys` | array of string | Key names as the holder writes them, for example `payments-*`. | | `operations` | array of string | Operations, for example `key.sign` or `key.*`. | | `paths` | array of string | Route patterns, for example `/v1/keys/payments-*/sign` (`*` within a segment, `**` below). | ### BreakGlassSession A break-glass session. | Field | Type | Description | | --- | --- | --- | | `holder` | string | The holder of the `emergency` role. | | `reason` | string | Why, one line. | | `started` | integer (int64) | When it started, in seconds since the Unix epoch. | | `tenant` | string | Its tenant. | | `until` | integer (int64) | When it ends. | ### ModuleReport An algorithm module installed on its own (DLV-007, ADR 0024, section 4). | Field | Type | Description | | --- | --- | --- | | `limited` | string, nullable | Why it is limited. | | `name` | string | The module. | | `protocol` | integer (int64), nullable | The provider protocol it speaks. | | `provider` | string, nullable | The provider it runs. | | `reason` | string, nullable | Why it was refused. | | `requires_core` | string, nullable | The core releases it supports, as a version range. | | `root` | string | Its installation's directory. | | `sha256` | string, nullable | The SHA2-256 of the binary started. | | `state` | string | `running`, `limited` (revoked, not as malicious: new protection refused) or `refused`. | | `version` | string, nullable | Its release. | ### ExternalSource An external entropy source mixed into every request. | Field | Type | Description | | --- | --- | --- | | `configured` | boolean | Whether one is configured. | | `failed` | boolean | Whether it failed. | | `mixed` | integer (int64) | Requests it was mixed into. | ### HealthSummary Counts of self-test results. | Field | Type | Description | | --- | --- | --- | | `failed` | integer (int64) | Failed. | | `passed` | integer (int64) | Passed. | | `untested` | integer (int64) | Not tested yet. | ### Offering One algorithm a provider offers. | Field | Type | Description | | --- | --- | --- | | `algorithm` | string | The algorithm. | | `health` | string | `untested`, `passed` or `failed`. | | `kind` | string | Its kind. | --- Source: https://docs.qblackbit.com/api/core/licence # Licence The offline licence: what it allows, its limits, and installing a new one. Aegis Core API, `LicenceService`: 2 operations, generated from the OpenAPI document of Aegis Core 0.13.0. ## Get licence `GET /v1/sys/licence` The licence, where it stands, the modules open for new protection, the limits with their use and what no licence state ever blocks. - Role: `auditor` or higher - gRPC: `/aegis.v1.LicenceService/GetLicence` Response `200` (`application/json`): [LicenceStatus](#schema-licencestatus) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Install licence `POST /v1/sys/licence` Installs a licence file as issued, if it verifies against a trusted issuer and is not older than the one in force. Allowed sealed or unsealed; audited when unsealed. - Role: `admin` or higher - gRPC: `/aegis.v1.LicenceService/InstallLicence` Request body, required (`application/octet-stream`): string Response `200` (`application/json`): [LicenceStatus](#schema-licencestatus) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Schemas ### LicenceStatus The licence and where it stands. | Field | Type | Description | | --- | --- | --- | | `days_left` | integer (int64), nullable | Days until it expires, or until its grace ends. | | `detail` | string, nullable | Why, for a development build. | | `installed` | [LicenceInstalled](#schema-licenceinstalled), nullable | Who installed it, and when. | | `licence` | [LicenceDetail](#schema-licencedetail), nullable | The licence in force, if any. | | `limits_in_force` | [LicenceLimitsInForce](#schema-licencelimitsinforce), nullable | The limits in force, overage included; absent when unlimited. | | `mode` | string | `development` (a build that pins no issuer and gates nothing), `community` or `licensed`. | | `modules` | array of string | The modules open for new protection; absent when every module is. | | `never_gated` | array of [NeverGated](#schema-nevergated) | What no licence state ever blocks. | | `refused` | string, nullable | Why the licence file on disk was refused, if it was. | | `standing` | string, nullable | `none`, `not-yet-valid`, `valid`, `grace` or `expired`. | | `trusted_issuers` | array of string | The SHA2-256 of each trusted issuer. | | `used` | [LicenceUse](#schema-licenceuse), nullable | Keys and tenants in use, when the vault is unsealed. | | `warning` | integer (int64), nullable | The warning threshold reached (90, 60, 30, 7, or 0 in grace). | ### LicenceDetail A verified licence. | Field | Type | Description | | --- | --- | --- | | `customer` | [LicenceCustomer](#schema-licencecustomer), nullable | The customer. | | `digest` | string | The SHA2-256 of the file. | | `edition` | string | `community`, `professional`, `enterprise` or `sovereign`. | | `expires` | integer (int64) | When it expires. | | `grace_ends` | integer (int64) | When its grace ends. | | `id` | string | Its identifier. | | `issued` | integer (int64) | When it was issued, in seconds since the Unix epoch. | | `issuer` | string | The SHA2-256 of its issuer. | | `limits` | [LicenceLimits](#schema-licencelimits), nullable | Its limits. | | `modules` | array of string | The modules it opens. | | `not_before` | integer (int64) | When it starts. | | `serial` | integer (int64) | Its serial; a newer licence has a higher one. | ### LicenceInstalled Who installed the licence. | Field | Type | Description | | --- | --- | --- | | `at` | integer (int64) | When, in seconds since the Unix epoch. | | `by` | string | The caller. | ### LicenceLimitsInForce The ceilings enforced; absent means unlimited. | Field | Type | Description | | --- | --- | --- | | `keys` | integer (int64), nullable | Live keys. | | `tenants` | integer (int64), nullable | Tenants. | ### LicenceUse What is in use. | Field | Type | Description | | --- | --- | --- | | `keys` | integer (int64) | Live keys. | | `tenants` | integer (int64) | Tenants. | ### NeverGated Something no licence state blocks. | Field | Type | Description | | --- | --- | --- | | `detail` | string | Why. | | `name` | string | What it is. | ### LicenceCustomer Who a licence is for. | Field | Type | Description | | --- | --- | --- | | `id` | string | The identifier. | | `name` | string | The name. | ### LicenceLimits A licence's limits; absent means unlimited. | Field | Type | Description | | --- | --- | --- | | `keys` | integer (int64), nullable | Live keys. | | `overage_percent` | integer (int64) | How far over a limit new keys or tenants may still go, in percent. | | `tenants` | integer (int64), nullable | Tenants. | --- Source: https://docs.qblackbit.com/api/core/updates # Updates Signed bundles: upload, import, apply with a health check, roll back and commit. Aegis Core API, `UpdatesService`: 6 operations, generated from the OpenAPI document of Aegis Core 0.13.0. ## Get updates `GET /v1/sys/updates` The running release, the installation, the directives in force, the forced minimums and the algorithms whose new protective use they restrict. - Role: `auditor` or higher - gRPC: `/aegis.v1.UpdatesService/GetUpdates` Response `200` (`application/json`): [UpdatesStatus](#schema-updatesstatus) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Apply release `POST /v1/sys/updates/apply` Applies an imported release after a verified backup and the configured health check; a failed check goes back by itself. The daemon runs the new release once its service restarts. - Role: `admin` or higher - gRPC: `/aegis.v1.UpdatesService/ApplyRelease` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `version` | string | Its version. | Response `200` (`application/json`): [UpdateResult](#schema-updateresult) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Commit release `POST /v1/sys/updates/commit` Commits the current release: ends its soak and prunes old releases, as `aegis update commit`. - Role: `admin` or higher - gRPC: `/aegis.v1.UpdatesService/CommitRelease` Response `200` (`application/json`): [UpdateResult](#schema-updateresult) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Import bundle `POST /v1/sys/updates/import` Imports an uploaded bundle into the installation, as `aegis update import` does. - Role: `admin` or higher - gRPC: `/aegis.v1.UpdatesService/ImportBundle` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `bundle` | string | Its SHA2-256, as the upload named it. | Response `200` (`application/json`): [ImportedBundle](#schema-importedbundle) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Rollback release `POST /v1/sys/updates/rollback` Rolls back to the previous release, or to one named, above the signed floor. - Role: `admin` or higher - gRPC: `/aegis.v1.UpdatesService/RollbackRelease` Request body, required (`application/json`): | Field | Type | Description | | --- | --- | --- | | `to` | string, nullable | The release to go back to; the previous one when absent. | Response `200` (`application/json`): [UpdateResult](#schema-updateresult) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Upload bundle `POST /v1/sys/updates/upload` Uploads a bundle file and verifies it against the installation's trusted root without changing anything; it is kept, under its SHA2-256, only if it verifies. Over REST the body is streamed to disk up to the daemon's upload limit; a gRPC message is limited to 768 KiB, so larger bundles go over REST or `aegis update import` on the host. - Role: `admin` or higher - gRPC: `/aegis.v1.UpdatesService/UploadBundle` Request body, required (`application/octet-stream`): string Response `200` (`application/json`): [UploadedBundle](#schema-uploadedbundle) Errors: `400` · `401` · `403` · `404` · `409` · `413` · `500` · `503` ([what each means](https://docs.qblackbit.com/api/core/index.md#errors)). ## Schemas ### ImportedBundle A bundle imported. | Field | Type | Description | | --- | --- | --- | | `imported` | [ImportOutcome](#schema-importoutcome), nullable | What the import did. | | `status` | [UpdatesStatus](#schema-updatesstatus), nullable | The installation now. | ### UpdateResult The outcome of an apply, a rollback or a commit. | Field | Type | Description | | --- | --- | --- | | `result` | string | The outcome in a sentence. | | `status` | [UpdatesStatus](#schema-updatesstatus), nullable | The installation now. | ### UpdatesStatus The installation, its directives and the restrictions in force. | Field | Type | Description | | --- | --- | --- | | `can_apply` | boolean | Whether the console may apply and roll back (a health check is configured). | | `core_version` | string | The release running. | | `directives` | [Directives](#schema-directives), nullable | The signed directives in force, if any. | | `directives_error` | string, nullable | Why the directives file was refused, if it was; the restrictions already in force stay. | | `installation` | [Installation](#schema-installation), nullable | The installation, when the daemon runs from one (`--install-root`). | | `managed` | boolean | Whether the daemon runs from an installation. | | `minimums` | array of [ForcedMinimum](#schema-forcedminimum) | The forced minimums and where each stands. | | `modules` | array of [ModuleReport](#schema-modulereport) | The algorithm modules started from their own installations (DLV-007). | | `restrictions` | map of string to string | The algorithms whose new protective use is restricted, each with the reason. | | `uploads` | array of [UploadSummary](#schema-uploadsummary) | Bundles uploaded and verified, waiting for import. | ### UploadedBundle A bundle uploaded and verified. | Field | Type | Description | | --- | --- | --- | | `bundle` | string | Its SHA2-256, which names it for the import. | | `length` | integer (int64) | Its length in bytes. | | `report` | [BundleReport](#schema-bundlereport), nullable | What the verification found. | ### ImportOutcome What an import did. | Field | Type | Description | | --- | --- | --- | | `advisory` | boolean | Whether it was an advisory bundle: directives only, no release. | | `already` | boolean | Whether it had been imported before, so nothing changed. | | `directives` | integer (int64), nullable | The version of the directives kept, when the bundle carried newer ones. | | `files` | integer (int64) | Files installed. | | `text` | string | The outcome in a sentence. | | `version` | string | The release. | ### Directives Signed directives (ADR 0024, section 2). | Field | Type | Description | | --- | --- | --- | | `exceptions` | array of [DirectiveException](#schema-directiveexception) | Releases below the floor allowed by name. | | `expires` | integer (int64) | When they expire. | | `floor` | string, nullable | The signed floor: no release below it may be installed or run. | | `issued` | integer (int64) | When they were issued, in seconds since the Unix epoch. | | `product` | string | The product they are for. | | `revoked` | array of [DirectiveRevocation](#schema-directiverevocation) | Releases revoked. | | `version` | integer (int64) | Their version; a newer file has a higher one and an older one is refused. | ### ForcedMinimum A forced minimum: until the component reaches it, new protective use of what it names is restricted; nothing that exists stops working (DLV-006). | Field | Type | Description | | --- | --- | --- | | `affects` | array of string | The algorithms it restricts. | | `component` | string | The component: `core` or a module. | | `grace_until` | integer (int64) | When the restriction starts, in seconds since the Unix epoch. | | `id` | string | Its identifier. | | `installed` | string, nullable | The release of the component installed, if known. | | `minimum` | string | The release that fixes it. | | `reason` | string | Why. | | `state` | string | `met`, `warning` (in its grace), `restricting` or `not-installed`. | ### Installation An installation of side-by-side releases. | Field | Type | Description | | --- | --- | --- | | `busy` | boolean | Whether another process holds the installation. | | `committed` | string, nullable | The last release committed. | | `current` | string, nullable | The release linked as current. | | `current_standing` | [ReleaseStanding](#schema-releasestanding), nullable | Where the current release stands under the directives. | | `directives_error` | string, nullable | Why the installation's directives could not be read, if they could not. | | `error` | string, nullable | Why the installation could not be read, if it could not. | | `floor` | string, nullable | The local floor: the lowest release a rollback may reach. | | `previous` | string, nullable | The release before it. | | `releases` | array of [InstalledRelease](#schema-installedrelease) | The releases installed. | | `transition` | [Transition](#schema-transition), nullable | A switch in flight, if any. | ### ModuleReport An algorithm module installed on its own (DLV-007, ADR 0024, section 4). | Field | Type | Description | | --- | --- | --- | | `limited` | string, nullable | Why it is limited. | | `name` | string | The module. | | `protocol` | integer (int64), nullable | The provider protocol it speaks. | | `provider` | string, nullable | The provider it runs. | | `reason` | string, nullable | Why it was refused. | | `requires_core` | string, nullable | The core releases it supports, as a version range. | | `root` | string | Its installation's directory. | | `sha256` | string, nullable | The SHA2-256 of the binary started. | | `state` | string | `running`, `limited` (revoked, not as malicious: new protection refused) or `refused`. | | `version` | string, nullable | Its release. | ### UploadSummary A bundle waiting for import. | Field | Type | Description | | --- | --- | --- | | `bundle` | string | Its SHA2-256. | | `created` | integer (int64) | When it was made. | | `directives` | boolean | Whether it carries signed directives. | | `files` | integer (int64) | The files it installs. | | `kind` | string | `full`, `module` or `advisory`. | | `length` | integer (int64) | Its length in bytes. | | `product` | string | The product. | | `version` | string | The release. | ### BundleReport What a bundle's verification found. | Field | Type | Description | | --- | --- | --- | | `created` | integer (int64) | When it was made, in seconds since the Unix epoch. | | `directives` | boolean | Whether it carries signed directives. | | `files` | array of [BundleFile](#schema-bundlefile) | The files it installs. | | `kind` | string | `full`, `module` or `advisory`. | | `members` | integer (int64) | Its members. | | `product` | string | The product. | | `root` | [RoleVersion](#schema-roleversion), nullable | The root metadata's version and expiry. | | `snapshot` | [RoleVersion](#schema-roleversion), nullable | The snapshot metadata's. | | `targets` | [RoleVersion](#schema-roleversion), nullable | The targets metadata's. | | `timestamp` | [RoleVersion](#schema-roleversion), nullable | The timestamp metadata's. | | `version` | string | The release. | ### DirectiveException A release allowed below the floor. | Field | Type | Description | | --- | --- | --- | | `reason` | string | Why. | | `release` | string | The release. | ### DirectiveRevocation A release revoked. | Field | Type | Description | | --- | --- | --- | | `malicious` | boolean | Whether it is revoked as malicious: it is then refused outright. | | `reason` | string | Why. | | `release` | string | The release. | ### InstalledRelease A release installed. | Field | Type | Description | | --- | --- | --- | | `pinned` | boolean | Whether it is kept whatever the clean-up. | | `standing` | [ReleaseStanding](#schema-releasestanding), nullable | Where it stands under the directives. | | `version` | string | Its version. | ### ReleaseStanding Where a release stands under the signed directives. | Field | Type | Description | | --- | --- | --- | | `detail` | string | Why, in a sentence. | | `state` | string | `allowed`, `excepted`, `below-floor`, `revoked` or `revoked-malicious`. | ### Transition A switch between releases in flight. | Field | Type | Description | | --- | --- | --- | | `kind` | string | `apply` or `rollback`. | | `step` | string | The step reached. | | `to` | string | The release it goes to. | ### BundleFile A file of a bundle. | Field | Type | Description | | --- | --- | --- | | `length` | integer (int64) | Its length in bytes. | | `path` | string | Where it goes in the release. | | `sha2_256` | string | Its SHA2-256. | ### RoleVersion A metadata role's version and expiry. | Field | Type | Description | | --- | --- | --- | | `expires` | integer (int64) | When it expires, in seconds since the Unix epoch. | | `version` | integer (int64) | The version. | --- Source: https://docs.qblackbit.com/security # Security and trust What Aegis does to deserve trust, what is still to come, and what qblackbit does not claim. Each statement here can be checked; where something is planned, it says so. ## No call home Aegis Core never contacts qblackbit: no telemetry, no licence check, no update check, no "connected mode". A test in its build starts the daemon with default settings and proves it opens no outbound connection. The licence is verified offline, updates arrive as files, and the Kubernetes chart's network policy allows no egress at all. An optional online update check is (Planned), and will run only when you ask for it. ## Post-quantum on every hop Aegis owns - Aegis Core's API listener accepts TLS 1.3 with hybrid key exchange only, and authenticates with certificates from its own ML-DSA-87 authority. - Between a proxy and the daemon, and inside Aegis Cloud (edge to service, service to Core), the same rule holds: hybrid groups only. - What stays classical is stated: the public certificate on an internet-facing edge (browsers cannot verify ML-DSA certificates yet), and Google's own sign-in tokens in the cloud. Key exchange with browsers is hybrid whenever the browser supports it. Details: [Quantum-safe transport](https://docs.qblackbit.com/concepts/transport.md). ## Signed, reproducible releases - Every byte of a release is covered by update metadata that needs a threshold of signatures in **both** families, Ed25519 and ML-DSA-87, from separate roles, following The Update Framework. - `aegis-verify` checks a bundle offline before anything is installed; a damaged, older or mixed bundle is refused with the reason. - Each release is built twice from clean and the two results must match, and it carries its software and cryptography bills of materials (CycloneDX) and build provenance. - Experimental algorithms run in sandboxed processes started only by a verified digest. > **Planned:** > > The production signing roots are made at a key ceremony, which has not been held yet. Until it is, releases are prepared for signing offline and the root you trust is the one qblackbit gives you, confirmed by a second route. A second, independent builder, hardening checks on every shipped binary, and signed commits and tags are also (Planned). ## Keys - Private keys never leave the vault unless a key was created exportable, and every export is audited and, by default, needs a second person's approval. - At rest, every stored value is encrypted and bound to its place; in use, keys sit in locked, guard-paged memory, and core dumps are off. - Each tenant has its own key-encryption key. In Aegis Cloud every organisation is its own tenant, reached with a token scoped to that tenant. - Every action is in a hash-chained [audit log](https://docs.qblackbit.com/concepts/audit.md) with signed checkpoints you can check offline. ## What qblackbit does not claim - **Quantum-proof.** No product can promise that. - **A certification.** None is held for Aegis or the cloud service. Until a certificate names Aegis, none applies. - **An audit or a penetration test.** None has taken place yet; an internal penetration test is planned after version 1.0.0, and an external one later. - **Resistance to reverse engineering**, or protection from a machine's administrator: root, a hypervisor operator or kernel-level malware can read keys in use. Keeping root keys in an HSM or a TPM is (Planned). - **Physical side channels.** No claim about power, electromagnetic or fault attacks with physical access. - **Absolute constant time.** Timing checks cover a stated set of operations in the release build, not everything; experimental algorithms carry no timing claim. - **The security of research algorithms.** They run only in laboratories, isolated, and may be broken tomorrow. Aegis Core 1.0 runs as one daemon process: the network-facing code and the keys in use share an address space, and only the sandboxed algorithm providers run apart. Splitting the daemon into a gateway with no keys, a key holder with no network, an audit writer and an updater is (Planned) for a later version. ## Report a vulnerability Write to [security@qblackbit.com](mailto:security@qblackbit.com), the contact in qblackbit's [security.txt](https://qblackbit.com/.well-known/security.txt). Keep the details out of public channels until a fix is out.