Pixel-domain, permutation-only proof-of-concept. Core mechanics complete and tested on real images. Child note of ideas/jpeg-obscura/project-index.
Pixel-domain, permutation-only proof-of-concept. Core mechanics complete and tested on real images.
| Module | Purpose | Status |
|---|---|---|
| geometry.py | Rectangle validation, block grid snapping, enumeration | ✅ Complete |
| stream.py | HMAC-SHA256 counter stream, rejection sampling | ✅ Complete |
| permutation.py | Fisher–Yates permutation, inverse computation | ✅ Complete |
| kdf.py | scrypt (N=32768, r=8, p=1) key derivation | ✅ Complete |
| image.py | Pillow I/O, EXIF orientation, mode normalization | ✅ Complete |
| transform.py | Block permutation (exact in-memory) | ✅ Complete |
| metadata.py | APP15 encoding/decoding, key-check verification | ✅ Complete |
| errors.py | Typed exceptions with exit codes (2-7) | ✅ Complete |
✅ Integration test (test_integration.py): All core mechanics verified
✅ End-to-end demo (demo_scramble_restore.py): Real image workflow
✅ Detailed test (high-detail region): 12,500-block scrambling with metrics
Type hints on all functions
Clean module separation (no circular deps)
Error handling with specific exit codes
Git repository with comprehensive commit (d0b700d)
Docstrings and usage examples
❌ Not secure: Permutation-only, vulnerable to jigsaw reconstruction (fixed in v1 via diffusion)
❌ Lossy: JPEG encode/decode introduces ~0.45 byte mean delta in restored region
❌ Metadata-dependent: Scrambled image must retain salt/geometry (embedded in APP15 in v1+)
❌ No reprocessing robustness: Resize/crop/rotate will break decoding
CLI implementation (1-2 days):
- Argument parsing (sketch exists)
- Hidden passphrase prompts
- Atomic output (temp → rename)
Unit test suite (1 day):
- Geometry table tests
- Published vector validation
- Malformed input rejection
APP15 embedding (1 day):
- Move metadata from sidecar to JPEG segment
- Extract metadata during restore
v1 Diffusion (0.25 days):
- Add keyed value-offset diffusion
- First security milestone
- Published test vectors