Home/Envelope

An envelope built to be maintained for fifty years

Everything NIRVQ seals lives in an NVQ4 envelope. The header carries the key material and a Passport stub; the body stays untouched by every maintenance operation for the life of the archive.

FORMAT NVQ4 · 0x0400 RE-WRAP HEADER ONLY BODY DIGEST SHA-384

LIVE DEMONSTRATION

Seal an envelope, right here

Pick a profile, seal the sample text, and inspect the envelope the reference format produces — header fields, KEM ciphertext sizes, and a real SHA-384 body digest computed on your device.

Runs entirely in your browser: the digest below is a real SHA-384 computed on this device, and the envelope size is the reference implementation's KAT-measured size for the selected profile — each profile carries different components, and only VAULT carries both KEM ciphertexts. The rows add up to the total. The seal itself is illustrative: the production seal runs the full combiner in the reference implementation.

Nothing sealed yet.
Choose a profile and seal the sample text.

LIFECYCLE

Four operations, fifty years

An archive is not sealed and forgotten. Algorithms age, custodians change, and eventually data must die. NVQ4 specifies each operation so none of them ever exposes the plaintext.

Envelope lifecycle — NVQ4 0x0400

8 sealing steps  ·  one error: ERR-OPEN-FAILED  ·  object_id never changes

The lifecycle — seal, live, open, re-wrap, burn

BIRTH

Seal

Fresh DEK + object_id

8 steps, then emit
LIVE

Stored

Wire bytes anywhere

file · store · database
OPEN

Verify

Tag + passport check

all-or-nothing
RE-WRAP

Rotate

Header-only, new epoch

body never re-encrypted
BURNED

Retire

Old epoch destroyed

after all successors verify

Sealing — the 8 steps

STEP 1

Fresh DEK

Random 256-bit

never derived
STEP 2

Object ID

Fresh random 32 B

never changes · fresh nonce_b 12 B
STEP 3

Fetch AND set

Abort if any missing

no reduced-slot seal
STEP 4

Encapsulate

One encapsulation per AND-set slot

VAULT: two ciphertexts, two 32 B secrets
STEP 5

Encrypt body first

AES-256-GCM

AAD = framed object ID
STEP 6

Digest body

SHA-384(ciphertext)

kept outside header
STEP 7

Combine & wrap

KEK wraps the DEK

header hashed · nonce_w derived
STEP 8

Tag, emit, erase

HMAC-SHA-384 tag

secrets erased

Envelope anatomy — what is on the wire

Canonical header

Framed object ID · epoch

hashed at seal · header_hash = SHA-384

Wrapped DEK + body

DEK under KEK · body under DEK

wrapped_dek 48 B (32 B DEK + 16 B tag)

Tag + digest

HMAC-SHA-384 tag, 32 B

body_digest 48 B · outside header

Successor verification — before any burn

1

Same object_id

The identity survives re-wrap

2

Same body_digest

Hence the same body

3

Same body_ciphertext

Byte-identical bytes

4

Same nonce_b + profile

And the successor opens under its epoch

STEP 0

Predecessor attested first

_unwrap_dek_only checks tag, header hash and body_digest — without decrypting the predecessor body (LC-2)

Profiles — slot map and birth overhead (measured)

Profileslot_mapAND setWhat travelsBirth overhead
CORE0x01{1}ML-KEM-768 only1,433 B
VAULT-FEDERAL0x05{1, 3}ML-KEM-768 + 48 B anchor commitment1,502 B
VAULT0x07{1, 2, 3}ML-KEM-768 + HQC-192 + 48 B anchor commitment10,495 B

Burn — the no-burn rule and the burn machine (steps 0–5)

No-burn rule: an epoch may not burn while any live (unmigrated, unverified) envelope remains under it. A burned epoch’s envelopes can never open again — which is why successor verification is load-bearing.

Burn machine: 0 Gate (all gate items present; no emergency waiver, ever) · 1 Successors (no-burn rule re-checked) · 2 Finalise (attestations due within 7 days) · 3 Declare (≥ 14 days after the first attestation) · 4 Destroy (keys erased, backup KEKs zeroed) · 5 Audit (old opens fail, new opens succeed, backup restores refused).

LC-2 — the property the harness proved: re-wrap never opens predecessor bodies — W3 harness on real KEMs: 1,000 / 1,000 envelopes re-wrapped, predecessor bodies opened during re-wrap: 0 / 1,000.

One error, always. Any failure — tampered header, wrong epoch, burned epoch, bad tag, truncated bytes — raises only ERR-OPEN-FAILED. No per-slot, per-policy, or per-tag error ever leaks.

Figure — the NVQ4 envelope lifecycle. Seal, header-only re-wrap, four-step successor verification, then epoch burn under the no-burn rule. The body is never decrypted during re-wrap.

STEP 1 — SEAL

Birth

Content is sealed under the combined key. The body digest sits outside the canonical header, and the body is authenticated against the framed object ID.

STEP 2 — RE-WRAP

Key rotation, header only

When algorithms or custodians change, only the header is re-wrapped under fresh keys. The body is never decrypted — a property verified exhaustively after an early design flaw was found and fixed.

STEP 3 — VERIFY

Successor verification

A normative four-step procedure confirms a re-wrapped envelope legitimately succeeds its predecessor before the old header is retired.

STEP 4 — BURN

Epoch burn

At end of life, governance can burn an entire epoch of headers, rendering the sealed bodies permanently unrecoverable — destruction as a specified operation, not an accident.

PROFILES

Three profiles, one envelope

Profiles tune the envelope to the assurance environment. Sizes below are the reference implementation's known-answer-test envelopes on the real-KEM backend — measured, not modelled.

CORE

1,459 bytes / envelope

The baseline seal for general long-term archives — documents, records, and research data that must remain confidential for decades.

  • Full two-KEM combiner
  • Header-only re-wrap
  • Passport stub in header

VAULT-FEDERAL

1,528 bytes / envelope

A constrained profile shaped for institutional and public-sector archives, with a compact header and strict canonical layout.

  • Full two-KEM combiner
  • Compact canonical header
  • Header-only re-wrap

Measured on the reference build (liboqs 0.16.0): ML-KEM-768 ciphertext 1,088 B · HQC-192 ciphertext 8,978 B · KAT-measured envelope sizes (26-byte body): CORE 1,459 B · VAULT-FEDERAL 1,528 B · VAULT 10,521 B. Birth overhead at an empty body: 10,495 B (VAULT).