Commit Graph

57 Commits

Author SHA1 Message Date
NikitolProject
d876f42b5c wip: milestone v1.0 completion paused — all phases done, archival pending 2026-02-25 03:49:42 +03:00
NikitolProject
7c24ae8558 feat: Delete depth with gitea.com in CI
Some checks failed
CI / test (push) Successful in 42s
Release / Build and release (push) Failing after 1m40s
v1.0.0
2026-02-25 03:32:28 +03:00
NikitolProject
b9ed446deb feat: Change CI logic
Some checks failed
CI / test (push) Successful in 41s
Release / Build and release (push) Has been cancelled
2026-02-25 03:19:16 +03:00
NikitolProject
96048f31f2 clean: Delete unused .jar file
All checks were successful
CI / test (push) Successful in 40s
2026-02-25 03:12:51 +03:00
NikitolProject
8920e8be24 feat: add CI with gitea workflows
Some checks failed
CI / test (push) Successful in 1m22s
Release / Build aarch64-unknown-linux-musl (push) Has been cancelled
Release / Build x86_64-pc-windows-gnu (push) Has been cancelled
Release / Package decoders (push) Has been cancelled
Release / Create release (push) Has been cancelled
Release / Build x86_64-unknown-linux-musl (push) Has been cancelled
2026-02-25 02:59:34 +03:00
NikitolProject
e0605b2955 docs: Add README files & etc 2026-02-25 02:50:47 +03:00
NikitolProject
b04b7b1c2c docs(phase-6): complete phase execution 2026-02-25 02:36:57 +03:00
NikitolProject
02dd009905 docs(06-02): complete Kotlin and Shell decoder obfuscation support plan
- Create 06-02-SUMMARY.md with execution results
- Update STATE.md: phase 6 complete, 100% progress, new decisions
- Update ROADMAP.md: phase 6 plans marked complete

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 02:29:05 +03:00
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
cef681fd13 feat(06-02): add XOR header bootstrapping and encrypted TOC support to Kotlin decoder
- Add XOR_KEY constant matching FORMAT.md Section 9.1
- Add xorHeader() function with signed byte masking (and 0xFF)
- Update decode() with XOR bootstrapping: check magic, XOR if mismatch
- Update decode() with TOC decryption: decrypt when flags bit 1 is set
- Backward compatible: plain headers and unencrypted TOC still work
2026-02-25 02:24:25 +03:00
NikitolProject
4eaedc2872 docs(06-01): complete Rust obfuscation pipeline plan
- Add 06-01-SUMMARY.md with execution results
- Update STATE.md: phase 6, plan 1/2, 90% progress
- Update ROADMAP.md: phase 06 plan progress 1/2
- Mark FMT-06, FMT-07, FMT-08 complete in REQUIREMENTS.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 02:21:52 +03:00
NikitolProject
b6fa51d9fd feat(06-01): implement full obfuscation pipeline in archive.rs
- pack(): generate decoy padding (64-4096 random bytes per file)
- pack(): encrypt serialized TOC with AES-256-CBC using random toc_iv
- pack(): XOR header buffer before writing (8-byte cyclic key)
- pack(): set flags bits 1-3 (0x0E) for all obfuscation features
- unpack(): XOR bootstrapping via read_header_auto()
- unpack(): decrypt TOC when flags bit 1 is set
- inspect(): full de-obfuscation via shared read_archive_metadata()
- Factor out read_archive_metadata() helper for unpack/inspect reuse
- All existing tests pass (unit, golden, round-trip integration)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 02:19:48 +03:00
NikitolProject
8ac25125ab feat(06-01): add XOR header obfuscation and buffer-based serialization to format.rs
- Add XOR_KEY constant (FORMAT.md Section 9.1)
- Add xor_header_buf() for cyclic 8-byte XOR encode/decode
- Add write_header_to_buf() for buffer-based header serialization
- Add read_header_auto() with XOR bootstrapping detection
- Add serialize_toc() and read_toc_from_buf() helpers for TOC encryption
- Add parse_header_from_buf() internal helper
- Add 6 new unit tests (XOR round-trip, magic change, auto-detect, buf helpers)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 02:17:59 +03:00
NikitolProject
0cd76d7a32 docs(06-obfuscation-hardening): create phase plan 2026-02-25 02:12:16 +03:00
NikitolProject
361f9bfb6b docs(06): research phase domain 2026-02-25 02:08:11 +03:00
NikitolProject
b6ef40d826 docs(phase-5): complete phase execution 2026-02-25 01:50:55 +03:00
NikitolProject
230f447711 docs(05-02): complete shell decoder cross-validation tests plan
- SUMMARY.md: 6/6 tests pass (single, multi, no-compress, empty, large, Cyrillic)
- STATE.md: Phase 5 complete, 8 plans total, 80% progress
- ROADMAP.md: Phase 5 marked complete (2/2 plans)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 01:46:27 +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
ac169c286c docs(05-01): complete shell decoder plan
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 01:41:57 +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
NikitolProject
7331f4c0bb docs(05-shell-decoder): create phase plan 2026-02-25 01:33:31 +03:00
NikitolProject
79a7ce2010 docs(phase5): research shell decoder domain 2026-02-25 01:29:50 +03:00
NikitolProject
4666a348fe docs(phase-4): complete phase execution 2026-02-25 01:17:23 +03:00
NikitolProject
bd3dbbafcf docs(04-01): complete Kotlin decoder plan
- SUMMARY.md with 2 tasks, 1 deviation, 4 requirements completed
- STATE.md updated: Phase 4 complete, 60% progress
- ROADMAP.md updated: Phase 4 marked complete
- REQUIREMENTS.md updated: KOT-01 through KOT-04 marked complete

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 01:12:29 +03:00
NikitolProject
62ff949194 feat(04-01): add cross-validation test script for Kotlin decoder
- Checks prerequisites (kotlinc, java, cargo) with install instructions
- Test 1: single text file round-trip (Rust pack -> Kotlin decode)
- Test 2: multiple files with mixed content (text + 10KB binary)
- Test 3: no-compress mode for pre-compressed files
- Test 4: empty file edge case
- Test 5: large file (100 KB random data)
- SHA-256 comparison of original vs extracted for each test
- Colored output, temp directory cleanup via trap, non-zero exit on failure

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 01:09:35 +03:00
NikitolProject
f2f3ed42da feat(04-01): implement Kotlin archive decoder with full decode pipeline
- 40-byte header parsing with magic byte, version, and flags validation
- Variable-length TOC entry parsing with little-endian ByteBuffer helpers
- HMAC-SHA-256 verification BEFORE decryption (Encrypt-then-MAC)
- AES-256-CBC decryption via javax.crypto with PKCS5Padding
- Gzip decompression via java.util.zip when compression_flag == 1
- SHA-256 checksum verification after decompression
- Hardcoded 32-byte key matching src/key.rs exactly
- CLI main() for standalone JAR usage
- Zero third-party dependencies (only Android SDK / JVM stdlib)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 01:08:13 +03:00
NikitolProject
395f1329cb docs(04-kotlin-decoder): create phase plan 2026-02-25 00:57:11 +03:00
NikitolProject
17e286942e docs(04): research phase domain 2026-02-25 00:53:59 +03:00
NikitolProject
2d3320ada1 docs(phase-03): complete phase execution and verification 2026-02-25 00:45:09 +03:00
NikitolProject
387836ca14 docs(03-02): complete golden vectors and round-trip tests plan
- SUMMARY.md: 7 golden vectors + 6 round-trip integration tests
- STATE.md: Phase 3 complete (50% overall), 5 plans done
- ROADMAP.md: Phase 3 marked complete
- REQUIREMENTS.md: INT-02, TST-01, TST-02 marked complete

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 00:42:05 +03:00
NikitolProject
91ee354db6 test(03-02): add CLI round-trip integration tests
- 6 integration tests via assert_cmd: single file, multiple files, empty, Cyrillic filename, 11MB large, APK no-compress
- All tests verify byte-identical extraction (pack -> unpack -> assert_eq)
- Uses tempdir() for isolation and parallel safety
- Uses cargo_bin! macro (non-deprecated assert_cmd API)
- Covers Phase 3 edge cases: 0-byte PKCS7, >10MB file, UTF-8 non-ASCII names

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 00:39:33 +03:00
NikitolProject
329bed6f2b test(03-02): add golden test vectors for crypto primitives
- 7 deterministic tests: AES-256-CBC encrypt/decrypt, empty, HMAC-SHA256, HMAC verify, SHA-256 x2
- Fixed IV vectors for reproducible results (no randomness)
- HMAC golden value cross-verified with openssl (file input) and Python hmac module
- SHA-256 values match FORMAT.md Section 12.3 known vectors

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 00:37:10 +03:00
NikitolProject
c67a170919 docs(03-01): complete library crate and unit tests plan
- SUMMARY.md with 19 unit tests across crypto/compression/format modules
- STATE.md updated to Phase 3 Plan 1/2, 43% progress
- ROADMAP.md marks 03-01-PLAN.md complete
- REQUIREMENTS.md marks TST-03 complete
2026-02-25 00:33:17 +03:00
NikitolProject
3e96b1ed88 test(03-01): add 19 unit tests for crypto, compression, and format modules
- crypto: encrypt/decrypt roundtrip, empty data, size formula, HMAC compute/verify, SHA-256 known values
- compression: compress/decompress roundtrip, empty data, large data, should_compress heuristic
- format: header write/read roundtrip, TOC entry roundtrip (ASCII + Cyrillic + empty name), bad magic/version rejection, entry size calculation matching FORMAT.md worked example
- Update hex-literal to v1.1
2026-02-25 00:30:47 +03:00
NikitolProject
ce9012c5c5 feat(03-01): create library crate, update main.rs imports, add dev-dependencies
- Create src/lib.rs re-exporting all modules as public
- Update main.rs to use encrypted_archive:: imports instead of local mod declarations
- Add dev-dependencies: tempfile, assert_cmd, hex-literal, predicates
2026-02-25 00:29:01 +03:00
NikitolProject
8447cc399c docs(03): create phase plan for round-trip verification 2026-02-25 00:23:05 +03:00
NikitolProject
09a3593b8a docs(phase-3): research round-trip verification and testing strategy
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 00:19:27 +03:00
NikitolProject
8f0854ac8d docs(phase-2): complete phase execution 2026-02-25 00:09:24 +03:00
NikitolProject
2be4eabacb docs(02-02): complete archive commands plan
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 00:05:25 +03:00
NikitolProject
be507070b6 feat(02-02): implement pack, unpack, and inspect archive commands
- pack: two-pass algorithm reads/hashes/compresses/encrypts files then writes header+TOC+data
- inspect: reads header and TOC, displays all metadata (sizes, offsets, IVs, HMACs, SHA-256)
- unpack: HMAC-first verification, AES-256-CBC decryption, optional gzip decompression, SHA-256 check
- CLI dispatch wired from main.rs to archive module
- Directory traversal protection: rejects filenames starting with / or containing ..
- Compression auto-detection: .apk/.zip/etc stored without gzip (flags=0x00 when no file compressed)
- Round-trip verified: pack+unpack produces byte-identical files
- HMAC tamper detection verified: flipped ciphertext byte triggers rejection

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 00:03:28 +03:00
NikitolProject
d6bc92ee48 docs(02-01): complete project foundation plan
- Create 02-01-SUMMARY.md with execution results and deviations
- Update STATE.md: Phase 2 in progress, plan 1/2 complete
- Update ROADMAP.md: Phase 2 progress 1/2
- Mark 13 requirements complete: FMT-01..04, ENC-01..05, CMP-01..02, INT-01, CLI-01

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 00:00:19 +03:00
NikitolProject
6292b41159 feat(02-01): format types, crypto pipeline, and compression module
- Implement Header and TocEntry structs matching FORMAT.md byte layout
- Add write_header (40 bytes) and write_toc_entry (101+name_len bytes) serialization
- Add read_header, read_toc_entry, read_toc deserialization with validation
- Implement AES-256-CBC encrypt/decrypt with PKCS7 padding via cbc crate
- Add HMAC-SHA-256 compute/verify over IV||ciphertext (encrypt-then-MAC)
- Add SHA-256 hash for original file integrity
- Implement gzip compress/decompress with deterministic mtime(0)
- Add should_compress heuristic for known compressed file extensions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 23:58:08 +03:00
NikitolProject
c647f3a90e feat(02-01): project scaffolding with Cargo, CLI skeleton, and key module
- Initialize Rust project with aes, cbc, hmac, sha2, flate2, clap, rand, anyhow dependencies
- Add clap derive CLI with pack/unpack/inspect subcommands
- Add hardcoded 32-byte AES-256 key constant
- Create stub modules for format, crypto, compression, archive
- All 7 source files in place, cargo build succeeds

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 23:56:09 +03:00
NikitolProject
673c1191a0 docs(02-core-archiver): create phase plan 2026-02-24 23:49:46 +03:00
NikitolProject
9cdb4be248 chore: set verifier and checker models to inherit (Opus) 2026-02-24 23:45:36 +03:00
NikitolProject
cc7ff6db10 docs(02): research phase domain — Rust crypto stack, binary format, CLI patterns 2026-02-24 23:44:54 +03:00
NikitolProject
9125b388da docs(phase-1): complete phase execution 2026-02-24 23:31:04 +03:00
NikitolProject
3cb6512157 docs(01-01): complete format specification plan
- SUMMARY.md with execution metrics and self-check
- STATE.md updated: Phase 1 complete, decisions logged
- ROADMAP.md updated: Phase 1 progress 1/1
- REQUIREMENTS.md: FMT-05 marked complete

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 23:24:33 +03:00
NikitolProject
1c698fec91 feat(01-01): add worked example with annotated hex dump and shell reference appendix
- Worked example: 2-file archive (hello.txt + data.bin) with 323 bytes total
- Real SHA-256 hashes computed for both files
- Full annotated hex dump with byte-by-byte field annotations
- Step-by-step shell decode walkthrough with dd/xxd commands
- Shell reference functions: read_le_u16, read_le_u32, verify_hmac, decrypt_file
- Kotlin reference: decrypt, HMAC verify, gzip decompress, SHA-256 verify
- Busybox compatibility notes with od fallback for xxd
- All offsets verified internally consistent via automated check

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 23:22:06 +03:00
NikitolProject
fcd37f531b feat(01-01): write format specification with byte-level field definitions
- Archive header definition (40 bytes) with complete field table
- File table entry definition (11 fields, variable-length per entry)
- AES-256-CBC + HMAC-SHA-256 encryption pipeline with encrypt-then-MAC
- PKCS7 padding formula with 8 worked examples
- Gzip compression details with per-file flag
- Obfuscation features: XOR header, encrypted TOC, decoy padding
- Decode order of operations (full step-by-step)
- Version compatibility rules

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 23:18:37 +03:00