Expand description
Armor mode: robust steganography resistant to JPEG recompression.
Armor mode trades undetectability for robustness by using:
- STDM (Spread Transform Dither Modulation) for embedding, which distributes each bit across multiple coefficients via spreading vectors
- Reed-Solomon error correction to recover from bit errors introduced by recompression
- Stability analysis to select coefficient positions that survive quality factor changes
Phase 2 adaptive robustness: When the message is small relative to the image capacity, the encoder automatically maximizes robustness by:
- Increasing RS parity (up to 240/255 symbols, from fixed 64/255)
- Repeating the RS-encoded bitstream r times across spare capacity
- Using soft majority voting with STDM log-likelihood ratios on decode
- Increasing the STDM delta for larger decision regions
Phase 2 activates transparently when r >= 3. Phase 1 images (r <= 1) are decoded using the original path for full backward compatibility.
The pipeline: encrypt -> frame -> RS encode -> [repeat r×] -> STDM embed.
Modules§
- capacity
- Armor mode capacity estimation.
- dft_
payload - DFT ring payload: a resize-robust second payload layer.
- ecc
- Reed-Solomon error correction over GF(2^8).
- embedding
- STDM (Spread Transform Dither Modulation) embedding and extraction.
- fft2d
- Deterministic 2D FFT/IFFT using only WASM-intrinsic f64 operations.
- fortress
- Fortress sub-mode: BA-QIM embedding in DC block averages.
- pipeline
- Armor encode/decode pipeline.
- repetition
- Repetition coding with soft majority voting.
- resample
- Bilinear resampling for undoing geometric transforms.
- selection
- Frequency-based coefficient selection for Armor embedding.
- spreading
- Spreading vector generation for STDM embedding.
- template
- DFT template generation, embedding, detection, and transform estimation.