Home/Documentation
NIRVQ Documentation
The official documentation for the NIRVQ v4.1 specification and the Phase 1 reference implementation — how the system works end to end, how the codebase is built, and the exact evidence status of every claim.
What NIRVQ is
NIRVQ is a post-quantum sealing system for data at rest. It protects an object so that opening it requires all of its required key components — not any one of them — and so that the object can survive the loss, rotation, or compromise of a single cryptographic family.
A single sealed object — a ciphertext — is bound to up to three independent secrets:
- Slot 1 — ML-KEM-768 (FIPS 203, standardised). A lattice-based key encapsulation mechanism.
- Slot 2 — HQC-192 / HQC-3 (code-based, FIPS 207 pending). A second, cryptographically diverse family.
- Slot 3 — Threshold anchor secret
S_3. A secret held by a threshold key service, never by a single custodian.
The combiner derives the key that protects the object from all required slots together. This is called AND-survival: for the VAULT profile, learning any one or two slots is not enough to open the object. If one family is later weakened, the object does not automatically fall — the other families still stand.
NIRVQ is not a blockchain, consensus protocol, or signing system; not a wallet or a live signing path; not a transport encryption protocol (use TLS / Noise for data in motion); and not a general-purpose database encryption product. It protects material at rest: archives, backups, seed material, custody records, documents, and any blob whose confidentiality must survive decades and a change in cryptographic assumptions.
NIRVQ — System Architecture
Phase 1 reference implementation · v0.1.0-phase1-reference · liboqs 0.16.0 · Python 3.12
Clients
CLI
nirvq serve · 8 commands
HTTP API
9 endpoints · loopback-only
Demos
Seed archive · third-party verify
Envelope
ERR-OPEN-FAILED · re-wrap / burn lifecycle
Combiner — three components, one key
ML-KEM-768
ciphertext 1,088 B
ss_1 · 32 BHQC-3
ciphertext 8,978 B · sk 4,602 B
ss_2 · 32 B · HQC-192Anchor secret
threshold-shared
S_3 · 32 BServices
Key service
Shamir threshold · epochs · EpochStore
Passport
Merkle log · threshold verify
verify limbs L1–L8Beacon
Rounds · staleness
24 h bound · successorGovernance
Constitution · curators
K4 · tribunal · burn · exitABSOLUTE — one-time-pad layer
Foundation
github.com/nirvqHQ/nirvq-system · docs/NIRVQ-PROPOSAL.pdf · Phase 1 reference — not a production system
Where to start
| If you are… | Start here |
|---|---|
| Evaluating NIRVQ | This overview → Combiner & Envelope → Evidence & status |
| Integrating NIRVQ | Getting started (below) → Profiles & API / CLI |
| Operating NIRVQ | Key Service & Lifecycle → Passport, Beacon & Governance |
| Auditing NIRVQ | Combiner & Envelope → Codebase, Build & Tests → Evidence & status |
Status labels used everywhere
- Demonstrated (local limb) — implemented and tested locally on real KEMs in the reference build. Not independently witnessed.
- Specified — defined normatively in the v4.1 specification, with tests or design in place, but not yet demonstrated to the gate standard.
- Absent — specified as a target, not yet implemented.
- Simulated boundary — implemented with an in-memory or local substitute for a production boundary (for example, no physical HSM). Never presented as production evidence.
No NIRVQ gate — G-1, G-COMB, M-LC-1, G-2, G-3, G-LC, G-EB, or G-ABS-5 — is claimed passed anywhere in this documentation. Where a feature is experimental, it says so.
Design principles
- AND, not OR. Security composes by conjunction for the high-assurance profiles. A combiner that falls if any component falls is not used for VAULT.
- Diversity is not proof. Using two different families does not by itself prove the combination is secure. The three-component combiner generalises the two-component construction in NIST SP 800-227 §4.6 and is subject to independent review under gate G-COMB.
- One error. Every opening failure returns exactly
ERR-OPEN-FAILED. No per-slot, per-policy, or per-tag error leaks to a caller, a log, or an API. - Living objects. A sealed object is not frozen to the keys that created it. Its header can be re-wrapped to a new epoch without re-encrypting its body — then the old epoch can be burned, after every successor is verified.
- Verifiable history. Every object carries a Passport stub in its authenticated header, and the full system maintains a hash-chained Passport and transparency log so a third party can verify an object's history from public keys and the log alone.
- Honest status. Every claim is labelled Demonstrated, Specified, or Absent, per evidence category. Test counts are never summed across categories.
Getting started — requirements
- Python 3.12 (reference implementation)
- liboqs 0.16.0 with liboqs-python 0.16.0.2 — real ML-KEM-768 + HQC-3
cryptography==51.0.1,pytest==9.2.0(pinned inrequirements.txt)- cmake ≥ 3.28 and gcc ≥ 13 if building liboqs from the verified release tarball
The host Python is PEP 668 externally managed. Always work inside the project virtual environment. Never use --break-system-packages.
Install (reference build)
scripts/build_liboqs.sh verifies the official release tarball before building (SHA-256 162d5b51…01eae). The KEM module refuses to import oqs unless the prebuilt library is present, so the wrapper's auto-install path can never trigger accidentally. If real KEMs are unavailable, the build fails fast with RealKemsUnavailable — it never silently falls back. A clearly labelled TEST KEM backend exists for deterministic unit work only and must be selected explicitly.
Your first seal and open
Any failure — tampered header, wrong epoch, burned epoch, bad tag, truncated bytes — raises the single opening error:
Run the tests
Expect a long run on the real backend: HQC-3 in liboqs 0.16.0 is reference-only (≈96 ms encapsulate / ≈131 ms decapsulate per operation). Report results per evidence category — never as one summed total. See Codebase, Build & Tests.
Core concepts
- Object — the unit NIRVQ protects: an arbitrary byte string plus a fresh random 32-byte
object_idassigned at birth. Theobject_idnever changes, including across re-wraps. - Envelope — the sealed form of an object: the NVQ4 wire bytes. It never contains encapsulation keys (
ek_1/ek_2) — keys are resolved by epoch ID from the key service. An envelope carrying anekis non-conforming. - Slot — one input to the combiner. Slot 1 = ML-KEM-768 shared secret; Slot 2 = HQC-192 shared secret; Slot 3 = anchor secret
S_3. Slot 4 is an annex position outside the tag/KDF (skipped by length on open, never trusted). Slot 5 is vacant. - AND set — the slots a profile requires. VAULT requires {1,2,3}; VAULT-FEDERAL requires {1,3}; CORE requires {1}. Sealing aborts if any AND-set key is unavailable — NIRVQ never seals a reduced-slot envelope.
- Epoch — a numbered generation of key material. Re-wrap moves an object to a newer epoch; burn destroys an old epoch's decapsulation material after all its objects have verified successors.
- DEK / KEK / K_TAG — a fresh random 256-bit DEK per object encrypts the body and is never derived from the combiner; the combiner-derived KEK wraps the DEK, and K_TAG keys the envelope tag.
- Passport — the per-object history record. A 32-byte stub derived from the
object_idsits inside every envelope's authenticated header.
The full documentation map
Fourteen pages, in reading order. Each page is self-contained; the sidebar on every docs page carries the same map.
| Page | What it covers |
|---|---|
| Overview & Getting Started | What NIRVQ is, status labels, design principles, install, your first seal and open |
| Combiner & Envelope | NIRVQ-COMB-v1 derivation, IKM layout, the NVQ4 wire format, the 8 sealing steps, opening without short-circuiting |
| Key Service & Lifecycle | Epochs, threshold custody, the decapsulation budget, header-only re-wrap, successor verification, the no-burn rule |
| Passport, Beacon & Governance | Passport chains and the transparency log, Survival Vector, beacon and Fallback Covenant, constitution and curator voting, the immune feed, the security model, ABSOLUTE |
| ABSOLUTE — One-Time-Pad Service | The separate experimental one-time-pad service: Wegman–Carter authentication, pad ledger, depot simulation, the 1 GiB pilot cap |
| FO Validity Checker | The FO re-encryption check that makes the decapsulation budget operable on real KEMs — both limbs have landed and are wired at the production call sites (fix wave, Dec 6, 2026) |
| ACSP Detection | The Anchor Compromise-Simulation Programme: four detection limbs, six scenarios — S1/S2 fail, S3–S6 pass, the gate does not pass and is carried as accepted residual R-ACSP-1 (canary p = 0.05 decided) |
| Threat Model & Security | Six adversary classes, twelve attack analyses with residual status, T-COMB-15 in full, and what is explicitly out of scope |
| Codebase, Build & Tests | Module layout, build and run, the T-COMB battery, KAT vectors, the five evidence categories, measured performance, consolidated limitations |
| Profiles & API / CLI | Choosing CORE, VAULT-FEDERAL, or VAULT; the Python API; the full-system CLI; third-party verification; the preservation worked flow |
| Operations Runbook | Roles, standing duties, the epoch-rotation and backup procedures, and the four incident runbooks |
| Design Decisions & Open Items | The D-01–D-20 decision register, the defects the process found and fixed, and every open item — all 15 items in the decision wave now ruled (0 open), including F3 MANDATE and THR-1 = M22 (Sep 2029) |
| Evidence, FAQ & Glossary | The gate ledger, maturity levels, version history, the short FAQ, and the glossary |
| Use Cases — Banks, AI & Web3 | Who NIRVQ is for: banks and financial institutions (wedge 6/6), AI companies (narrow 6/6-shaped escrow case only), blockchain and web3 (Digital Asset Preservation, Target) — applicability, not customers |
Prefer questions to chapters? The Questions & Answers page covers the same ground as 29 plain-language answers, with a filter. Prefer the whole documentation as one file? It is also maintained as a GitBook-ready Markdown source for hosting as a standalone docs site.
