1. Reader/analyzer two-crate split, naming, and dependency direction¶
Date: 2026-07-24 Status: Accepted
Context¶
BitLocker work splits cleanly into two jobs an examiner does separately: (1) unlock and read a volume — parse the FVE metadata, derive keys, decrypt sectors; and (2) audit the metadata for anomalies (a clear-key protector, a weak cipher) without any credential. These have different consumers, different MSRV needs, and different failure modes.
The fleet Crate-structure standard (ronin-issen CLAUDE.md, "Crate-structure
standard — reader/analyzer split") mandates, for a single-format repo, exactly
two crates: <x>-core (the raw reader) and <x>-forensic (the anomaly auditor
emitting forensicnomicon::report findings). It also fixes the naming grammar:
the bare <x> import path is preserved via [lib] name, and the analyzer keeps
the <x>-forensic name.
Decision¶
The repo is a Pattern-A single-format workspace (Cargo.toml members = ["core",
"forensic"]) with two published crates:
bitlocker-core(core/Cargo.toml) — the reader/decryptor. It is published asbitlocker-corebut sets[lib] name = "bitlocker", so consumers writeuse bitlocker::BitLockerVolume(core/src/lib.rs). It emits a plaintextRead + Seekview plus typed FVE metadata; it produces no findings.bitlocker-forensic(forensic/Cargo.toml) — the anomaly auditor. It depends down on the reader (workspace.dependenciesbitlocker = { path = "core", package = "bitlocker-core" }) and onforensicnomicon, and converts its ownAnomalyKindinto canonicalFindings viaimpl Observation(forensic/src/lib.rs).
Dependency direction is one-way: bitlocker-forensic → bitlocker-core →
forensicnomicon (KNOWLEDGE leaf). The analyzer audits the metadata the reader
already parses (audit_reader calls BitLockerVolume::read_metadata), so it does
not re-parse the raw format — the reader's metadata API exposes the protector
inventory and cipher it needs.
The workspace was scaffolded in this shape from the first commit (5c18192
"scaffold bitlocker-forensic workspace (core + forensic)").
Consequences¶
- A third-party developer who only needs to read a BitLocker volume links
bitlocker-corealone and never pulls theforensicnomiconreporting graph. - The analyzer stays thin: it owns the anomaly taxonomy (
BDE-CLEAR-KEY-PRESENT,BDE-PROTECTOR-INVENTORY,BDE-WEAK-CIPHER,BDE-TO-GO) and delegates all format knowledge to the reader. - Because the analyzer's needs are satisfied by
bitlocker-core's metadata API, it depends on-corerather than dropping to raw bytes — the default the standard prescribes when-coreexposes everything the audit requires.