Home/Documentation/Profiles & API / CLI

Profiles & the API / CLI reference

Choosing between CORE, VAULT-FEDERAL, and VAULT — then the complete reference surface: the Python API of the reference implementation, the full-system CLI, and third-party verification from the log alone.

DEFAULT VAULT PROFILE STRINGS EXACT · CASE-SENSITIVE ERRORS ONE — ERR-OPEN-FAILED

Profiles: CORE, VAULT-FEDERAL, VAULT

COREVAULT-FEDERALVAULT
AND set{1}{1,3}{1,2,3}
SlotsML-KEM-768ML-KEM-768 + anchorML-KEM-768 + HQC-192 + anchor
IKM32 B64 B96 B
slot_map0x010x050x07
Envelope (KAT)1,459 B1,528 B10,521 B
Intended useSingle-family sealing where the anchor and second family are not requiredDeployments that require the threshold anchor but cannot carry HQC (size / jurisdiction)Default high-assurance profile
Falls if…ML-KEM-768 fallsML-KEM-768 falls and the anchor is recoveredAll three components fall (subject to the standards position and A-EXT)

Choosing a profile

  • Choose VAULT unless you have a specific reason not to. It is the only profile with family diversity and the anchor.
  • Choose VAULT-FEDERAL when the deployment mandates anchor custody but HQC ciphertext size (≈9 KB per object) or availability is disqualifying.
  • Choose CORE only for low-assurance or interoperability cases, and document the decision: CORE is a single-family construction by design, and slot 1 alone opening a CORE object is specified behaviour, not a bug.

Downgrade is rejected: an opener enforces the policy floor for the expected profile, and a VAULT object presented as CORE (or with a reduced slot map) fails with ERR-OPEN-FAILED after the full decap/tag path. The profile string is exact and case-sensitive: "CORE", "VAULT", or "VAULT-FEDERAL".

Python API (reference implementation)

Envelope — nirvq.envelope

seal(key_service, profile: str, body: bytes, epoch_id: int) -> bytes seal_with_dek(...) -> bytes # internal/testing variant with caller DEK handling open_envelope(key_service, data: bytes, expected_profile: str | None = None) -> bytes parse_envelope(data: bytes) -> Envelope canonical_header(env: Envelope) -> bytes passport_stub(object_id: bytes) -> bytes # 32 B stub

Combiner — nirvq.combiner

combine(profile, secrets: dict[int, bytes], ctx: dict) -> tuple[bytes, bytes, bytes] # returns (KEK, K_TAG, nonce_w); raises ValueError on bad IKM length / missing fields build_ikm(profile, secrets) -> bytes # exact-length concatenation anchor_commitment(epoch_id_3: bytes, s_3: bytes) -> bytes # 48 B hkdf_extract(salt, ikm) -> bytes hkdf_expand(prk, info, length) -> bytes

Key service — nirvq.keyservice

EpochStore(backend); .create_epoch(epoch_id); .get(epoch_id); .is_burned(epoch_id) KeyService(store); .encapsulate(epoch_id, profile); .decapsulate(epoch_id, slot, ct) LiveRegistry(); .register(object_id, epoch_id); .mark_verified_successor(object_id)

Errors — nirvq.errors

OpenFailed # raised for every opening failure; externally: ERR-OPEN-FAILED SealError # sealing failures (e.g. AND-set key unavailable -> abort)

KEM backend — nirvq.kem

RealKemBackend() # default; liboqs 0.16.0, ML-KEM-768 + HQC-3 TestKemBackend() # explicit fallback only; preserves lengths, provides NO hardness require_real_kems() # gate used by tooling that must not run on the test backend

Full-system services & CLI (F7 integration)

The full reference system wires the core into a persistent object store (SQLite); a sealing service exposing seal / open / rewrap / burn / verify; a CLI and a local API over that service; and an end-to-end demo: seal a BIP-39-style seed archive, re-wrap it across an epoch, burn the old epoch, and verify the result from the transparency log alone.

# Illustrative session shape (see the F7 module report for exact commands # in your checkout — flags are those of the integrated reference build) nirvq seal --profile VAULT --epoch 1 --in seed-archive.txt --out seed.nvq4 nirvq open --in seed.nvq4 --out seed-archive.txt nirvq rewrap --in seed.nvq4 --to-epoch 2 --out seed-v2.nvq4 nirvq verify --in seed-v2.nvq4 --from-log # third-party style verification nirvq burn --epoch 1 # refused until successors verify

The sealing service also runs read-only: serve --read-only refuses epoch-create, seal, rewrap, and burn with 403 after auth, while open and GETs still work (TR-01 guardrail, Dec 6, 2026). Duplicate epoch creates are idempotent — a repeat create returns 201 with the stored record, not an error (decision-review D-01 ruling).

Third-party verification

A verifier who has only the public keys and the transparency log — no key-service access — can check an object's Passport chain and Merkle anchoring:

.venv/bin/python demo_third_party_verify.py

This is the property that makes Passport more than a receipt: verification does not require trusting the operator's database.

Digital Asset Preservation — worked flow

  1. Export a BIP-39-style seed archive from the wallet (owner's existing process).
  2. seal it under VAULT at the current epoch; store the envelope in the object store.
  3. At epoch rotation, rewrap to the new epoch (header-only; the seed plaintext never leaves the boundary).
  4. Verify successors (4 steps), then burn the old epoch.
  5. At any point, a third party can verify --from-log that the archive's Passport history is intact.
Market status — stated plainly

This wedge is ABSENT as a market position: no custody partner, no letter of intent, no pilot, no chain integration, and no market size is claimed. Validation runs through the proposal's P4 interview and LOI gates. NIRVQ does not generate keys, sign transactions, participate in consensus, or protect a live signing path — its job starts when material is at rest and ends when it is opened inside the owner's boundary.