Embedding Messages Workflow (Sender)
The embedding pipeline translates plain secret data into completely invisible, encrypted Unicode Variation Selectors prepended to normal cover text. This process is partitioned into four sequential phases.
Phase 1: Environment & Data Preparation
- WASM Initialization: When opening the application, the WebAssembly Brotli module is initialized. If WASM fails to compile, the pipeline is disabled with a prominent diagnostic alert.
- User Input Ingestion: The sender inputs the Cover Text, Secret Message, and a Stego-Key (mandatory). An optional Key-Base (AES Password) and Recovery Hint may also be provided.
- Key Fallback Assignment: If the Key-Base is omitted, the system automatically binds the Stego-Key as the AES password.
- Capacity Verification: The UI verifies that the cover text length provides sufficient bit-capacity. If the secret exceeds capacity, an error alert halts execution.
Phase 2: Payload Formatting & Brotli Compression
The secret message and optional hint are serialized into binary payload bytes and submitted to the Brotli compression engine:
- If
CompressedSize < RawSize: The compressed bytes are prepended with the0xFEidentifier flag byte. - If
CompressedSize ≥ RawSize: The original raw bytes are passed uncompressed (avoiding dictionary overhead on tiny strings).
Phase 3: Key Derivation & AES-256-CTR Encryption
Cover_Hash = SHA-256(Cover_Text)
Dynamic_Salt = Cover_Hash[0..15] (128 bits)
Derived_Key = PBKDF2(Key_Base, Dynamic_Salt, 100000, HMAC-SHA256) (48 bytes)
AES_Key = Derived_Key[0..31] (256-bit Key)
CTR_IV0 = Derived_Key[32..47] (128-bit Initial Counter)
Cipher_Bytes = AES-CTR-Encrypt(Payload_Bytes, AES_Key, CTR_IV0)
Dynamic_Salt = Cover_Hash[0..15] (128 bits)
Derived_Key = PBKDF2(Key_Base, Dynamic_Salt, 100000, HMAC-SHA256) (48 bytes)
AES_Key = Derived_Key[0..31] (256-bit Key)
CTR_IV0 = Derived_Key[32..47] (128-bit Initial Counter)
Cipher_Bytes = AES-CTR-Encrypt(Payload_Bytes, AES_Key, CTR_IV0)
Phase 4: Spatial Bit-Mapping & Variation Selector Injection
- The Stego-Key is processed with PBKDF2-HMAC-SHA256 (100,000 iterations) to derive a high-entropy 256-bit cryptographic seed.
- The AES-256-CTR CSPRNG with Unbiased Rejection Sampling produces deterministic, uniform pseudo-random bit positions across the cover text via O(K) Lazy Fisher-Yates mapping.
- An XOR Key sequence is generated by matching the selected cover bits with ciphertext bits: $K_j = C_{P_j} \oplus M_j$.
- The resulting XOR key bytes are mapped to invisible Unicode Variation Selectors (
U+FE00–U+FE0Ffor bytes 0–15 andU+E0100–U+E01EFfor bytes 16–255) using an $O(1)$ precomputed lookup table (LUT). - The invisible VS characters are prepended to the visible cover text, outputting the final Stego-Text.