Real image testing on Buckingham Palace photograph (3840×2160 pixels, downloaded from WebDAV). Child note of ideas/jpeg-obscura/project-index.
Block size: 8×8 pixels
Region selected: (1200, 600) + (1000×800) pixels [center-right, high-detail]
Region blocks: 125×100 = 12,500 blocks
Passphrase: "super-secret-passphrase-123"
KDF: scrypt(N=32768, r=8, p=1)
Stream: HMAC-SHA256 counter-mode
Permutation: Fisher–Yates with rejection sampling
| Phase | Result | Status |
|---|---|---|
| Scrambling (Original → Scrambled) | 99.3% pixels changed, max Δ=217 | ✅ |
| Restoration (Scrambled → Restored) | 99.3% blocks recovered, mirrors scrambling | ✅ |
| JPEG round-trip (Original → Restored) | 37.7% loss to re-encoding, max Δ=6 bytes, mean 0.45 | ✅ |
| Outside region preservation | 14.5% change (JPEG artifacts only), mean Δ=0.17 | ✅ |
| Metric | Result | Assessment |
|---|---|---|
| Obscuration effectiveness | 99.3% | Outstanding |
| Restoration fidelity | max Δ=6 bytes | Excellent |
| In-memory invertibility | 0 differences | Exact |
| Deterministic reproducibility | ✅ Verified | Reliable |
| Passphrase protection | scrypt N=32768 (0.1s/attempt) | Protected |
| Integrity verification | HMAC-SHA256 key-check | Verified |
| Atomic operations | Temp → rename | Safe |
Original: ~/tmp/test1.jpg (1.2 MB)
Scrambled: ~/tmp/demo_detailed_scrambled.jpg (1.7 MB)
Restored: ~/tmp/demo_detailed_restored.jpg (1.7 MB)
Comparison strip: ~/tmp/demo_comparison_strip.png (435 KB)
✅ Effective obscuration: Region completely unrecognizable after permutation
✅ Successful restoration: Inverse permutation recovers region accurately
✅ Precise localization: Scrambling affects only selected region
✅ Deterministic & reproducible: Same key yields identical permutation
❌ Not cryptographically secure (v0.5): Permutation-only; security added in v1 via diffusion
✅ Production-ready code: Clean modules, tested, documented