3 Commits

Author SHA1 Message Date
NikitolProject
ac51cc70aa feat(06-02): add XOR header bootstrapping and encrypted TOC support to Shell decoder
- Add XOR_KEY_HEX constant and hex_to_bin() helper (xxd + od fallback)
- Replace magic check with XOR bootstrapping: read 40 bytes, XOR if mismatch
- Write de-XORed header to temp file for field parsing
- Add TOC decryption via openssl enc when flags bit 1 is set
- Switch TOC parsing loop from $ARCHIVE to $TOC_FILE variable
- Update HMAC verification to construct IV from parsed hex (not archive position)
- All 7 cross-validation tests pass (Rust pack -> Shell decode -> SHA-256 match)
2026-02-25 02:26:05 +03:00
NikitolProject
e9d7442ead test(05-02): add cross-validation test script for shell decoder
- 6 test cases: single text, multiple files, no-compress, empty, large file, Cyrillic filename
- Uses Rust archiver to create archives, sh decode.sh to extract, SHA-256 to verify
- Follows same pattern as kotlin/test_decoder.sh

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 01:43:58 +03:00
NikitolProject
6df2639a45 feat(05-01): add busybox-compatible shell decoder script
- POSIX sh script with full decode pipeline: header parse -> TOC parse -> HMAC verify -> decrypt -> decompress -> SHA-256 verify -> write
- Hardcoded KEY_HEX matching src/key.rs
- xxd/od fallback detection for hex conversion
- Graceful HMAC degradation if openssl lacks -mac support
- UTF-8 filename preservation for Cyrillic names
- Verified byte-identical extraction against Rust archiver output

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 01:40:21 +03:00