Existing implementation
At 754c07b118f41ad899607b60329bd851b1ccb13e, crates/aien-kv-store/src/seal.rs uses ring AES_256_GCM with a 96-bit SystemRandom nonce per file; identity metadata is AAD and failed opens zero the payload. tests/seal_tests.rs already tests fresh nonces, wrong keys, tampered ciphertext/tag/nonce and swapped headers. src/host_fs.rs calls seal_file before writing files.
Part of https://github.com/aien-dev/omega-mv/issues/639; extend the privacy contract from #506, not a parallel encrypted store.
Work
- Add the smallest private/test-only randomness seam needed to inject a deterministic sequence and entropy-source errors. Production continues to use the OS source; no configurable deterministic RNG or insecure fallback.
- Prove entropy-source failure refuses sealing and prevents host_fs from publishing a partial/plaintext object.
- Exercise repeated writes, process restart, restored files and concurrent writers with synthetic keys. Distinguish disk restoration from cloning a running process/VM and its entropy state.
- Demonstrate repeated-key/nonce misuse as an isolated synthetic AES-GCM control. Do not expect ring's assume_unique_for_key API to detect duplicates. Explain what the production layer does and does not guarantee.
- Document aggregate per-key usage assumptions across processes, collision risk, and a justified rekey/usage-budget policy. A random-nonce sample is not uniqueness proof; ordinary disk rollback does not automatically roll back the OS RNG.
Acceptance
- Deterministic tests for entropy error, repeated source output and concurrent/restart scenarios have explicit expected outcomes; unsafe controls cannot be mislabeled protected.
- Failure cannot publish an unsealed file; failed authentication never exposes usable payload through the restore path.
- Restore still binds the complete identity header; old-key/mismatched/tampered objects retain discard-and-recompute behavior.
- Mutants removing error propagation or AAD binding are caught by the expected assertion.
- Existing sealing/host filesystem tests remain green; pins, reproduction commands and shared-gate receipts included.
- Document outstanding randomness/rollback assumptions accurately. If a policy requires further production enforcement, identify the exact implementation gap instead of declaring it solved by tests.
No cipher migration, live vault-key rotation or claim about all persistent Sovereign Core memory is in scope.