LLM Steganography Demo

Hide secret messages in innocent-looking AI-generated text

Model Loading

Initializing...

Shared Parameters

Both encoder and decoder must use the same context and key.

Encode

Encoding character (0/0)
bit 0 of 0

Decode

Processing token: → bit -
bit 0 of 0
Recovered so far:

This demo uses a half-splitting entropy coding scheme built on top of GPT-2's next-token probability distribution.

  1. The secret message is converted to a bit string (UTF-8 → bits).
  2. For each secret bit, GPT-2 produces a probability distribution over the entire vocabulary for the next token.
  3. Tokens are sorted by probability (descending) and split into two halves at the 50% cumulative probability mark.
  4. Bit 0 → the next token is sampled from the first (higher-probability) half; bit 1 → from the second half.
  5. A shared-key PRNG (mulberry32) selects the exact token within the chosen half, so the decoder can reproduce the same random draws.
  6. The decoder re-runs GPT-2 on the same context, observes which half each cover token fell into, and recovers the bits → original message.

Because both sides share the same model, context, and PRNG seed, the decoder can perfectly reconstruct the hidden bits. The resulting cover text reads like normal GPT-2 output, hiding the secret in plain sight.

0 sats
AI
No saved providers yet.
リレー
Loading relays...
ブロッサム
Loading blossom servers...
v0.0.1