Two readings of the same page. The first half takes five minutes and needs no background. The second half is for whoever will audit this — every number below was checked against the shipped code, and the parts that are weak are stated as plainly as the parts that are strong.
Salsteg puts a file inside a photograph. What comes out is a normal picture — one you can send through WhatsApp, Telegram or email like any other. Only the password opens what is inside, and the password never leaves the device it was typed on.
Parameters below are the constants in the shipped
stego.js / chatcrypto.js, not a design intention.
| Stage | Choice | Why |
|---|---|---|
| Key derivation | Argon2id, t=2, m=64 MiB, p=4, 32-byte output | Memory-hard, so parallel guessing is bounded by RAM, not by cores. No PBKDF2 fallback: the code throws if the WASM fails to load rather than silently deriving a different key. |
| Encryption | AES-256-GCM, random 12-byte IV per message, 16-byte tag | AEAD: a single flipped bit in the carrier fails decryption instead of returning plausible garbage. |
| Header seal | HMAC-SHA256(SHA-256(password), "steg-header"), first 8 bytes |
No length oracle: the payload length sits behind 64 bits of password-derived MAC, so a wrong password is rejected at hashing speed. |
| Whitening | ChaCha20 keystream, key SHA-256(pw‖"whitening") |
Makes the embedded bits statistically uniform, which removes the chi-square signal that plain LSB embedding leaves behind. |
| Slot order | Fisher–Yates driven by ChaCha20, key SHA-256(pw‖"shuffle") |
Without the password you do not know which pixels to read — extraction is not a reading problem but a key problem. |
| Randomness | crypto.getRandomValues for salt, IV, nonces, padding |
OS CSPRNG throughout; no Math.random anywhere on the crypto path. |
| Password generator | 20 characters from a 75-symbol alphabet | 124.6 bits by calculation. Ambiguous glyphs (I, l, O, 0, 1) removed so it can be read over a phone. |
Per candidate password, an attacker pays one edge-map reconstruction, one 64-bit header test, and — only when the header matches — one full Argon2id derivation. Measured with native code at these exact parameters: 45 ms per derivation, ≈22 guesses per second per CPU core. The in-browser WASM build is several times slower, which is the owner's cost when encoding, not the attacker's.
| Attacker | Throughput | Note |
|---|---|---|
| One modern CPU core | ≈22 guesses/s | memory-bandwidth bound |
| One 24 GB GPU | ≈8.5×10³ guesses/s | ≈384 parallel 64 MiB lanes |
| 100-GPU cluster | ≈10⁶ guesses/s | optimistic ceiling |
| Password class | Entropy | Time at 10⁶ guesses/s | Verdict |
|---|---|---|---|
| Generated by Salsteg (20 chars, 75 symbols) | 124.6 bits | ≈5×10²³ years | not the attack surface |
| Four random diceware words | ≈50 bits | ≈18 years | adequate, not eternal |
| Human passphrase, decent rules | ≈35 bits | ≈5 hours | marginal |
| Typical reused password | ≈30 bits | ≈10 minutes | cracked |
| Anything on a common list | <20 bits | under a second | cracked |
Average case, halved entropy. Grover halves the effective entropy again — the generated-password case still sits at ~2⁶² work — and no known quantum speedup removes Argon2's memory cost.
| Limit | Severity | What to do about it |
|---|---|---|
| One secret: the password. No reset, no escrow, no recovery. | by design | Use the generator and store it separately from the carrier. |
| No forward secrecy, no revocation. One compromised password opens every picture made with it. | by design | One password per sensitive exchange, treated like a one-time pad. |
| Re-encoding destroys the payload. | operational | Send PNG or PDF as a file; confirm the reveal on the other side. |
| Metadata — who sent what, to whom, when — is not hidden. | out of scope | Steganography conceals content. Traffic analysis needs a different discipline. |
| Endpoint compromise defeats all of the above. | out of scope | Device hygiene. The tool never touches the network, which narrows but does not close it. |
| Payload ceiling 999,488 B; a 12 MP photo yields ≈470 KB because the output PNG is capped at 2 MB. | capacity | Fine for documents; not for media. |
| Adaptive edge embedding is not a formal cover model. With the original photo an analyst could attempt difference analysis. | residual risk | Appropriate against opportunistic and moderately-resourced adversaries; not a covert channel against state-level traffic analysis. |
Nothing here asks to be trusted. The single-file build can be audited in one read-through, and the hosted app can be watched while it works.
stego.js is the hiding and
crypto core; js/app-legacy.js is the UI. Both are unminified.53 4D, version 2,
8-byte metadata, length inside the sealed header.