4 Commits

Author SHA1 Message Date
NikitolProject
9fdeafbbd7 feat(kotlin): add --key, --key-file, --password support to ArchiveDecoder
Some checks failed
CI / test (push) Failing after 40s
Remove hardcoded KEY constant and accept key via CLI arguments.
Add Argon2id KDF (Bouncy Castle) with parameters matching Rust impl,
salt reading for password-derived archives, and hex/key-file parsing.
2026-02-27 02:11:20 +03:00
NikitolProject
a01b260944 feat(09-01): update Kotlin decoder for v1.1 format with directory support
- Add entryType and permissions fields to TocEntry data class
- Parse entry_type (1 byte) and permissions (2 bytes LE) in parseTocEntry
- Update version check from 1 to 2 for v1.1 format
- Handle directory entries: create dirs without decryption
- Create parent directories for files with relative paths
- Add applyPermissions() using Java File API (owner vs everyone)
- Update entry size formula comment to 104 + name_length

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 22:04:54 +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
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