WIP: Retain and erase original filesystem key material #2

Closed
erikinkinen wants to merge 13 commits from feature/posix-compat into main
Owner

Summary and rationale

Make derived filesystem keys private single owners and erase derivation intermediates through their original lifetimes. Content and filename transforms borrow the owned keys; key lookup remains the caller's authority.

Tracking and scope

The linked component audit, implementation and consumer requirements remain part of this WIP review. The phase-wide guest and toolchain build requirements stay with the phase completion issue.

Architecture, authority and failure behavior

Key ownership gives FscryptV2Keys no Copy, Clone, Debug or raw-field access. All three derived keys erase on drop. Content operations and filename encryption/decryption borrow the same owner; master input and returned plaintext remain caller-owned.

The separate derivation module guards extraction/expansion material, pads and intermediate digests. Original HMAC states and AES schedules retain their own retirement. The crate performs no I/O and acquires no runtime key storage or lookup authority.

This cleanup preserves the existing EriX-specific KDF; it does not establish Linux interoperability or side-channel resistance. Signed dependency coordination and complete filesystem-consumer acceptance remain part of the review.

Validation evidence

Formatting, strict Clippy, warning-denied builds and documentation, unit tests, and applicable native/VM and consumer regressions remain required for the declared scope. Authored controls and older successful runs do not establish current full acceptance.

Review checklist

  • Full original commit pins and a signed feature checkpoint retained.
  • Complete applicable local matrix and final documentation checks pass.
  • Derived keys and intermediates retain private original owners and documented erasure.
  • Complete classified push/review CI logs with no final warnings.
  • Complete coherent runtime catalog adoption and product VM acceptance.

This review remains WIP until its declared scope and dependent requirements are complete.

## Summary and rationale Make derived filesystem keys private single owners and erase derivation intermediates through their original lifetimes. Content and filename transforms borrow the owned keys; key lookup remains the caller's authority. ## Tracking and scope - [lib-fs-crypto #1](https://git.erikinkinen.fi/erix/lib-fs-crypto/issues/1) - [integration #1](https://git.erikinkinen.fi/erix/integration/issues/1) - [docs PR #4](https://git.erikinkinen.fi/erix/docs/pulls/4) - [e2fsd PR #3](https://git.erikinkinen.fi/erix/e2fsd/pulls/3) - [integration PR #12](https://git.erikinkinen.fi/erix/integration/pulls/12) - [lib-aes PR #2](https://git.erikinkinen.fi/erix/lib-aes/pulls/2) - [lib-constant-time PR #2](https://git.erikinkinen.fi/erix/lib-constant-time/pulls/2) - [lib-fs-crypto PR #2](https://git.erikinkinen.fi/erix/lib-fs-crypto/pulls/2) - [lib-ipc PR #2](https://git.erikinkinen.fi/erix/lib-ipc/pulls/2) - [lib-sha2 PR #2](https://git.erikinkinen.fi/erix/lib-sha2/pulls/2) - [meta #2](https://git.erikinkinen.fi/erix/meta/issues/2) - [integration #65](https://git.erikinkinen.fi/erix/integration/issues/65) The linked component audit, implementation and consumer requirements remain part of this WIP review. The phase-wide guest and toolchain build requirements stay with the phase completion issue. ## Architecture, authority and failure behavior [Key ownership](https://git.erikinkinen.fi/erix/lib-fs-crypto/src/branch/feature/posix-compat/ARCHITECTURE.md) gives `FscryptV2Keys` no Copy, Clone, Debug or raw-field access. All three derived keys erase on drop. Content operations and filename encryption/decryption borrow the same owner; master input and returned plaintext remain caller-owned. The separate derivation module guards extraction/expansion material, pads and intermediate digests. Original HMAC states and AES schedules retain their own retirement. The crate performs no I/O and acquires no runtime key storage or lookup authority. This cleanup preserves the existing EriX-specific KDF; it does not establish Linux interoperability or side-channel resistance. Signed dependency coordination and complete filesystem-consumer acceptance remain part of the review. ## Validation evidence Formatting, strict Clippy, warning-denied builds and documentation, unit tests, and applicable native/VM and consumer regressions remain required for the declared scope. Authored controls and older successful runs do not establish current full acceptance. ## Review checklist - [x] Full original commit pins and a signed feature checkpoint retained. - [x] Complete applicable local matrix and final documentation checks pass. - [x] Derived keys and intermediates retain private original owners and documented erasure. - [ ] Complete classified push/review CI logs with no final warnings. - [ ] Complete coherent runtime catalog adoption and product VM acceptance. This review remains WIP until its declared scope and dependent requirements are complete.
build: Align dependencies for coherent runtime adoption
All checks were successful
CI / markdown (push) Successful in 9s
CI / test (push) Successful in 26s
CI / markdown (pull_request) Successful in 6s
CI / test (pull_request) Successful in 25s
ecedfce63f
Select the current original signed foundation commits in the existing Git
dependencies. Keep the Rust implementation files unchanged and record the
separate product-image acceptance requirement in the roadmap.

The complete default/all development/release matrix passes with formatting,
strict host/native Clippy, tests, freestanding builds and private rustdoc.
Product runtime adoption remains pending the complete dependency graph.
ci: Skip duplicate same-repository pull request jobs
All checks were successful
CI / markdown (pull_request) Has been skipped
CI / test (pull_request) Has been skipped
CI / markdown (push) Successful in 8s
CI / test (push) Successful in 27s
60373830f6
Skip pull-request jobs when the head and base repository names match,
since push CI already covers these branches. Retain fork pull-request,
push and manual execution and existing release publication conditions.
Apply the guard before any job steps, including Markdown validation.

Test execution and CI observation are deferred at the user's request;
no execution result is claimed for this workflow-only change.
build: Adopt original-custody filesystem revisions
All checks were successful
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 3s
CI / test (push) Successful in 21s
07cf3433db
Select complete signed native filesystem and compatibility dependencies by
immutable commit. Preserve original endpoints, rights, cleanup and resource
budgets throughout the coherent compilation graph.

Tests, builds, lint checks, generated documentation, VM/profiler execution and
CI observation remain deferred. Rustfmt was applied through stdin. No test
pass, warning-free build or measured performance improvement is claimed.
Full EriX guest generations and external Rust/LLVM guest rebuilding remain
required and unperformed.
fix: Bound derived filesystem key lifetime
All checks were successful
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 13s
CI / test (push) Successful in 31s
c777a332cf
Use private single owners for derived filesystem keys and borrowed filename
operations. Split derivation into its own module and guard original HKDF/HMAC
material and pads; retain original hash and AES cleanup owners.

Tests, builds, lint checks, generated documentation, VM/profiler execution and
CI observation remain deferred. Rustfmt was applied through stdin. No test
pass, warning-free build or measured performance improvement is claimed.
Full EriX guest generations and external Rust/LLVM guest rebuilding remain
required and unperformed.
ci: Adopt the signed original Git dependency helper
All checks were successful
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 4s
CI / test (push) Successful in 15s
80c25828f5
Select the verified immutable Integration helper that preserves actual
Git objects and denies registry dependencies without obsolete path
patches. Retain every duplicate same-repository PR guard. Where needed,
adopt the coherent signed ABI graph and preserve original authority and
validation budgets. Maintain canonical documentation formatting.

Tests and exact-head CI run in parallel with implementation. Earlier failed,
skipped or unrun checks remain distinct from actual passes. Keep the full
EriX guest build generations and external Rust/LLVM guest rebuild required;
no final all-repository CI success or guest completion is claimed.
ci: Adopt the signed original Git dependency helper
All checks were successful
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 5s
CI / test (push) Successful in 20s
651d16b915
Select the verified immutable Integration helper that preserves actual
Git objects and denies registry dependencies without obsolete path
patches. Retain every duplicate same-repository PR guard. Where needed,
adopt the coherent signed ABI graph and preserve original authority and
validation budgets. Maintain canonical documentation formatting.

Tests and exact-head CI run in parallel with implementation. Earlier failed,
skipped or unrun checks remain distinct from actual passes. Keep the full
EriX guest build generations and external Rust/LLVM guest rebuild required;
no final all-repository CI success or guest completion is claimed.
build: Align shared library dependency revisions
All checks were successful
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 4s
CI / test (push) Successful in 20s
945a00b370
Select the current signed library revisions in dependency order.
Keep shared ABI types on one coherent Git graph without changing
capability rights or source identity.
ci: Select the reviewed native process custody helper
Some checks failed
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 6s
CI / test (push) Failing after 13s
448b3fd972
Select the coherent Integration source for dependency preparation and
native process ownership. This keeps helper inputs aligned with the
published runtime producer and refuses unsupported descriptor queries
before starting a child.
erikinkinen changed title from WIP: Align signed runtime dependencies to WIP: Retain and erase original filesystem key material 2026-10-14 05:29:56 +02:00
build: Adopt fixed AES arithmetic in filesystem crypto
All checks were successful
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 2s
CI / test (push) Successful in 14s
283b30beee
Select the signed AES implementation with direct inverse substitution and
fixed field products. Preserve the filesystem key and ciphertext contracts
and document the source and platform timing boundaries.
ci: Adopt the repaired native signal owner
All checks were successful
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 9s
CI / test (push) Successful in 43s
97ae8428b9
Select the coherent Integration helper that admits observed default or
ignored reserved signals while preserving complete native action identity.
Keep the existing workflow commands and limits for Integration #118.
build: Track main dependencies through checked Cargo inputs
Some checks failed
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / test (push) Failing after 33s
CI / markdown (push) Has started running
f61342c826
Declare main for internal Git dependencies. Prepare offline Cargo inputs with
the selected Integration helper, then carry the generated workspace, environment
and target directory through each CI step.

Keep shared dependency and review policies aligned.

Refs: erix/integration#142
ci: Select the repaired Cargo gateway
Some checks are pending
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / test (push) Has started running
CI / markdown (push) Has started running
7fdfc98013
Use the shared gateway that selects installed Rust tools when a component
has no toolchain file. Keep tool selection, feature-branch resolution and
original source checks together in the pinned helper snapshot.

Refs: erix/integration#147
ci: Use the shared acquisition fix for packed Git transfers
All checks were successful
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / test (push) Successful in 2m29s
CI / markdown (push) Successful in 3s
da59a07efd
Use the shared acquisition fix for packed Git transfers. The pinned helper
keeps unexpected object-store metadata outside the acquired source context.

Refs: erix/integration#150
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:34:44 +01:00
Author
Owner

This source is now split into feature PRs, starting at #4 and ending at #5. Each PR links its prerequisite. The complete stack preserves the runtime changes and dependency declarations; obsolete pin checkpoints and documented source-acquisition differences are separated from feature behavior.

Closing this aggregate without merging. The replacement PRs remain WIP for their remaining integration and review.

This source is now split into feature PRs, starting at #4 and ending at #5. Each PR links its prerequisite. The complete stack preserves the runtime changes and dependency declarations; obsolete pin checkpoints and documented source-acquisition differences are separated from feature behavior. Closing this aggregate without merging. The replacement PRs remain WIP for their remaining integration and review.
erikinkinen closed this pull request 2026-10-30 18:22:10 +01:00
All checks were successful
CI / markdown (push) Successful in 3s
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / test (push) Successful in 2m29s

Pull request closed

Sign in to join this conversation.
No description provided.