Skip to content

feat: PqContainerInfo container inspection and pqfe inspect - #86

Merged
systemslibrarian merged 1 commit into
mainfrom
features/container-inspection
Sep 5, 2026
Merged

systemslibrarian merged 1 commit into
mainfrom
features/container-inspection

Conversation

@systemslibrarian

Copy link
Copy Markdown
Owner

The last major product item from both external reviews: supported container inspection, so no operator or service ever hand-parses the frozen header.

PqContainerInfo

Read / TryRead / ReadFileAsync report what a header declares — key source (new PqKeySource enum), KDF + work factors, chunk size, recipient count, sanitized provider id, and an exact plaintext-size upper bound (the same bound MaxPlaintextBytes enforces) — with zero key derivation or decryption. Safe on untrusted input; the natural primitive for policy gates ("hybrid recipients only", "no KDF above our budget", "nothing over 100 MB").

  • Structural acceptance mirrors the frozen reader exactly — pinned by a conformance-corpus consistency test across all 28 vectors (reject-format ⇒ inspection rejects; accept/lenient/auth-stage ⇒ inspection reads and agrees on the key source).
  • Every value documented as unauthenticated until a decryption succeeds; provider ids are control-character-sanitized before they can reach logs.

pqfe inspect <file> [--json]

Human summary (with the unauthenticated warning) or a tiny stable JSON schema — hand-built, keeping the CLI NativeAOT-safe. Smoke-tested live on hybrid multi-recipient, Argon2id, provider, and garbage inputs.

Verification

330×2 tests green (7 new, incl. the corpus mirror) · build clean · docs guard green · freeze-safe (new read-only API; no acceptance change).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Sym7RJ7ehNhbMXytE5rMmS

The last major product ask from both external reviews: a supported way to
answer "what would decrypting this cost, and which key do I need?" without
hand-parsing the frozen header.

PqContainerInfo.Read/TryRead/ReadFileAsync report the declared key source
(new PqKeySource enum), KDF and work factors, chunk size, recipient count,
control-character-sanitized provider id, and an exact plaintext-size upper
bound (the same bound MaxPlaintextBytes enforces) — with zero key derivation
or decryption, so it is safe on untrusted input and is the natural primitive
for application policy gates. Structural acceptance mirrors the frozen reader
exactly, pinned by a conformance-corpus consistency test across all 28
vectors (reject-format vectors must fail inspection; everything else must
inspect and agree on the key source). Every value documented as
UNAUTHENTICATED until a decryption succeeds.

pqfe inspect <file> [--json]: human summary with the unauthenticated warning,
or a tiny stable hand-built JSON schema (NativeAOT-safe, no reflection
serializer) for scripts and policy gates.

Freeze-safe: a new read-only API; no byte meaning or reader acceptance
changes. 330x2 tests green (7 new); CLI smoke-tested on hybrid multi-
recipient, Argon2id, provider, and garbage inputs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sym7RJ7ehNhbMXytE5rMmS
@systemslibrarian
systemslibrarian merged commit 7520aba into main Sep 5, 2026
@systemslibrarian
systemslibrarian deleted the features/container-inspection branch September 5, 2026 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant