| 02-core-archiver |
02 |
archive, cli |
| aes-256-cbc |
| hmac-sha256 |
| gzip |
| binary-format |
| pack |
| unpack |
| inspect |
| encrypt-then-mac |
|
| phase |
plan |
provides |
| 02-core-archiver |
01 |
Crypto pipeline (encrypt/decrypt/HMAC/SHA-256), format types (Header/TocEntry serialization), compression (gzip/heuristic), CLI skeleton, hardcoded key |
|
|
| pack() function: two-pass archive writer producing FORMAT.md-compliant archives |
| unpack() function: HMAC-first verification, AES-256-CBC decryption, optional gzip decompression, SHA-256 integrity check |
| inspect() function: metadata display (sizes, offsets, IVs, HMACs, SHA-256) without decryption |
| CLI dispatch wiring all three commands to archive module |
| Directory traversal protection in unpack |
|
| 03-round-trip-verification |
| 04-kotlin-decoder |
| 05-shell-decoder |
| 06-obfuscation |
|
| added |
patterns |
|
|
| two-pass archive writing (process then compute offsets) |
| HMAC-before-decrypt verification order |
| filename-only entry names from full paths |
|
|
| created |
modified |
|
|
| src/archive.rs |
| src/main.rs |
|
|
| Use filename-only (not full path) as archive entry name to keep entries portable |
| Directory traversal protection: reject names starting with / or containing .. |
| HMAC failure skips file and continues; SHA-256 mismatch warns but still writes file |
| Flags byte bit 0 set only when at least one file is actually compressed |
|
| Two-pass archive writing: Pass 1 processes files in memory, Pass 2 computes offsets and writes sequentially |
| HMAC verified before decryption attempt (encrypt-then-MAC per FORMAT.md Section 10) |
| Per-file error handling: HMAC/SHA-256 failures increment error count, non-zero exit on any errors |
| Inline TOC size computation: sum of (101 + name.len()) per file |
|
|
2min |
2026-02-24 |