Verify artifacts against explicit SHA-2 lengths and digests #6
Labels
No labels
alpha-1
bug
ci
docs
duplicate
enhancement
help wanted
invalid
performance
phase-6
question
refactor
security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
erix/sha2-tool#6
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem and motivation
Callers need a direct way to compare an artifact with its expected length and digest, including inherited input on EriX.
Proposed behavior and scope
Add verify-sha256 and verify-sha512 with explicit LENGTH HEX SOURCE triples. Preserve raw paths, repeated inputs, stdin once, -- and --zero. Parse before I/O and print a verdict only after checking the actual input and retiring it. Keep existing hash commands compatible. This checks caller-provided expectations, not publisher identity.
Authority, security and reliability
Bind complete original argv to admitted startup. Narrow each actual file or recipient-stream READ endpoint before data access, with monotonic alias-wide limits, a genuine data-free EOF probe and once-only retirement. A surviving output alias must not retain usable input authority. Preserve fixed terminals, lenders, original errors and separate cleanup evidence. No checkfile discovery, new pathname authority, widening fallback or arbitrary input cap. Coordinate protocol, provider, measured-profile and counted storage changes.
Acceptance criteria
Alternatives and tradeoffs
A local byte counter does not narrow native authority. Provider-enforced limits and recipient-only views require coordinated work but avoid an unrestricted verifier or duplicate file runtime. Checkfiles and publisher authentication are separate features.
Tracking and rollout
Implement the shared protocol and providers, then the command, measured profiles and image scenarios. Tracked by Phase 6 completion and the compatibility changes. Boot assembly's expected-length adoption remains a separate requirement.