Riosz Confidential Wrapper Open Standard — Public Technical Specification (Draft)
Status: Public Standard Draft (Request for Comment)
Version:1.0.0-draft(Protocol Suitev1 / vault-3of5)
License: Apache License 2.0 (Specification and Reference Verifiers); CC0 1.0 (Generated Evidentiary Artifacts)
Date: November 2026
1. Scope and Design Objectives
The Riosz Confidential Wrapper Open Standard defines a vendor-neutral, open cryptographic protocol and self-contained archival container format for cryptographic proof of prior existence and blind, multi-party threshold key escrow.
It is engineered to satisfy four core invariants over a 20+ year statutory preservation horizon:
- Zero-Server Evidentiary Verification (Tier 1): Any third party (court, patent examiner, auditor, or counterparty) can verify that a plaintext asset existed at a specific point in time using only the asset, a lightweight receipt or container, and standard cryptographic tools—without contacting any issuing server or holding any private keys.
- Post-Quantum and Algorithmic Diversity (
vault-3of5): Encrypted escrow payloads are protected by a 3-of-5 threshold scheme spanning five mathematically distinct cryptographic families (lattice, NTRU, unstructured LWE, code-based, and elliptic curve), tolerating the complete cryptographic break or deprecation of up to two families. - Zero-Knowledge Blind Escrow: Neither the protocol coordinator, timestamping infrastructure, nor any individual key steward ever receives plaintext data, and no coalition of fewer than three independent stewards can reconstruct the file encryption key.
- Zero-Dependency Long-Term Recovery (Tier 2): Once threshold key material is released, the archival container embeds a minimal, human-auditable standard-library reconstructor alongside error-correcting parity so data can be recovered decades later without proprietary software or third-party C libraries.
2. Terminology and Normative Conventions
The key words MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL in this document are to be interpreted as described in RFC 2119.
- Depositor: The entity certifying an asset and sealing it into a Riosz container.
- Beneficiary / Claimant: The entity authorized to request recovery under a defined release condition.
- Steward: An independent entity holding custody of one cryptographic slot’s private key material.
- Verifier: Any party validating the integrity and timestamp of a Riosz receipt or container.
- Asset ($F$): The arbitrary-length plaintext byte stream being sealed and timestamped.
- Binary Digest Convention: Unless explicitly stated as hexadecimal (e.g., inside JSON strings), all
SHA-384(...)outputs used as inputs toHMAC,HKDF, orCommitmentconcatenation are raw 48-byte binary digests.
3. Cryptographic Primitives and The vault-3of5 Engine
3.1. Hash Function Standard
All protocol commitments, key fingerprints, and integrity checks MUST use SHA-384 (NIST FIPS 180-4).
3.2. Hedged File Key Generation and Key Schedule
To eliminate single-point RNG failure, the 32-byte File Master Key ($K_{\text{file}}$) MUST be derived by hedging system entropy with the plaintext digest and a 32-byte random salt:
\[K_{\text{file}} = \text{Truncate}_{32\text{ bytes}}\Big(\text{HMAC-SHA-384}\big(\text{OS\_Entropy},\; \text{SHA-384}(F) \parallel \text{RandomSalt}_{32}\big)\Big)\]From $K_{\text{file}}$, the 256-bit Data Encryption Key ($K_{\text{DEK}}$, 32 bytes) and 384-bit Authentication Key ($K_{\text{MAC}}$, 48 bytes) MUST be derived via HKDF-SHA-384 (RFC 5869):
Streaming Implementation Note: Because
HKDF-SHA-384uses $\text{salt} = \text{SHA-384}(F)$, constant-memory ($O(1)$ RAM) streaming implementations process $F$ in two sequential passes over local storage: Pass 1 computes $h_{\text{plain}} = \text{SHA-384}(F)$ and derives $K_{\text{file}}, K_{\text{DEK}}, K_{\text{MAC}}$; Pass 2 compresses, chunks, encrypts, and authenticates $F$.
3.3. Bulk Stream Compression, Encryption and Authentication
- Pre-Compression and Bit-Exact Round-Trip Determinism: The plaintext stream $F$ MUST be compressed using raw Deflate (RFC 1951,
wbits=-15, no gzip/zlib headers; compressionlevel=6RECOMMENDED). The compress–decompress sequence $\text{Inflate}(\text{Deflate}(F)) = F’$ MUST be strictly lossless and bit-exact—preserving every byte of $F$ with zero newline translation, character-encoding normalization, or metadata injection—so that the decompressed output $F’$ is guaranteed to be byte-for-byte identical to $F$ and $\text{SHA-384}(F’) = h_{\text{plain}}$ holds deterministically across all compliant implementations and platforms. Any original filenames or directory trees belong strictly inside the plaintext stream $F$ (e.g., via an inner archive or header) rather than in cleartext container headers. - Chunking: The compressed stream MUST be partitioned into sequential 64 KiB (65,536-byte) chunks (with the final chunk $\le 65,536$ bytes). (Note: an empty 0-byte asset $F$ compresses to a 2-byte final raw Deflate block
0x03 0x00, yieldingtotal_chunks = 1withis_final = 0x01.) - Stream Cipher: Each chunk MUST be encrypted using AES-256-CTR (NIST SP 800-38A). For chunk index $c \ge 0$, the initial 128-bit counter block MUST be: \(\text{IV}_c = \text{uint64\_be}(c) \parallel \text{uint64\_be}(0)\) where the lower 64-bit big-endian block counter increments by 1 for each subsequent 16-byte AES block $b$ within chunk $c$ ($\text{IV}_{c,b} = \text{uint64_be}(c) \parallel \text{uint64_be}(b)$ for $b \in {0 \dots 4095}$), guaranteeing disjoint counter spaces across all chunks.
- Per-Chunk Authentication: Each encrypted chunk MUST be authenticated with an independent HMAC-SHA-384 tag binding chunk order and stream termination (
is_final=0x01on the last chunk,0x00on all preceding chunks): \(\text{ChunkMAC}_c = \text{HMAC-SHA-384}\Big(K_{\text{MAC}},\; \text{uint64\_be}(c) \parallel \text{is\_final} \parallel \text{Ciphertext}_c\Big)\)
3.4. Threshold Secret Sharing (3-of-5 over $GF(2^8)$)
Only the 32-byte $K_{\text{file}}$ is secret-shared:
- $K_{\text{file}}$ MUST be split byte-wise into 5 shares $(S_1, S_2, S_3, S_4, S_5)$ of 32 bytes each using Shamir’s Secret Sharing with threshold $m = 3$ and total shares $n = 5$.
- Arithmetic MUST be performed over $GF(2^8)$ with irreducible polynomial $P(x) = x^8 + x^4 + x^3 + x + 1$ (
0x11B), evaluating a random degree-2 polynomial $f_b(x) = k_b \oplus (a_1 \otimes x) \oplus (a_2 \otimes x^2)$ at $x \in {1, 2, 3, 4, 5}$ for each byte $k_b$ of $K_{\text{file}}$. - Any 3 shares reconstruct $K_{\text{file}}$ via Lagrange interpolation over $GF(2^8)$; any 2 shares reveal zero information ($I(K_{\text{file}}; S_a, S_b) = 0$).
3.5. Five-Slot Algorithm Roster and Share Wrapping
Each share $S_i$ ($i \in {1 \dots 5}$) MUST be encapsulated under a distinct public key $PK_i$ belonging to its designated algorithm slot:
| Slot | Algorithm Identifier | Mathematical Family | Standard / Reference |
|---|---|---|---|
| 1 | ML-KEM-768 |
Module Lattice | NIST FIPS 203 |
| 2 | sntrup761 |
NTRU Prime | Streamlined NTRU Prime |
| 3 | FrodoKEM-640 |
Unstructured Matrix LWE | ISO / BSI / ANSSI |
| 4 | HQC-128 |
Quasi-Cyclic Code | NIST PQC Round 4 |
| 5 | X25519 |
Elliptic Curve (Classical) | RFC 7748 |
For each slot $i \in {1 \dots 5}$:
- Encapsulation:
- Slots 1–4: Run
Encaps(PK_i)to produce KEM ciphertext $ct_{\text{kem}, i}$ and 32-byte shared secret $K_{\text{kem}, i}$. - Slot 5 (
X25519): Generate a fresh 32-byte ephemeral keypair $(esk_5, epk_5)$, set $ct_{\text{kem}, 5} = epk_5$ (32 bytes), and compute $K_{\text{kem}, 5} = \text{X25519}(esk_5, PK_5)$ (32 bytes; reject all-zero shared secret per RFC 7748).
- Slots 1–4: Run
- Key Derivation: Derive a 32-byte mask key $K_{\text{wrap}, i}$ and 48-byte tag key $K_{\text{tag}, i}$ (where
ASCII(i)is the single ASCII character'1'through'5'): \(K_{\text{wrap}, i} \parallel K_{\text{tag}, i} = \text{HKDF-SHA-384}\Big(\text{IKM}=K_{\text{kem}, i},\; \text{salt}=\text{SHA-384}(PK_i),\; \text{info}=\text{"RIOSZCW1:SHARE-WRAP:SLOT-"} \parallel \text{ASCII}(i),\; \text{len}=80\Big)\) - Share Encryption and Context-Bound Authentication: Encrypt $S_i$ and bind the wrapped share to both the asset digest $h_{\text{plain}}$ and escrow contract digest $h_{\text{contract}}$: \(C_{\text{share}, i} = S_i \oplus K_{\text{wrap}, i} \;\;(32\text{ B}), \qquad \text{Tag}_{\text{share}, i} = \text{HMAC-SHA-384}\Big(K_{\text{tag}, i},\; ct_{\text{kem}, i} \parallel C_{\text{share}, i} \parallel h_{\text{plain}} \parallel h_{\text{contract}}\Big) \;\;(48\text{ B})\)
- In-Memory Self-Check: Before discarding ephemeral secrets, the sealing client MUST synchronously verify in memory that at least one 3-share subset reconstructs $K_{\text{file}}$.
4. Steward and Public-Key Custody Requirements
Design Note: This standard intentionally omits how stewards generate their key material, manage internal backups, or transmit public keys to coordinating servers. Prescribing a single operational workflow would create a uniform attack surface and endanger stewards and data across diverse legal and threat environments. Implementing organizations MUST design their own procedures satisfying the eight normative conditions below.
4.1. Necessary Conditions for Compliant Implementations
- Threshold Separation ($\max \lvert B_j \rvert < 3$): The 5 slots MUST be distributed across independent stewards such that no single steward, organization, or server operator controls $\ge 3$ private keys (and SHOULD assign 1 steward per slot, $\max \lvert B_j \rvert = 1$).
- Private Key Isolation: Private keys ($SK_i$) MUST be generated and retained strictly inside the steward’s isolated, non-networked (or HSM) custody boundary, and MUST NOT be transmitted over networks or shared with servers or other stewards.
- Entropy and Slot Independence: Keypairs MUST be generated with a cryptographically secure RNG matching the slot’s security level, and Slot $i$ MUST NOT share secret state with any other slot $j \neq i$.
- Single-Use Compartmentalization: Each asset MUST use a unique, single-use public key $PK_i$ per slot so that releasing $SK_i$ for one asset reveals zero key material for any other asset.
- Public-Key-Only Export and Integrity Binding: Only public keys ($PK_i$) and non-secret key identifiers/hints MAY leave the steward boundary. The delivery mechanism MUST prevent key substitution, and the client MUST bind $h_{PK, i} = \text{SHA-384}(PK_i)$ (computed over the raw
PK_ibytes) intoCommitment. - Zero-Knowledge and Metadata Minimization: Stewards MUST NOT receive plaintext $F$ or bulk ciphertext during routine escrow, and SHOULD avoid storing depositor identities or file metadata alongside private keys.
- Verifiable Blind Release: Upon valid release authorization, a concurring steward MUST return only the single-use $SK_i$ (verifiable via $\text{SHA-384}(PK_i) = h_{PK, i}$) or, for zero-dependency recovery, decapsulate only the $ct_{\text{kem}, i}$ header and return the 32-byte share $S_i$.
- Long-Term Recoverability: Steward custody mechanisms MUST remain recoverable across the 10–20+ year preservation horizon without reliance on ephemeral online services.
5. Mathematical Commitment and Dual Timestamping
5.1. Deterministic Commitment Formulation
Given plaintext $F$, serialized UTF-8 escrow contract bytes $E$, raw steward public keys $PK_{1 \dots 5}$, and serialized payload $C_{\text{payload}}$, compute the 48-byte binary digests:
- $h_{\text{plain}} = \text{SHA-384}(F)$, $\quad h_{\text{contract}} = \text{SHA-384}(E)$, $\quad h_{\text{cipher}} = \text{SHA-384}(C_{\text{payload}})$
- $h_{PK, i} = \text{SHA-384}(PK_i)$ for $i \in {1 \dots 5}$
The global Commitment MUST be computed over the 402-byte concatenation (18-byte ASCII domain tag + eight 48-byte binary digests):
\[\text{Commitment} = \text{SHA-384}\Big(\text{"RIOSZCW1:VAULT3OF5"} \parallel h_{\text{plain}} \parallel h_{\text{contract}} \parallel h_{PK, 1} \parallel h_{PK, 2} \parallel h_{PK, 3} \parallel h_{PK, 4} \parallel h_{PK, 5} \parallel h_{\text{cipher}}\Big)\]Client wall-clock timestamps MUST NOT be included in $\text{Commitment}$ so the external ledger and/or timestamp authority serve as the sole unforgeable certification time.
- Authenticated Manifest Metadata in $E$: To prevent tampering with unencrypted recovery routing hints or packaging notes in
manifest.json, the serialized UTF-8 escrow contract bytes $E$ (covered by $h_{\text{contract}} = \text{SHA-384}(E)$) MUST canonically embed the 5-slot steward routing table (slot,custodian,key_id,derivation_index,algorithm,family,public_key_sha384) and the optionaldocument.packaging_note(if present). - Low-Entropy Plaintext Consideration: Because $h_{\text{plain}} = \text{SHA-384}(F)$ is an unsalted digest published in
manifest.jsonto enable zero-server Tier-1 verification, depositors sealing short or low-entropy templated assets SHOULD include a high-entropy cover block/nonce inside $F$ before sealing, or keep the container/receipt confidential until evidentiary presentation.
5.2. Belt-and-Suspenders Timestamp Anchoring
Compliant containers SHOULD anchor $\text{Commitment}$ via both mechanisms below (and MUST include at least one):
- Immutable Ledger State Registry: Recording $\text{Commitment}$ in a public smart-contract state mapping (
notarizedAt[commitment] => timestamp) for $O(1)$ hash-keyed lookup. - Embedded RFC 3161 Timestamp Token (
TST): Embedding a signed RFC 3161 token over $\text{Commitment}$ insidemanifest.jsonfor 100% offline verification. The RFC 3161MessageImprintMUST specifyid-sha384(OID 2.16.840.1.101.3.4.2.2) ashashAlgorithmand MUST sethashedMessagedirectly to the raw 48-byte $\text{Commitment}$ digest (without double-hashing).
6. Container and Receipt Format Specification
6.1. Single-File Preservation Container
The archival container MUST be a linear sequential binary file with the following layout:
| Segment | Offset | Size | Content |
|---|---|---|---|
| 1. Magic Bytes | 0 |
8 B | ASCII "RIOSZCW1" |
| 2. Header Length | 8 |
4 B | uint32_be byte length $L$ of Segment 3 |
| 3. JSON Manifest | 12 |
$L$ B | Uncompressed UTF-8 manifest.json (Appendix A) |
| 4. Payload ($C_{\text{payload}}$) | 12 + L |
$P$ B | Authenticated payload covered by $h_{\text{cipher}}$ (layout below) |
| 5. Parity Shield | 12 + L + P |
$R$ B ($\ge 5\%$) | Self-delimiting PAR2 Reed-Solomon recovery packets (PAR2\0PKT) covering Segments 1–4 |
| 6. EOF Trailer | EOF - 64 |
64 B | "RIOSZCWT" (8B) $\parallel$ uint64_be values $(L, P, R, \text{total_chunks}, \text{uncompressed_bytes})$ (40B) $\parallel$ reserved zeros (12B) $\parallel$ CRC32 of bytes 0..59 (4B) |
- Segment 4 ($C_{\text{payload}}$) Internal Byte Layout:
- Contract Block:
uint32_be(len(E))(4 B) $\parallel$ UTF-8 contract bytes $E$. - Five Wrapped Shares ($i = 1 \dots 5$ in order):
uint16_be(len(ct_kem,i))(2 B) $\parallel ct_{\text{kem}, i} \parallel C_{\text{share}, i}$ (32 B) $\parallel \text{Tag}_{\text{share}, i}$ (48 B). - Encrypted Chunk Stream ($c = 0 \dots \text{total_chunks}-1$): $\text{Ciphertext}_c$ (up to 65,536 B) $\parallel \text{ChunkMAC}_c$ (48 B).
- Contract Block:
- Bitrot Protection of Steward Hints and Header Metadata: Segment 5 covers Segments 1–4, repairing any bitrot in
manifest.json(including steward hints,key_idvalues, and RFC 3161 tokens) up to the $\ge 5\%$ parity budget. Because PAR2 packets carry self-identifyingPAR2\0PKTheaders and checksums, recovery tools can locate and apply parity even if both Segment 2 and Segment 6 are corrupted. Depositors SHOULD also store the ~1 KB standalone receipt (Section 6.2) separately to survive $>5\%$ catastrophic media failure.
6.2. Standalone Lightweight Receipt
For version-control integration (e.g., Git Notes) or lightweight archival, implementations MAY emit a standalone JSON receipt conforming to Appendix A without embedded_reconstructor or binary Segments 4–6.
7. Verification and Recovery Protocols
7.1. Tier-1 Standalone Verification
Given plaintext $F$ and a receipt or container:
- Compute $\text{SHA-384}(F)$ and assert equality with
hashes.plaintext_sha384. - Recompute $\text{Commitment}$ from
hashes.plaintext_sha384,hashes.contract_sha384,hashes.steward_public_keys_sha384, andhashes.payload_cipher_sha384. When verifying a full container, also extract Contract Block $E$ from Segment 4, assert $\text{SHA-384}(E) = h_{\text{contract}}$, and verify thatmanifest.json’sescrow.stewardsrouting table and optionaldocument.packaging_notematch the authenticated values embedded in $E$. - Verify $\text{Commitment}$ against the recorded Ledger Registry and/or verify the embedded RFC 3161
TSToffline. - Verification MUST fail if any digest, consistency, or anchor check fails.
7.2. Tier-2 Blind Escrow Recovery
- Repair (if needed): If the container exhibits bitrot, apply Segment 5 Reed-Solomon parity using Segment 3 or Segment 6 geometry.
- Release: Present the container’s contract and key IDs/hints to $\ge 3$ stewards. Each concurring steward returns $SK_i$ (or unwrapped $S_i$).
- Local Reconstruction: On an offline machine, the Claimant verifies
manifest.jsonrouting/packaging metadata against Segment 4 Contract Block $E$ ($\text{SHA-384}(E) = h_{\text{contract}}$), unwraps $\ge 3$ shares, verifies each $\text{Tag}{\text{share}, i}$ over $ct{\text{kem}, i} \parallel C_{\text{share}, i} \parallel h_{\text{plain}} \parallel h_{\text{contract}}$, interpolates $K_{\text{file}}$, derives $K_{\text{DEK}} \parallel K_{\text{MAC}}$, verifies every $\text{ChunkMAC}_c$, decrypts, and inflates raw Deflate while enforcingpayload.uncompressed_bytesas a hard output byte ceiling (aborting immediately if inflation exceedsuncompressed_bytes) to recover $F’$. - Integrity Assertion: Assert $\text{SHA-384}(F’) = h_{\text{plain}}$.
8. Cryptographic Agility, Algorithm Compromise and Steward Loss
8.1. Algorithm Compromise or Deprecation
Because vault-3of5 distributes shares across five independent mathematical families, the compromise of one or two KEM/key-exchange algorithms does not expose $K_{\text{file}}$ ($I(K_{\text{file}}; S_a, S_b) = 0$). However, to restore full fault-tolerance and protect against cascading breaks:
- Immediate Issuance Cutoff: Once a slot algorithm is formally deprecated by the standard governance body or relevant cryptographic authority (e.g., NIST), implementations MUST NOT issue new containers using the deprecated algorithm and MUST transition new issuances to a successor suite version specifying a replacement algorithm.
- Container Re-Sealing (Confidentiality Migration): For existing high-sensitivity containers, the Depositor SHOULD recover the asset via Tier-2 (using $\ge 3$ uncompromised slots) and re-seal it under the updated algorithm suite with a fresh $K_{\text{file}}$.
- Prior-Existence Continuity (Evidence Preservation): Re-sealing produces a new
Commitmentand timestamp. To preserve the original proof-of-existence date, the original receipt ormanifest.jsonMUST be retained alongside (or referenced by) the re-sealed container, as Tier-1 verification of the original plaintext $F$ depends solely on $h_{\text{plain}}$ and the original anchoredCommitment. - Hash / Timestamp Renewal: If
SHA-384or a timestamp authority root approaches cryptographic deprecation over the 20-year horizon, holders SHOULD counter-sign or re-anchor the existingCommitment(or full container) under a successor hash and timestamp token prior to practical collision attacks (timestamp chaining).
8.2. Steward Loss, Key Loss, or Unavailability
Because recovery requires any 3 of 5 shares, the loss or permanent unavailability of 1 or 2 stewards does not prevent recovery of existing assets, but it reduces the remaining fault-tolerance margin.
- Retiring Affected Keys: Any public key (or steward slot) reported lost, compromised, or decommissioned MUST be retired immediately from new container issuance.
- No In-Place Share Mutation: Existing containers MUST NOT be modified in place to swap a lost share, as altering Segment 4 invalidates $h_{\text{cipher}}$ and the anchored
Commitment. - Proactive Re-Sealing: If a steward reports permanent key loss affecting active high-value containers, the Depositor SHOULD initiate an authorized Tier-2 recovery using $\ge 3$ remaining healthy stewards and re-seal the asset under a healthy 5-steward roster, retaining the original receipt for prior-existence continuity.
9. Conformance
- Implementations claiming compliance with
RIOSZCW1(Riosz Confidential Wrapper v1) MUST pass the reference test vectors (Appendix B) forSHA-384commitment derivation,HKDF-SHA-384key scheduling, $GF(2^8)$ Shamir splitting, 64 KiBAES-256-CTR + HMAC-SHA-384chunking, and Tier-1/Tier-2 round-trip verification. - Long-Term Verification Continuity: Future versions of Riosz verifiers SHOULD retain full support for validating
v1containers and receipts across the 20+ year statutory preservation horizon.
Appendix A. Normative Manifest and Receipt Schema (JSON Schema Draft 2020-12)
Both manifest.json (Segment 3 of the container) and standalone .json receipts MUST conform to the following schema. embedded_reconstructor is REQUIRED in manifest.json and SHOULD be omitted in standalone receipts.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Riosz Confidential Wrapper v1 (RIOSZCW1) Manifest / Receipt",
"type": "object",
"required": [
"schema_version",
"specification_id",
"standard",
"document",
"payload",
"escrow",
"hashes",
"timestamps"
],
"properties": {
"schema_version": { "type": "string", "const": "1.0.0" },
"specification_id": { "type": "string", "const": "RIOSZCW1-SPEC-v1.0:SHA384-INSTANT-VAULT3OF5" },
"standard": { "type": "string", "const": "RIOSZCW1-INSTANT-BINDING" },
"document": {
"type": "object",
"required": ["size_bytes"],
"properties": {
"size_bytes": { "type": "integer", "minimum": 0 },
"packaging_note": {
"type": "string",
"maxLength": 1024,
"description": "Optional public hint or reference note from the packaging agent; MUST also be bound inside the serialized escrow contract bytes E."
}
}
},
"payload": {
"type": "object",
"required": [
"compression",
"chunk_size_bytes",
"total_chunks",
"uncompressed_bytes",
"payload_bytes",
"includes_unencrypted_escrow_contract",
"includes_5_encrypted_shamir_shares"
],
"properties": {
"compression": { "type": "string", "const": "raw-deflate" },
"chunk_size_bytes": { "type": "integer", "const": 65536 },
"total_chunks": { "type": "integer", "minimum": 1 },
"uncompressed_bytes": { "type": "integer", "minimum": 0 },
"payload_bytes": { "type": "integer", "minimum": 1 },
"includes_unencrypted_escrow_contract": { "type": "boolean", "const": true },
"includes_5_encrypted_shamir_shares": { "type": "boolean", "const": true }
}
},
"escrow": {
"type": "object",
"required": ["mode", "threshold", "contract_document_hash", "stewards"],
"properties": {
"mode": { "type": "string", "const": "vault-3of5" },
"threshold": { "type": "string", "const": "3-of-5" },
"contract_document_hash": { "type": "string", "pattern": "^[0-9a-f]{96}$" },
"stewards": {
"type": "array",
"minItems": 5,
"maxItems": 5,
"items": {
"type": "object",
"required": ["slot", "custodian", "key_id", "algorithm", "family", "public_key_sha384"],
"properties": {
"slot": { "type": "integer", "minimum": 1, "maximum": 5 },
"custodian": { "type": "string", "minLength": 1 },
"key_id": { "type": "string", "minLength": 1 },
"derivation_index": { "type": "integer", "minimum": 0 },
"algorithm": {
"type": "string",
"enum": ["ML-KEM-768", "sntrup761", "FrodoKEM-640", "HQC-128", "X25519"]
},
"family": { "type": "string" },
"public_key_sha384": { "type": "string", "pattern": "^[0-9a-f]{96}$" }
}
}
}
}
},
"hashes": {
"type": "object",
"required": [
"plaintext_sha384",
"contract_sha384",
"steward_public_keys_sha384",
"payload_cipher_sha384",
"onchain_commitment"
],
"properties": {
"plaintext_sha384": { "type": "string", "pattern": "^[0-9a-f]{96}$" },
"contract_sha384": { "type": "string", "pattern": "^[0-9a-f]{96}$" },
"steward_public_keys_sha384": {
"type": "array",
"minItems": 5,
"maxItems": 5,
"items": { "type": "string", "pattern": "^[0-9a-f]{96}$" }
},
"payload_cipher_sha384": { "type": "string", "pattern": "^[0-9a-f]{96}$" },
"onchain_commitment": { "type": "string", "pattern": "^[0-9a-f]{96}$" }
}
},
"timestamps": {
"type": "object",
"anyOf": [
{ "required": ["blockchain_anchor"] },
{ "required": ["rfc3161_qtsp"] }
],
"properties": {
"authoritative_timestamp_unix": { "type": "integer" },
"authoritative_timestamp_iso": { "type": "string", "format": "date-time" },
"blockchain_anchor": {
"type": "object",
"required": ["network", "registry_contract", "tx_id", "commitment"],
"properties": {
"network": { "type": "string" },
"registry_contract": { "type": "string" },
"tx_id": { "type": "string" },
"initial_block_number": { "type": "integer" },
"commitment": { "type": "string", "pattern": "^(0x)?[0-9a-f]{96}$" }
}
},
"rfc3161_qtsp": {
"type": "object",
"required": ["standard", "tst_base64"],
"properties": {
"standard": { "type": "string" },
"tst_base64": { "type": "string" }
}
}
}
},
"embedded_reconstructor": {
"type": "object",
"required": ["present_in_container_only", "filename", "language", "source_code"],
"properties": {
"present_in_container_only": { "type": "boolean", "const": true },
"filename": { "type": "string", "const": "reconstruct_payload.py" },
"language": { "type": "string", "const": "python3-stdlib" },
"source_code": { "type": "string", "minLength": 1 }
}
}
}
}
Appendix B. Reference Test Vectors
Implementations MUST reproduce the following exact outputs (all hashes and keys encoded as lowercase hexadecimal).
B.1. Plaintext Digest and HKDF-SHA-384 Bulk Key Schedule
- Input Plaintext $F$ (20 bytes ASCII):
"Riosz v1 test asset\n" SHA-384(F)(h_plain):963ab20888ef9f78f12238e0925a5ce7a6229676b26c14ba04c254b6e469de12ba987971318c6730b6bbfd2afe2385cf- Input
K_file(32 bytes):000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f - HKDF Parameters:
salt = h_plain(raw 48 bytes),info = b"RIOSZCW1:BULK-KEYS",len = 80 - Derived
K_DEK(bytes0..31):19a862784bd00c05fed0c86d555f445eb16f06e217d1ecd70d97aac8fd0563dd - Derived
K_MAC(bytes32..79):d39666c7dd9618ed2db81ddb2ac9fa3a05a845a4e6ebc250ac84e0a63c81a6773203e1c51fccd18d1568be9e409a7040
B.2. Commitment Formulation Vector
Using h_plain from B.1 and the following 48-byte raw digests:
h_contract = SHA-384(b"contract"):4969a0505c9d160aebc68839e586f68e9cbb695940eae072a67901618aabeb33d35a99a3c9380760a152d0581fe1fb3ah_PK,1 = SHA-384(b"pk1"):df6c64e2c5c814891770a0e1d6068dd481fdeff0c11a13539fc331d34755646ef45722020635c8a3da0301c1438a5145h_PK,2 = SHA-384(b"pk2"):ec7f1f2e8930b1c2659902de5c6371090a8c051996feba2daf85b63292bf8dc30852802d1346f29d2d064e7e6ca998b1h_PK,3 = SHA-384(b"pk3"):85cc0a390c97dd0fc7135bd477527c30d7c257c24262bc7f64da525db35abb877fae4d8095ad738224c6a2bee9324d9fh_PK,4 = SHA-384(b"pk4"):4d51061ff4026a038ffc61e8e2c1d4cf3a4a5e97c5ee0a77e0ff6ff80dd88b1a8fcff40557c007fd74f4d2217a86b35ch_PK,5 = SHA-384(b"pk5"):68a8146ad871c315699570d6ff38d29d8612930d5eaec0a3de91de8baf45ac53ac656e9ec9d790f6baa683ed35a5d658h_cipher = SHA-384(b"cipher"):a9020f72ef2e921640cf33112c1240e98164a4f05470e0c74b8afe422c0076092cf0f3b7bfd030938cbc246831d8c66f
Expected Commitment (SHA-384(b"RIOSZCW1:VAULT3OF5" || h_plain || h_contract || h_PK,1..5 || h_cipher)):
ea4ff647d2b3fb6385c3437ecd7faa6f9d330b57b931c67b6597d3067238b06e92841767ad8db6be3baa3d1cf5320aaa
B.3. $GF(2^8)$ Shamir Polynomial Evaluation and Interpolation Vector
- Field Polynomial: $P(x) = x^8 + x^4 + x^3 + x + 1$ (
0x11B) - Secret Byte $k_b$:
0x42, with degree-2 coefficients $a_1 = \texttt{0x53}$, $a_2 = \texttt{0x9a}$ - Evaluated Shares $f_b(x) = k_b \oplus (a_1 \otimes x) \oplus (a_2 \otimes x^2)$:
- $x = 1 \implies \texttt{0x8b}$
- $x = 2 \implies \texttt{0xba}$
- $x = 3 \implies \texttt{0x73}$
- $x = 4 \implies \texttt{0x76}$
- $x = 5 \implies \texttt{0xbf}$
- Lagrange interpolation at $x = 0$ over any 3 of these 5 points MUST yield
0x42.