Repository navigation
test(TC-887): harness follow-ups: derived keys in mirrors, escrow-none, bounded generations, required mirrors (stacked on #335) - #338
Merged
Conversation
…e, bounded generations, required mirrors Review a7e06ef6 on #335 (Naomi's round-5 rulings): - Escrow-none runs: any escrow bundle or record object is RED. Every mirror string (exempt fields, commitments, holder names alone, in pairs and in order, the armored share text and its payload, record fields) must not carry a secret the harness derived or unwrapped (root, W, ARK_g, KEK_g, chain/canary/MAC keys, NK, the DEK tag key, any DEK) in hex, base64, base64url or base32, at any alignment. - Escrow holder names are left out of the 16+16 split check (they are checked exactly by the schema). - ARK generations above 9 are refused outright and a gap is one finding; no loop is bounded by a number read from a name. - Encrypt/strict mode: an ARK mirror must exist and every block must be sealed-named, its NK space tag a harness space whose DEK mirror authenticates. - Raw-key backstop also decodes base32 and any short label: prefix and flags anything decoding to more than 32 bytes. - INTERFACES status note names #336. Self-tests for each rule.
samgbafa
force-pushed
the
skgbafa/tc-887-harness-followups2
branch
from
October 17, 2026 11:46
a7a461e to
cf546bb
Compare
samgbafa
marked this pull request as ready for review
October 17, 2026 12:11
Contributor
Author
|
APPROVE: see TC-887 (head |
This was referenced Oct 17, 2026
samgbafa
added a commit
that referenced
this pull request
Oct 17, 2026
… their DEK, ARK sanity cap (#340) * test(TC-887): harness follow-ups 3: secrets in blocks, blocks tied to their DEK, ARK sanity cap Review 159550aa on #338 (Naomi's round-6 rulings): - Every block's name and bytes are scanned for the harness-derived secrets (root, W, ARK_g, KEK_g, chain/canary/MAC keys, NK, tag key, every unwrapped DEK): raw bytes, and hex, base64 or base64url text at any alignment. A DEK in the TCE1 header salt or b64url(DEK/NK) as the object name is RED. - Encrypt/strict mode ties each block to its mirrored DEK: name v1/<22>/<43>, NK tag of a harness space, TCE1 header dek_id among that space's authenticated DEKs, name equal to the sealed name of a logged put (puts.log), and the block opens under that DEK (main's at_rest::open, AAD space + content hash) to the put's content. - ARK generations get a harness-only sanity cap of 1000 (they are unbounded in the node; 1..=9 is the TCE format generation); absurd names still fail fast, a chain of 10 passes. - Cheap free-field bypasses closed: bech32 recipient data, hex/base64 text inside the armor payload, holder splits with -/_ separators, shifts up to 7 chars and any order. The rest is listed as out of scope in the README. Self-tests for each rule. * test(TC-887): partial and split secrets in TCE1 salts; README matches the block scans
This was referenced Oct 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TC-887 harness follow-ups from the #335 approval (review a7e06ef6), on main after #335 merged. No product code changes.
What changed (
tests/at_rest_harness.rs,scripts/at-rest-harness/README.md,docs/at-rest/INTERFACES.md)shares[].commitment, holder names (singly, in pairs and all together) and the armored share text and payload.shares[].holderno longer counts toward the 16+16 split check; the 32-byte and derived-secret checks still apply.MAX_ARK_GENERATION = 9is one finding. A gap is found by comparing counts, not by looping, and ARKs above 9 are never opened.ark-4294967295-…fails RED in under 2 s.v1/<space tag>/…, with the space tag recomputed from the re-derived NK;A missing DEK or ARK mirror, a foreign tag, or a plaintext-named block is RED.
label:prefix, and flags decodings longer than 32 bytes.How it's tested
cargo test -p tinycloud-node --test at_rest_harness: 7 self-tests pass, 4 live checks ignored. New self-tests:selftest_key_mirror_refuses_escrow_contents_and_derived_keys: escrow none refuses both objects. Six planted derived secrets are each RED, with the EFP, name and MAC recomputed so that only this rule can catch them. Valid holder names that look like encoded halves give no findings.selftest_key_mirror_bounds_absurd_generationsselftest_key_mirror_requires_mirrors_in_encrypt_modeselftest_key_mirror_flags_every_bypass.cargo clippy … --test at_rest_harness -- -D warnings,cargo fmt --checkandbash -n harness.share clean.